0

my apps crash to this part of code

int main(int argc, char *argv[]) {

@autoreleasepool {
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    return retVal;
}
}

So, where in xcode 4 i can see list of things that the program did before he goes to this point, In clear I want a know at what line the program crash in my code?

Alex
  • 141
  • 1
  • 1
  • 5

2 Answers2

1

If you're seeing that then it's highly likely your program has terminated due to an uncaught exception. Take a look at this question to see how to set a breakpoint in objc_exception_throw which will then help as you'll be dropped right into the code that's causing the exception to be thrown.

Community
  • 1
  • 1
mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
  • This is the way to go. NSZombie is also helpful but not directly the issue behind your specific question. – Dancreek Jan 13 '12 at 15:37
  • Indeed. It's getting to be the defacto thing people say when people have a crash - "Turn on zombies". Sure, in my opinion you should always (in general) dev with it on, but it's not likely going to be of help here. – mattjgalloway Jan 13 '12 at 15:42
1

Did you enable Zombies? To do it do the following:

1) Click on your app name(next to the Run and Stop buttons on top)

2) Click "Edit Scheme..."

3) In "Memory Management" put a tick on "Enable Zombie Objects"

Or you can get there by clicking "Product" --> "Edit Scheme..."

Hope it helps

Novarg
  • 7,390
  • 3
  • 38
  • 74