为什么iOS崩溃不显示回溯?

时间:2013-08-13 16:14:27

标签: ios

我看到_pthread kill,UIApplication Main ..没什么用。

NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(0x31f483e7 0x39c43963 0x31e926d5 0x31ea0819 0x13e1f5 0x13e429 0x33d76579 0x33dca6f7 0x33dca581 0x33e1757d 0x33dc9921 0x33dc97d3 0x33e45383 0x33df1907 0x34031d05 0x33e4499f 0x33e42fab 0x33f64da3 0x92f81 0x33e6dc65 0x33df26ab 0x33df2485 0x33df1ddf 0x34031d05 0x33e4499f 0x33eb4573 0x33e007e1 0x92dfd 0x9379f 0x33d76579 0x33dcb1f7 0x33dcb13d 0x33dcb021 0x33dcaf4d 0x33dca699 0x33dca581 0x33d9b561 0x33d5a8c7 0x33b06513 0x33b060b5 0x33b34ecf 0x33e040e1 0x33e032cb 0x33e024af 0x33e02439 0x33f37cb9 0x33dc0683 0x33dc03c7 0x33dbfd2f 0x33db6e8b 0x33db2af5 0x33df41e1 0x9008f 0x33db7aa1 0x33db7625 0x33daf833 0x33d57d1f 0x33d577ad 0x33d571ef 0x35a6f5f7 0x35a6f227 0x31f1d3e7 0x31f1d38b 0x31f1c20f 0x31e8f23d 0x31e8f0c9 0x33dae46d 0x33dab2b9 0x8f739 0x8f6c0)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

我通过单步执行代码找到了问题。我有一个数组@ [self.foo],其中foo是一个未在NIB中设置的IBOutlet。

我问为什么撞车记者在坠毁时没有显示这条线? (为什么这会被贬低?)

2 个答案:

答案 0 :(得分:5)

这非常烦人,但你可以让xcode在异常点处中断。为此,在项目中,转到Breakpoint导航器,单击“+”按钮并选择“添加异常断点”

答案 1 :(得分:4)

您可以通过添加Object-C Exceptions断点来改善堆栈跟踪结果。转到断点选项卡,按左下角的加号,然后选择“添加异常断点”。在该窗口中,将“异常”字段从“全部”更改为“目标-C”。