program received signal SIGABRT

Discussion in 'iPhone/iPad Programming' started by hajira, Aug 23, 2012.

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

    macrumors newbie

    Joined:
    Jul 25, 2012
    #1
    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
    line
    Code:
     
        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?

    Thanks..
     
  2. macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #2
    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. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    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. macrumors regular

    Joined:
    Sep 11, 2008
    #4
    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