Xcode problem

Oh wise ones I am in need of assistance. Xcode is doing things that I do not understand. My active build configuration is Debug. When I run my project I get the following:

MoKgVm2DVD(7056) malloc: *** error for object 0x3c3291: Non-aligned pointer being freed
MoKgVm2DVD(7056) malloc: *** set a breakpoint in szone_error to debug

where MoKgVm2DVD is the name of the project. Sometimes I get only the above (though the 0x3c3291 changes). Sometimes I get the error for two objects. This is even if I make absolutely zero changes in between runs. The most annoying thing is that every once in a while, the debugger window opens on run and two copies of the application launch. Again with no changes in between runs. The first application bounces on the dock, eventually quits and I get this:

MoKgVm2DVD has exited due to signal 11 (SIGSEGV).

in the run log. The second copy of the application stays open and runs fine.
Is this just some quirkiness between xcode and applescript that I shouldn’t worry about or do I have something wrong with my project that is going to effect my final product?

Thanks in advance for any help.

I’m having the 1st problem always, and the second one sometimes. Fiddling with “clean all target” and recompiling, and simply running the app separately instead of doing a “build and run” solves it after a few tries.
The first problem doesn’t go away, and I don’t like it that the standalone application is logging this at every startup to my console.

Found out something interesting while hunting for the reason of this error here:

the 0x3b8ac1 changing to something else on each new compile.
This error happens when starting up a compiled application outside of X code.

Here’s what I found out: if I removed the embedded “Scripting Additions” folder out of the application, it relies on the same scripting additions being installed in my ~/Library/Scripting Additions folder. When starting up, no error comes up in de console.log.
That gave me reason to experiment some more. Moving the scripting additions out of my ~/Library/Scripting Additions folder, and having them embedded in the application → no error.
So it seems to me that compiled applications on my MacBook have problems when the scripting additions are installed in both the application ánd in the standard Scripting Additions folder.
I tried with different scripting additions, and the scripting additions themselves have no influence on this behaviour. Whatever scripting addition I embed that is also present in the OS’s Scripting Additions, causes whatever application to display the above error on launch.

Can someone reproduce this problem? If this is indeed a problem with Xcode applications, does anyone know how to work around this?