iOS error : Heap corruption detected, free list is damaged and Incorrect guard value: 0

These bugs are no fun. Most likely, you have a buffer overflow somewhere or you are using a piece of memory after it has been freed and stomping on something else.

Since you can get it to crash in the debugger, that makes it much easier to track down.

Start by setting a breakpoint on malloc_error_break, as the error message instructs you to do. When you hit that breakpoint, that'll provide more of a clue, but still may be rather vague. However, you'll be able to post more clues and we can help you from there.


In my case, it was a problem with the simulator (with its memory).

Try to compile it in a real device after cleaning the build folder or close the simulator and run again.