iOS - Diagnosing EXC_BAD_ACCESS with NSZombie

416 views Asked by At

My app has started crashing due to EXC_BAD_ACCESS, but does not give my any useful information as to where the crash is happening.

So I enabled NSZombies. Now I get this:

*** Terminating app due to uncaught exception of class '_NSZombie_NSException'
libc++abi.dylib: terminate called throwing an exception

* thread #1: tid = 0x2303, 0x3c608350 libsystem_kernel.dylib`__pthread_kill + 8, stop reason = signal SIGABRT
    frame #0: 0x3c608350 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x3c57efb6 libsystem_c.dylib`pthread_kill + 58

Ok... well that doesn't really help either. How do I get any information from this that can help me find the problem?

I also have a breakpoint for All Exceptions turned on.

1

There are 1 answers

0
tsnorri On

Since the error message says that you have an uncaught exception of class _NSZombie_NSException, you could have an exception that gets freed before it has been thrown or caught. Turning on both NSZombies and running the app from the debugger with the All Exceptions breakpoint could help, but using Instruments's Zombies template is probably more worthwhile, since it tracks object allocations and deallocations.