XCode仪器 - 分配仪器没有找到僵尸 [英] XCode Instrument - Allocations Instrument not finding zombies

查看:244
本文介绍了XCode仪器 - 分配仪器没有找到僵尸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Xcode 4.4.1并构建iOS应用程序。我的应用程序崩溃并且有内存问题(我知道因为它崩溃在 objc_msgSend )。

I'm running Xcode 4.4.1 and building an iOS app. My app is crashing and has a memory issue (I know because it is crashing on objc_msgSend).

所以我我正在运行Zombies Instruments工具。问题是,它运行没有错误,没有关于我的僵尸的帮助:

So I am running the Zombies Instruments tool. The problem is, it runs without error and no help about my zombies:

如果我关闭Zombie检测,那么程序可以预测崩溃。我是否正确使用Zombie工具?或者这表明我有不同的问题?

If I turn off Zombie detection then the program crashes predictably. Am I using the Zombie tool incorrectly? Or does this indicate I have a different problem?

无用的堆栈跟踪如下......

useless stack trace follows...

#0  0x0212a09b in objc_msgSend ()
#1  0x01bd36b7 in -[NSError dealloc] ()
#2  0x0212ae3d in _objc_rootRelease ()
#3  0x01bc1f28 in -[NSFilesystemItemRemoveOperation dealloc] ()
#4  0x01bb0e16 in -[NSOperation release] ()
#5  0x0212ae00 in objc_release ()
#6  0x0212bc50 in (anonymous namespace)::AutoreleasePoolPage::pop(void*) ()
#7  0x004faea8 in _CFAutoreleasePoolPop ()
#8  0x004fd80b in __CFRunLoopRun ()
#9  0x004fcd84 in CFRunLoopRunSpecific ()
#10 0x004fcc9b in CFRunLoopRunInMode ()
#11 0x02ca57d8 in GSEventRunModal ()
#12 0x02ca588a in GSEventRun ()
#13 0x0127a626 in UIApplicationMain ()
#14 0x00002e5d in main at /Users/willentriken/Developer/EnglishStudy/EnglishStudy/main.m:16
#15 0x00002dc5 in start ()


推荐答案

有一个在ARC和NSZombieEnabled下的6.0之前的iOS(以及10.8之前的Mac OS)中的错误阻止了实例变量和属性的自动释放。

There's a bug in iOS before 6.0 (and Mac OS before 10.8) under ARC and NSZombieEnabled that prevents automatic release of instance variables and properties.

这解释了你所看到的,因为对象会只是泄漏而不是变成僵尸。

That explains what you see, because objects would just leak instead of turning into Zombies.

解决方案:在iOS 6.0下测试。

Solution: Test under iOS 6.0.

其他信息:问题在5.1模拟器中测试时,在Mountain Lion下会持续存在。

Additional info: The problem persists under Mountain Lion when testing in the 5.1 simulator.

这篇关于XCode仪器 - 分配仪器没有找到僵尸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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