随机崩溃和奇怪的控制台输出

发布于 2024-11-28 22:43:07 字数 435 浏览 3 评论 0原文

我编写了整个应用程序,正准备将其提交到应用程序商店,在最终测试中,我返回并添加了一些版本以确保观察到正确的内存管理。从那时起,我不断遇到这些随机崩溃。我尝试删除部分或全部发布调用,我尝试保留对象。我清理了该项目。我使用了 NSZombieEnabled,但这也没有帮助。这一切都于事无补。

大多数时候,控制台说不提供任何帮助。通常应用程序加载时,我将 NSLogs 放入 viewDidLoadviewDidAppearviewWillAppear 中,它们都显示在控制台,然后崩溃。

有时我也会得到EXC_BAD_ACCESS(我知道这意味着什么)。但它是随机发生的。所以这对我来说没有意义。感谢您提供任何可能的帮助。我写了整个应用程序,并花了几个月的时间。所以我真的被困住了。谢谢。

I wrote an entire app, and I was just about to submit it to the app store, and in my final testing, I went back and added a few releases to ensure proper memory management was observed. And since then, I keep getting these random crashes. I've tried removing some or all of the release calls, I've tried retaining objects. I cleaned the project. I used NSZombieEnabled and that also is not helping. All this to not avail.

Most of the time, the console says provides no help. Usually the app loads, I put NSLogs in viewDidLoad, viewDidAppear, and viewWillAppear, and they all show up in the console, then it crashes.

Sometimes I also get EXC_BAD_ACCESS (and I know what that means). But its occurring randomly. So this doesn't make sense to me. Thanks for any help possible. I've written this whole app, and spent months on it. So I'm really stuck. Thank you.

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

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

发布评论

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

评论(3

七堇年 2024-12-05 22:43:07

您是否尝试过构建 -->分析?它将搜索您的代码以查找泄漏和您可能错过的其他有用的东西。尝试一下,看看是否能找到适合您的东西。

Have you tried Build --> Analyze? It will search your code for leaks and other useful things you might have missed. Try that and see if it finds anything for you.

滴情不沾 2024-12-05 22:43:07

我同意鲁迪的观点。听起来您正在发布仍在使用的东西。我会返回到正在运行的版本,并开始一次添加一个版本,直到导致崩溃。缓慢但有效的调试。

I agree with Rudy. It sounds like you're releasing something that is still in use. I would go back to the version that was working and start adding the releases one at a time til it causes the crash. Slow but effective debugging.

淡笑忘祈一世凡恋 2024-12-05 22:43:07

当您说您“有时”获得 EXC_BAD_ACCESS 时,其余时间您会获得什么?崩溃堆栈在哪里表明您正在崩溃?您收到什么消息?

随机崩溃通常表明存在时序问题。一个常见的原因是在多个线程上访问事物。你是?它还可能意味着基于网络流量的时间差异。

确保控制台不指示异常而不是内存违规。通常控制台中有一些有用的东西。

When you say that you "sometimes" get EXC_BAD_ACCESS, what do you get the rest of the time? Where does the crash stack indicate you're crashing? What messages do you get?

Random crashes usually indicate a timing problem. A common cause is accessing things on multiple threads. Are you? It can also mean timing differences based on network traffic.

Make sure the console doesn't indicate an exception rather than a memory violation. Usually there's something in the console that will be useful.

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