Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It's likely that you're corrupting your memory. See here: https://stackoverflow.com/questions/2987207/why-do-i-get-a-c-malloc-assertion-failure

When running standalone you may be getting luck that the memory being corupted is less critical. As linked I suggest you use valgrind and make a minimal example to isolate your problem.