English 中文(简体)
Signal 11, segmentation fault on iphone App exit
原标题:

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.
问题回答

Upon exit your application can over-release an object try dumping each object before releasing it or do some debugging in dealloc method.

Perhaps you are releasing some object more times than its retain count. Comment out -release calls in your dealloc methods (or elsewhere) until you find the culprit.

Then uncomment-out that call and look elsewhere in your code where you are trying to over-release that object.

If you are using convenience methods, for example, (e.g. [NSString stringWithFormat:@"..."]) as opposed to alloc-init methods (e.g. [[NSString alloc] initWithFormat:@"..."]) the resulting convenience object is autoreleased and should not be manually released.

My problem was uididfaker and locationholic from cydia, and after uninstalling them xcode run on my iphone just fine.





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签