信号 11,iphone App 退出时出现分段错误 [英] Signal 11, segmentation fault on iphone App exit

查看:34
本文介绍了信号 11,iphone App 退出时出现分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 iPhone 应用程序.它似乎运行良好.当我将配置的 iphone 连接到 Xcode 并运行应用程序时,管理器窗口中的控制台日志总是在使用 home 键退出应用程序时抱怨分段错误.

有没有其他人看到过这个,你知道问题可能是什么吗?我使用线程在后台加载网页,但退出时我停止了线程.

我的应用确实保存了一些持久性信息.当我使用构建和分析函数时,我得到了一些潜在的内存泄漏,但在每种情况下,我都在分配一个对象并将其保存在一个数组中.

有什么想法吗,或者这正常吗?

解决方案

尝试使用 NSZombieEnabled 运行您的应用程序.这将告诉您是否过度释放任何对象.要启用僵尸,请执行以下操作:

<块引用>

  1. 选择 Project > Edit Active Executable 打开可执行信息窗口.
  2. 点击参数.
  3. 单击要设置的变量"中的添加 (+) 按钮环境"部分.
  4. 在 Name 列中输入 NSZombieEnabled,在 Value 列中输入 YES.
  5. 确保选中 NSZombieEnabled 条目的复选标记.

I have an iphone app. It seems to run fine. When I connect to a provisioned iphone to Xcode and run the App, the console log in the Organizer window, always complains about a Segmentation fault when quitting the app with the home key.

Has anyone else seen this, and do you have an idea of what the problem might be? I use a thread to load web pages in the backround, but I stop the thread when exiting.

My app does save some persistent information. When I use the build and analyze function I get some 2 potential memory leaks, but in each case I'm allocating an object and keeping it in an array.

Any ideas, or is this normal?

解决方案

Try running your application with NSZombieEnabled. This will tell you if you're over releasing any object. To enable zombies do the following:

  1. Choose Project > Edit Active Executable to open the executable Info window.
  2. Click Arguments.
  3. Click the add (+) button in the "Variables to be set in the environment" section.
  4. Enter NSZombieEnabled in the Name column and YES in the Value column.
  5. Make sure that the checkmark forthe NSZombieEnabled entry is selected.

这篇关于信号 11,iphone App 退出时出现分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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