跟踪“发送到已释放实例的消息"通过仪器 [英] track "message sent to deallocated instance" via instruments

查看:81
本文介绍了跟踪“发送到已释放实例的消息"通过仪器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XCode 4.2中,我需要一些有关Instruments的帮助来跟踪EXC_BAD_ACCESS错误的原因.启用NSZombie标志后,当应用程序在设备上崩溃时,我会在控制台上看到以下内容.

In XCode 4.2, I need some help with Instruments to track down cause of EXC_BAD_ACCESS error. After enabling the NSZombie flag, I see the following on console when the app crashes on the device.

*** -[__NSArrayM removeObject:]: message sent to deallocated instance 0x8674e30

我使用了Instruments,但没有看到Zombie的个人资料.我使用了分配"配置文件,但很快就迷路了.我为应用程序启用了ARC(以希望摆脱alloc/retain/release)-但仍然存在相同的问题.

I used Instruments, but don't see the profile for Zombie. I used Allocations profile, but quickly got lost. I enabled ARC (in a hope to get rid of alloc/retain/release) for the app - but still have the same problem.

如何使用Instruments进行追踪?

How do I use Instruments to track this down?

推荐答案

您在视图层次结构中是否有任何* UIScrollView *,是否向他们发送诸如scrollToVisibleRect:animated :?等消息?

Do you have any *UIScrollView*s in your view hierarchy and are you sending them messages like scrollToVisibleRect:animated:?

如果是,请尝试为动画参数传递否".看来iOS5可能在滚动视图和嵌入式动画方面存在一些问题.您所看到的完全相同的崩溃使我发疯了几天(没有可用的调用栈),我终于将其范围缩小到滚动视图调用. 希望对您有所帮助.

If so, try to pass NO for the animated parameter. It appears that iOS5 may have some issues with scroll views and embedded animations. The same exact crash you are seeing had been driving me crazy for a few days (with no call stack available) and I finally narrowed it down to the scroll view call. Hope it helps.

这篇关于跟踪“发送到已释放实例的消息"通过仪器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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