0

我看到_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。

我在问为什么崩溃记者在崩溃时没有显示这条线?(为什么这到底是被否决了?)

4

2 回答 2

5

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

于 2013-08-13T16:18:45.430 回答
4

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

于 2013-08-13T16:20:56.620 回答