SIGABRT在iOS 5模拟器中不显示堆栈跟踪

前端之家收集整理的这篇文章主要介绍了SIGABRT在iOS 5模拟器中不显示堆栈跟踪前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当使用iOS 5在iPad模拟器中运行我的应用程序时,如果存在SIGABRT错误,则不会像iOS 4.3中那样显示完整的堆栈跟踪

调试器也不会在发生错误的行中停止,而是在应用程序的主方法中停止.

这使得很难找到问题…

有没有人知道如何使iOS 5的行为与4.3中的一样?可能吗?

这是iOS 5显示

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

这是针对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

解决方法

调试这些错误的最简单的方法添加一个在Objective-C异常上触发的断点.您可以从此菜单中进行:

(帽子Naveen Shan)

猜你在找的iOS相关文章