Search code examples
iosxcode4.2sigabrt

SIGABRT Xcode 4.2 issue


Since I've upgraded from xcode 3.1 to xcode 4.2, when I debug a program and for some reason I get a SIGABRT error (i.e. calling a method of an object that doesn't exist) Xcode shows the error in the main function of the program, instead of the line that is generating the SIGABRT.

Maybe I'm missing some kind of configuration in the debugger or in xcode? any ideas?


Solution

  • What did it for me, was something that I found here that has to do with creating NSZombies

    I'll at least copy the highlights:

    1. Go to your project in Xcode 4
    2. Environment variables can be set up in the Scheme editor (find Product -> Edit scheme… in menu bar):
    3. Name the variable as NSZombieEnabled and set its value to YES.
    4. Run your app in Debug mode. You likely get a … message sent to deallocated instance… message and the debugger stops at the line in error. This information leads to the problem.
    5. When ready, disable NSZombieEnabled by changing YES to NO.