iOS如何调试崩溃没有堆栈跟踪像:[__NSArrayM objectAtIndex:]:index 0超出空数组的边界? [英] iOS how to debug crashes without a stack trace like : [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array?

查看:427
本文介绍了iOS如何调试崩溃没有堆栈跟踪像:[__NSArrayM objectAtIndex:]:index 0超出空数组的边界?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



*由于未捕获的异常'NSRangeException'终止应用程序,原因:'* - [__ NSArrayM objectAtIndex:]:index 0超出空数组的边界



有一点我花了4个小时尝试调试这样的错误。任何人都可以告诉我有没有办法查看这些错误的堆栈跟踪,以了解哪个对象导致错误的访问?



谢谢!

解决方案

在Xcode 4中,您可以在断点编辑器中设置异常断点。每次抛出异常(或根据您的设置方式进行捕获),您的应用程序将暂停在抛出异常的行上。


I'm trying to dismiss a modal view controller and am getting the following error:

* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

At one point I spent 4 hours trying to debug such error. Can anyone tell me if there's a way to look at stack traces for such errors to understand which object caused the incorrect access?

Thank you!

解决方案

In Xcode 4 you can set an exception breakpoint in the breakpoint editor. Every time an exception is thrown (or caught depending on how you set it up), your application will pause on the line that threw the exception.

这篇关于iOS如何调试崩溃没有堆栈跟踪像:[__NSArrayM objectAtIndex:]:index 0超出空数组的边界?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆