Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SIGABRT doesn't show stack trace in iOS 5 simulator

When running my application in the iPad Simulator using iOS 5, if there is a SIGABRT error, it doesn't show the full stack trace as it did in iOS 4.3

Also the debugger doesn't stop in the line where the error occurred, but in the application's main method instead.

This makes it much harder to find the problem...

Does anyone know how to make iOS 5 behave as it did in 4.3? Is it possible?

This is what iOS 5 shows

2011-10-21 10:45:18.528 KBNavigator[9283:17603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull doubleValue]: unrecognized selector sent to instance 0x2b4ccd8'
*** First throw call stack:
(0x2ab6052 0x28d6d0a 0x2ab7ced 0x2a1cf00 0x2a1cce2 0x14ff1c 0x14e93c 0x10cdf1 0x105c88 0x133b40 0x135935 0x1532548 0x1534722 0x13e47c7 0x13e42c1 0xd1e3d66 0x13e728c 0x13e72b8 0x13e79ab 0x13ec288 0xd1e3ece 0xb5262 0xcf55f 0xb72c3 0x141d64e 0x141cc1c 0x144356d 0x142dd47 0x1444441 0x14444f9 0x163bc68 0x13fb4a1 0x13fc12b 0x163b4c7 0x1424427 0x142458c 0xd1fe280 0x14245cc 0xecdaf 0xf14e2 0xecb9d 0xd5d0e 0x135e88 0x107098 0x12d870 0x2ab7ec9 0x135a5c2 0x135a55a 0x13ffb76 0x140003f 0x13ff2fe 0x137fa30 0x137fc56 0x1366384 0x1359aa9 0x28b9fa9 0x2a8a1c5 0x29ef022 0x29ed90a 0x29ecdb4 0x29ecccb 0x28b8879 0x28b893e 0x1357a9b 0x18656 0x2be5 0x1)
terminate called throwing an exception

And this is for iOS 4.3

2011-10-21 10:46:40.066 KBNavigator[9381:14003] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull doubleValue]: unrecognized selector sent to instance 0x20d15e8'
*** Call stack at first throw:
(
0   CoreFoundation                      0x020645a9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x021b8313 objc_exception_throw + 44
2   CoreFoundation                      0x020660bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x01fd5966 ___forwarding___ + 966
4   CoreFoundation                      0x01fd5522 _CF_forwarding_prep_0 + 50
5   KBNavigator                         0x0014ff1c -[GXControlWheel controlToData:] + 1292
...
)
terminate called throwing an exception
like image 490
Marcos Crispino Avatar asked Oct 21 '11 13:10

Marcos Crispino


1 Answers

The easiest way to debug these sorts of errors is to add a breakpoint that fires on Objective-C exceptions. You can do so from this menu:

Exception menu

(Hat tip Naveen Shan)

like image 136
Benjie Avatar answered Oct 13 '22 20:10

Benjie