运行错误将我发送到我没有编写的代码
每当我单击某个按钮时,该应用程序总是会死机,并且我会被发送到:
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
THIS LINE ==> int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
对于熟悉的人,您知道我没有编写此代码。我不知道如何找出我的错误在哪里!
另外,输出显示了这一点:
2011-10-27 21:03:17.690 My Program[55441:207] Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x68181f0>.
(lldb)
在找到问题之前,我不知道该在哪里查找缺少逐行注释掉代码的地方。有什么建议吗?
Whenever I click a certain button, the app always dies and I'm sent to:
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
THIS LINE ==> int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
For those who are familiar, you know that I didn't write this code. I don't know how to find out where my error is!
Also, the output shows this:
2011-10-27 21:03:17.690 My Program[55441:207] Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x68181f0>.
(lldb)
I don't know where to look short of commenting out code line by line until I find the issue. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能正在运行这样一个事实:Xcode 4.2 大多数时候不显示堆栈跟踪。检查这个SO帖子。
Xcode 4.2 调试不表示堆栈调用
You are likely running the fact that Xcode 4.2 does not show stack traces most of the time. Check this SO post.
Xcode 4.2 debug doesn't symbolicate stack call
在按钮上单击,新的
UIView
被推送到Window
中。该视图的 .xib 的链接很糟糕(链接到代码中不再存在的IBOutlet
,因为它已重命名)。我在
Interface Builder
中设置了正确的链接,并且不再出现错误。我希望 xcode 至少会告诉您您的 .xib 文件之一有问题。第 2 部分
修复后不久,我再次收到此错误。在在网络上搜索了一下后,我发现它可能与内存泄漏有关,所以我跑了
项目->分析
工具。当我修复 Xcode 的建议时,一切都运行良好。on the button click a new
UIView
is pushed into theWindow
. That view's .xib had linkage that was bad (linked to anIBOutlet
that didn't exist in code anymore because it was renamed).I set up the correct linkage in
Interface Builder
and I no longer got the error. I wish xcode would at least tell you there's a problem with one of your .xib files.PART 2
Shortly after that fix I was getting this error again. After searching the web for a bit, I found that it could be related to a memory leak so I ran the
Project->Analyze
tool. When I fixedXcode
's suggestions, everything ran fine.