views:

53

answers:

1

Yesterday I ran into a situation (which I resolved by studying my code a lot) where the app would start and then blow up at some point in the start sequence. This would be a breeze to troubleshoot except that there was no stacktrace whatsoever. Debugging and stepping through line-by-line caused the problem to go away, and it was intermittent anyway.

  1. What kinds of problems cause the iPhone simulator or the device to blow up with no stacktrace? (A shortest example would be great).
  2. What is the best way to debug this type of problem? Line-by-line debugging is out because it causes the problem to resolve.
+1  A: 

I have had minor success with creating the breakpoint objc_exception_throw in the debugger. Basically go to your debugger window -> show breakpoints and type in objc_exception_throw where it says Double_Click for Symbol

The good thing about this is it should in theory stop just before it crashes and your method that crashes "could" show up in the debugger in black print (rest is in grey).

That being said I have only had success with it once where all your other ways have failed.

I couldn't really answer your question to number one. The only way I can think of is if your trying to do something that should technically work but the SDK wasn't designed that way and it crashes in some strange part of Apples code. This is all very if the wind is blowing in this direction and this speed it might crash though sorry.

Rudiger