Newbie hit a wall, all i did was copy paste!

Hi i am newbie to kde development, this is my actually my first forum post.

So i have been going though the kxmlGui docs.
im on the saving loading section,the app is building fine but
when i hit the open button
the select file window opens and instantly the app crashes
i just copy pasted code
i didnt add or remove anything
i get this malloc_consolidate(): unaligned fastbin chunk detected

the only place my setup deviates, is that i had to add this line to the kde-builder.yaml under cmake options
-DKDE_INSTALL_PREFIX_SCRIPT=ON

i had to add this or else my code wont run

thank you for taking your to read this, any feed back is appreciated.