使用仪器时应用程序因某些操作而崩溃,如何查找原因?
我有一个带有导航控制器和几个子控制器的应用程序。
- 使用 XCode 调试我找不到任何错误。
- 当 iPhone 不插电运行时,我找不到任何错误。
- 使用 Instruments 在模拟器上运行应用程序时,它不会崩溃。
- 当 Instruments 在 iPhone 上运行该应用程序时,当我在某些 ViewController 之间来回单击时,它会崩溃。这种情况不是每次都会发生,但经常发生。
我的老板还报告说,在他的 iPod 上有时会崩溃,所以我现在很困惑。我应该如何进行? (对于乐器来说仍然很新)。我如何找出导致应用程序崩溃的原因? 有没有办法在调试器旁边启动仪器?崩溃日志并不能告诉我太多信息,或者也许我不知道如何正确阅读它们。
I have an App with a Navigation Controller, several sub Controllers.
- With XCode Debug I can't find any errors.
- With iPhone running unplugged, I can't find any errors.
- With Instruments running the App on Simulator it doesn't crash.
- With Instruments running the App on iPhone it crashes when I click forth and back between certain ViewControllers. It's not happening everytime, but very often.
My boss also reported that on his iPod it crashes sometimes, so I'm quite confused now. How should I proceed ? (still quite new to instruments). How can I find out what makes the app crash ?
Is there a way to launch instruments next to debugger ? Crash Logs don't tell me much, or maybe I don't know how to read them correctly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对乐器的体验显然是复杂的。有时会出现我无法解释的崩溃。当我不使用仪器时,其中一些崩溃就不会发生。也就是说,仪器也可以提供有用的信息,而您的情况可能就是其中之一。
根据您的描述,有可能是内存泄漏。所以我建议在模拟器上使用仪器运行它来查找泄漏。 [在 xCode 中,选择 Run>Run with Performance tool>leaks,然后单击出现的 Instruments 窗口中的 Leaks 面板。]
My experience with instruments is decidedly mixed. Sometimes there are crashes that I can't explain. And some of these crashes don't happen when I am not using instruments. That said, instruments can also provide useful information, and your situation may be one of those times.
Based on your description, it is possible that you have memory leaks. So I would suggest running it on the simulator with instruments to look for leaks. [In xCode, select Run>Run with performance tool>leaks, then click on the leaks panel in the instruments window that comes up.]