NSZombie崩溃的应用程序,当启用在iPhone上 [英] NSZombie crashing app when enabled on the iPhone

查看:201
本文介绍了NSZombie崩溃的应用程序,当启用在iPhone上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了NSZombieEnabled到我的可执行文件的环境,以跟踪一个对象,我超过释放。我现在发现,是我的应用程序的一部分崩溃,从来没有崩溃以前,只有当NSZombieEnabled被切换。我禁用它,不会发生崩溃。

I added NSZombieEnabled to my executable's environment in order to track down an object that I'm over releasing. What I'm finding now, is that a part of my app is crashing that never has crashed before, only when NSZombieEnabled is toggled on. The moment I disable it, no crash occurs.

我需要对我的代码进行取证,但这可能意味着什么? NSZombieEnabled保持正在发送释放消息的对象。这可能会导致我崩溃,但是应该吗?

I need to do forensics on my code, but what can this possibly imply? NSZombieEnabled keeps objects around that are being sent the release message. This might be causing me to crash, but should it?

此外,设置断点 - [_ NSZombie methodSignatureForSelector:]不会真正给我一个精心制作足够的堆栈跟踪知道发生了什么。

Also, setting the breakpoint -[_NSZombie methodSignatureForSelector:] doesn't really give me an elaborate enough stack trace to know what's going on.

推荐答案

如果你的应用程序崩溃与NSZombieEnabled,它有一个很好的机会崩溃与禁用,只是不是很快, 。

If your app crashes with NSZombieEnabled, there's a good chance it crashes with it disabled, just not as soon and not as obviously.


NSZombieEnabled保持正在发送释放消息的对象。这可能会导致我崩溃,但是应该吗?

NSZombieEnabled keeps objects around that are being sent the release message. This might be causing me to crash, but should it?

不,它不会导致崩溃。导致崩溃的原因是向对象发送过多的释放消息。这是NSZombieEnabled是为了。

No, it doesn't cause you to crash. What causes you to crash is sending too many release messages to an object. That's what NSZombieEnabled is for.


此外,设置断点 - [_ NSZombie methodSignatureForSelector:]不会真正给我一个精心制作足够的堆栈跟踪

Also, setting the breakpoint -[_NSZombie methodSignatureForSelector:] doesn't really give me an elaborate enough stack trace to know what's going on.

尝试使用Instruments中的ObjectAlloc预设。

Try using the ObjectAlloc preset in Instruments.

这篇关于NSZombie崩溃的应用程序,当启用在iPhone上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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