XCode 4.2 Debugger Fails To Symbolicate Stack Traces
November 14, 2011For whatever reason, Apple shipped Xcode 4.2 with rather puzzling debugger handling.
I have an unhandled exception handler set, yet often the application will terminate with this unhelpful stack trace:
2011-11-14 15:24:02.341 XXX[42981:f803] Exception:*** -[__NSArrayM objectAtIndex:]: index 80 beyond bounds [0 .. 79]
2011-11-14 15:24:02.343 XXX[42981:f803] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 80 beyond bounds [0 .. 79]'
*** First throw call stack:
(0x127a052 0x182ed0a 0x1266db8 0x5869 0x56fc 0x240b 0x35d9 0x127bec9 0x1ca5c2 0x1ca55a 0x26fb76 0x27003f 0x26f2fe 0x1efa30 0x1efc56 0x1d6384 0x1c9aa9 0x2167fa9 0x124e1c5 0x11b3022 0x11b190a 0x11b0db4 0x11b0ccb 0x2166879 0x216693e 0x1c7a9b 0x2128 0x2085)
terminate called throwing an exception(gdb)
I find it hard to believe that someone would find this acceptable enough to ship. How are hex addresses useful?
This is with GDB, the LLDB debugger has too many issues for me to use it. Often it seems to fail to recover when the application has quit, leaving the IDE unresponsive.
The one thing I really liked about using Visual Studio was the C++ debugger. For whatever reason Apple for the longest time seems unable to unwilling to devote resources to developing debuggers that actually work. Having two partially functional debuggers is not an improvement. GDB has been around a long time but the Xcode integration has always been halfwitted.
This used to work better prior to 4.2.
I can understand when an application fails to work correctly in unusual circumstances, but I've never found it acceptable to ship something that didn't do the common stuff correctly. Sometimes I find it ironic that Apple runs every app in the App Store through a battery of tests and at least person; maybe it would be helpful if it did the same with their own development tool.
I've tried AppCode from Jetbrains, but its debugger is flaky as well and trying to use both IDEs at the same time confuses both of them (AppCode doesn't handle everything Xcode does so you have to keep them both).
I think Apple needs someone for the Steve Jobs role to ensure shipping crap isn't acceptable. Now that's a job for me!