NSZombie 未登录到控制台

发布于 2024-09-13 00:05:41 字数 127 浏览 5 评论 0原文

我的一个表视图出现 EXC_BAD_ACCESS 错误。我尝试将 NSZombieEnabled 键添加到可执行文件环境变量中。

屏幕似乎不再崩溃,但我没有从日志中收到任何消息来指示发生了什么

我做错了什么?

I am getting an EXC_BAD_ACCESS error on one of my table views. I have tried adding the NSZombieEnabled key to the executables environment variables.

It seems to be working in that the screen no longer crashes, but I do not get any messages from the log to indicate what's going on

What am I doing wrong?

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

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

发布评论

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

评论(2

朕就是辣么酷 2024-09-20 00:05:41

NSZombieEnabled 仅捕获因过度释放对象而导致的崩溃,但 EXC_BAD_ACCESS 可能是由其他问题引起的。如果您没有收到僵尸警告,则崩溃是由其他原因引起的。

在表上,最常见的原因是行或节的索引错误,导致表询问向表提供数据的数据结构中不存在的位置处的数据对象。

NSZombieEnabled just catches crashes caused by over releasing objects but EXC_BAD_ACCESS can be caused by other issues. If you don't get a zombie warning, then the crash is arising from another source.

On a table, the most common cause would be getting the indexes of rows or sections wrong causing the table to ask data objects at non-existant locations in the data structure that provides the data to the table.

不忘初心 2024-09-20 00:05:41

正如 TechZen:指出的那样,EXC_BAD_ACCESS 可能是由其他原因引起的,而不是过度释放对象(您本质上使用 NSZombie 检查的内容)。尝试查看调试器并查看当出现异常时调试器停止在哪一行,因为它可能是任意数量的内存相关问题(越界错误、初始化等)。

as TechZen: pointed out, EXC_BAD_ACCESS can be caused from other sources than over releasing objects (what you use NSZombie to check for essentially). Try looking in the debugger and see what line the debugger stops on when you get the exception, because it can be any number of memory related issues (out of bounds errors, initialization, etc).

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