Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hajira

macrumors newbie
Original poster
Jul 25, 2012
17
0
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..
 
Last edited by a moderator:
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).
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.