-4

I am using XCode Version 4.6 (4H127), I got random crash in main.m

Please see attached screenshots

Thanks

enter image description here

Debugger :

enter image description here

Nikkie
  • 93
  • 8
  • Set up an exception breakpoint in xcode, this post covers how to do it, http://stackoverflow.com/questions/4961770/run-stop-on-objective-c-exception-in-xcode-4. This won't solve your problem but should point out whats wrong. – BooRanger Jul 04 '13 at 13:30

1 Answers1

7

The cause of the crash is not in main.m, but rather is propagating the exception up looking for an exception handler, and since no exception handler is found, shows main.m (the highest level in the app). Add an exception breakpoint and the app will stop at the line of code causing the exception.

The default settings (shown below) are usually sufficient.

enter image description here

bobnoble
  • 5,794
  • 3
  • 25
  • 32
  • 2
    I have tried this. not working! – Nikkie Jul 04 '13 at 13:38
  • Does the app launch (i.e., gets to the initial view controller or later) when the random crash occurs), or randomly crashes when launching the app? – bobnoble Jul 04 '13 at 13:43
  • randomly crashes when launching the app – Nikkie Jul 04 '13 at 13:48
  • Any exception/error message in the debug view? If not, if you select Continue a few times, is there an error message? Add the error message to your question if any are shown. – bobnoble Jul 04 '13 at 13:55