1

i would like to log every crash of my application...

so i've tried to catch all signals. But it seems not working for "EXC_BAD_ACCESS"

Someone know... If is it possible to catch it ? And how ?

Mathieu Mahé
  • 2,575
  • 2
  • 33
  • 47

4 Answers4

1

The zombies will save you.

DenverCoder9
  • 3,607
  • 3
  • 30
  • 57
1

EXC_BAD_ACCESS is probably SIGBUS or SIGKILL. See PLCrashReporter.

tc.
  • 33,206
  • 5
  • 76
  • 96
1

You need to set an argument on your executable called NSZombieEnabled to YES.

Jacob Relkin
  • 156,685
  • 31
  • 339
  • 316
  • Is this recommended for distribution if I want to catch EXEC_BAD_ACCESS? For a specific case, I want nothing to happen (like sending a message to `nil`), where there's a chance that a message will be sent to an object after its been deallocated. Basically, I want ARC's weak pointers. – ma11hew28 Jun 29 '11 at 18:23
  • Never mind. I figured out how to do this a better way by [retaining the request delegate](http://stackoverflow.com/questions/6528866/ok-to-retain-asihttprequest-delegate/6529193#comment-7688197). – ma11hew28 Jun 30 '11 at 04:02
1

You could also do this automatically with Crittercism.

Julie
  • 668
  • 9
  • 9