Subject says it all really...Is there anywhere a good tutorial for Xcode's Debugger out there? I'm finding dribs and drabs of stuff but nothing comprehensive or that goes deep enough. My problem right now is that this...
#0 0x90d9c688 in objc_msgSend
#1 0x30506515 in NSPopAutoreleasePool
#2 0x30901697 in _UIApplicationHandleEvent
#3 0x32046375 in PurpleEventCallback
#4 0x30245560 in CFRunLoopRunSpecific
#5 0x30244628 in CFRunLoopRunInMode
#6 0x308f930d in -[UIApplication _run]
#7 0x309021ee in UIApplicationMain
#8 0x00001ff8 in main at main.m:14
...combined with this...
0x90d9c688 <+0024> mov 0x20(%edx),%edi
...and this...
EXC_BAD_ACCESS
...isn't helping much. Or at all, really. I'm resorting to commenting out lines of code and there has to be a better way.
Thanks
UPDATE: I guess perhaps my venting was a bit of a distraction from the real question, though the tips have helped explain things a bit. What I'm really getting at is not only an explanation of the above, but just use of the Debugger in general. The questions that I usually have are:
I know these are broad, and probably should be asked individually, but I didn't want to clutter the SO space with these topics that might already be documented elsewhere.
I also noticed there is a nearly duplicate question asked here: What are some Objective-c debugging tips?
You should turn on NSZombieEnabled to debug over-release issues like this:
http://cocoadev.com/index.pl?NSZombieEnabled
http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/
http://www.tomwhitson.co.uk/blog/2009/04/debugging-with-nszombiesenabled/
The crash is inside Apple's code (that's why debugger doesn't show you the source) and cause of it is actually somewhere else – you've released a temporary object that was supposed to be released by autorelease pool. This caused autorelease pool to crash.
You're supposed to release only objects which:
retain
init
, copy
and new
methods only (and their variants containing these words)Unfortunately you can't learn that one from the debugger, only from documentation and experience…
You can use Clang Analyzer to find such errors (sometimes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With