运行应用程序时出错

时间:2012-01-02 04:20:01

标签: objective-c ios xcode

这是我在运行应用程序时获得的日志控制台中的错误。我不明白哪里出了问题。

如果有人知道发生了什么事,我将非常感激。

2012-01-01 21:09:04.821 Grocery Finder[242:1f03] void SendDelegateMessage(NSInvocation*): delegate (webView:decidePolicyForNavigationAction:request:frame:decisionListener:) failed to return after waiting 10 seconds. main run loop mode: _kCFURLConnectionPrivateRunLoopMode
2012-01-01 21:09:05.121 Grocery Finder[242:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(0x341c98bf 0x344191e5 0x34121275 0x29e47 0x2ab91 0x375b46b5 0x3760faf1 0x375d0d21 0x375d0a71 0x375d078b 0x375d04ff 0x3758781b 0x3758cfb9 0x34cdeba7 0x36dfde8d 0x3419c2dd 0x3411f4dd 0x3411f3a5 0x309a3fcd 0x375a0743 0x207b 0x2034)
terminate called throwing an exception

2 个答案:

答案 0 :(得分:2)

正如日志消息所述,您正在请求空数组中索引1处的项目。

[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'

答案 1 :(得分:0)

此外,您可以发布代码以检查您尝试访问NSArray中的越界项目的位置。