0

I'm testing/debugging my app in the simulator. Once in a while (I can't track down any specifics) I get EXC_BAD_ACCESS exception, but when it happens, line

int retVal = UIApplicationMain(argc, argv, nil, nil);

in the main.c is being highlighted. There's nothing in the log to indicate what causes the error (nothing at all, in fact). What can I do to track this down, to understand what causes the error (and, naturally, fix it)?

Aleks G
  • 56,435
  • 29
  • 168
  • 265

2 Answers2

1

most likely you are sending a message to a object, that is overreleased, and thus deallocated.

Run your app with NSZombieEnabled, that should give you the object, that doesn't exist anymore.

should be helpful: How do I set up NSZombieEnabled in Xcode 4?

Community
  • 1
  • 1
vikingosegundo
  • 52,040
  • 14
  • 137
  • 178
0

Most likely a memory corruption issue. Try running it as Profile/Analyze (as opposed to Run), most likely it'll find memory leaks, memory corruption for you.

Zepplock
  • 28,655
  • 4
  • 35
  • 50
  • Thanks for your answer. I ran through "Analyze" - and it only gave me a few "Possible memory leak" warnings, but nothing else. Tried running through "Profile" - but the app simply dies. – Aleks G Dec 20 '11 at 19:15