iPhone 应用程序崩溃 - NSZombie 输出问题

发布于 2024-11-24 06:43:52 字数 464 浏览 2 评论 0原文

当我使用 popViewController 时,我的应用程序崩溃了。使用 NSZombie 时,我得到以下信息:

2011-07-15 13:20:03.334 Question[27412:207] *** -[CFString release]: message sent to deallocated instance 0x4c8a090

我不完全确定如何解释这一点或如何找到所引用的实例...

当我添加以下行时,应用程序崩溃:

-(void) finishQuestionnaire:(id)sender{
    //go back to main manual
    [self.navigationController popViewControllerAnimated:YES];
}

我不认为这是问题,我认为无论其加载是什么问题......

My application is crashing when I use popViewController. When using NSZombie I get the following:

2011-07-15 13:20:03.334 Question[27412:207] *** -[CFString release]: message sent to deallocated instance 0x4c8a090

I'm not entirely sure how to interpret this or how to find the instance being referred to...

The app crashes when I add the following line:

-(void) finishQuestionnaire:(id)sender{
    //go back to main manual
    [self.navigationController popViewControllerAnimated:YES];
}

I don't think this is the problem, I think whatever its loading is the problem...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

简单气质女生网名 2024-12-01 06:43:53

根据您提供的信息,我可以说您正在使用已经发布的 NSString 对象。如果您在仪器中使用过 NSZombie,您可以找到 viewController 的堆栈跟踪以及崩溃的方法。找到您正在访问的对象会很容易。

From your given info i can say that you are using a NSString object which you have already released. If you have used NSZombie in instruments you can find the stack track with the viewController and the method where it is crashing. It would very easy to find the object which you are accessing.

旧城空念 2024-12-01 06:43:53

这意味着你已经释放了对象,并且再次使用释放的对象。通过使用保留属性,你可以处理这个错误。我想告诉你的另一件事是,在将构建发送给任何人之前,将 NSZombieEnabled 删除为 NO

This means you have released on object and again you are using the released object.by using the retain property you can handle this error.And one more thing i would like to tell you is before sending the build to anyone remove the NSZombieEnabled to NO

月寒剑心 2024-12-01 06:43:52

我遇到了类似的问题,我花了一整天的时间来解决这个错误......在我的例子中,有一个像
这样的字符串
str = [[NSString alloc] initWithString:@"a string"];

然后我

str = [NSString stringWithFormat:@"%@",aVarible];

就解决了......

I had similar problem and I've wasted whole day to solve this error... in my case there were a string like
str = [[NSString alloc] initWithString:@"a string"];

then i chanched like

str = [NSString stringWithFormat:@"%@",aVarible];

and it was solved...

赏烟花じ飞满天 2024-12-01 06:43:52

看来您过度释放一个对象(NSString),即释放一个已经释放的对象。看看你是否已经在某处释放了该字符串。

It seems you are over releasing an object(NSString) ie., releasing an already released object. See if you have released the string somewhere already.

夜深人未静 2024-12-01 06:43:52

如果您启用了 NSZombie ,那么它应该在引用已释放对象的行上中断,不是这种情况吗?

根据上面的消息,您正在尝试释放已释放的 NSString 的实例。

If you have NSZombie enabled then it should break on the line where you're referencing the deallocated object, is this not the case?

According to the message above you're trying to release an instance of an already deallocated NSString.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文