program received signal SIGABRT

Discussion in 'iOS Programming' started by hajira, Aug 23, 2012.

  1. hajira, Aug 23, 2012
    Last edited by a moderator: Aug 23, 2012

    hajira macrumors newbie

    Jul 25, 2012
    Im calling a REST service from iPhone and my code doesn't contain any errors.But when I run
    theproject Im getting error like:"Program received signal SIGABRTeceived signal " at the following
        int main(int argc, char *argv[])
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        int retVal = UIApplicationMain(argc, argv, nil, nil);  // error at this line//
        [pool release];
        return retVal;
    I couldn't understand whats going wrong?How to rectify it?

  2. KnightWRX macrumors Pentium


    Jan 28, 2009
    Quebec, Canada
    The error doesn't actually happen at that line. That line of code is basically your entire program (it's what eventually calls the run loop, loads your views and controllers, etc.. etc..).

    If you're getting a SIGABRT, it's because of a memory allocation issue in all probability. If the debugger is indicating that line and the stack only shows your run loop, then you most likely ran into what is known as a Zombie (over release of an object, you're probably releasing something you don't have ownership over).

    Run your program through Instruments and do a zombie trace. (CMD-I in Xcode, and choose the Zombies template).
  3. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Whenever you get a SIGABRT there is some text written to the debugger console start "Application terminated ..." That text explains the problem. What does it say?

    Also, it may help to set a breakpoint on All Exceptions. That sometimes stops the debugger closer to the faulty line of code.
  4. idelovski macrumors regular

    Sep 11, 2008
    I had same thing just yesterday. Simple reboot solved the problem, as the problem in question was somethin like: "Application already loaded in debugger, terminating. Unknown error."

    So, if you have your Mac with month long uptimes maybe you have the same problem.

Share This Page