启用僵尸对象不足以帮助调试我的问题-我还能做什么? [英] Enable Zombie Objects is not enough to help debug my issue - what else can I do?

查看:114
本文介绍了启用僵尸对象不足以帮助调试我的问题-我还能做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下运行时错误,我无法确定我的生命WHYYYY.错误是Thread 1: EXC_BREAKPOINT (code=EXC_1386_BPT, subcode=0x0),这似乎发生在我从任何VC执行dismissModalViewController:animatedpushViewController:animated方法时.

I'm getting the following runtime error and I cannot determine for the life of me WHYYYY. The error is Thread 1: EXC_BREAKPOINT (code=EXC_1386_BPT, subcode=0x0) which seems to happen whenever I execute the dismissModalViewController:animated or the pushViewController:animated method from any of my VC's.

我已经启用了僵尸对象,并且在调试器2012-06-14 16:34:58.769 MyApp[5952:17903] *** -[MyDetailsVC respondsToSelector:]: message sent to deallocated instance 0x8c3d400中向我显示了以下消息.

I have enabled zombie objects and that shows me the following message in the debugger, 2012-06-14 16:34:58.769 MyApp[5952:17903] *** -[MyDetailsVC respondsToSelector:]: message sent to deallocated instance 0x8c3d400.

仅当我访问MyDetailsVC ViewController后,此发生.情况如下.

This ONLY happens after I access the MyDetailsVC ViewController. The scenario is as follows.

  • 启动该应用程序,一切正常,我可以推送到视图控制器并从中弹出,并显示和关闭模式VC,
  • 我按下MyDetailsVC,对其不执行任何操作,然后点击后退"按钮.
  • 我现在回到了推送到MyDetailsVC之前的位置,该应用程序继续正常运行,直到达到必须推送到VC​​或呈现模式VC的地步为止.然后,我得到运行时错误.

当我遇到错误时,MyDetailsVC甚至不在图片中,也与其他VC没有任何关系.

The MyDetailsVC is not even in the picture nor does it have anything to do with the other VC's when I encounter the error.

如何确定调试器的详细信息,以便确定问题所在?

How can I get more granular with the debugger in order to determine what this issue is?

此外,错误消息中写着"message sent"(消息已发送),因此我在VC中对我所有的NSNotifications进行了评论,以排除我的一个VC试图向VC发送消息的可能性.不再活着……没有运气!

Also, the error message says the words "message sent", so I've pretty much commented all of my NSNotifications in my VC's to rule out the chance that one of my VC's is trying to send a message to a VC that is no longer alive... no luck!

PS-我正在使用带有ARC的Xcode 4.3.1、5.1

PS - I'm using Xcode 4.3.1, 5.1 w/ ARC

推荐答案

调试器中的回调堆栈中没有任何内容可以向您显示代码的哪一行?

Nothing in callback stack in debugger to show you which line of your code is happening?

respondsToSelector在委托上被调用很多(以查看协议中是否实现了可选方法).您的MyDetailsVC是否将自己分配为任何内容的委托?如果是这样,请确保在您的dealloc例程中分配xyz.delegate = nil.

respondsToSelector is called a lot on delegates (to see if an optional method in a protocol is implemented). Did your MyDetailsVC assign itself as a delegate to anything? If so, be sure and assign xyz.delegate = nil in your dealloc routine.

因此,您可能拥有"self.navigationController.delegate =自我".因此,在您的dealloc例程中需要一个匹配的"self.navigationController.delegate = nil".

So you probably have "self.navigationController.delegate = self". So, you need a matching "self.navigationController.delegate = nil" in your dealloc routine.

这篇关于启用僵尸对象不足以帮助调试我的问题-我还能做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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