Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging iOS application: crash under Xcode but keep working on iPhone

I am trying to debug my iOS app on iPhone using Xcode.

I'm starting the app through Xcode debugger and application works fine for a couple of minutes. Then i'm getting error message from Xcode:

The app "myapp" on "iPhone_device" quit unexpectedly.
Message from debugger: Terminated due to signal 9

But application on iPhone keeps working like nothing happend.

Is this normal? What is the possible reasons of such Xcode behavior?

UPDATE: my app is VoIP application that working in background. I've just found out that this kind of apps can be started automatically in the background after the crash. Could this be an issue?

like image 782
Alexander Avatar asked Feb 03 '15 07:02

Alexander


2 Answers

Your app is most likely being terminated due to low memory. The best thing is to look at the device console using Xcode's Organizer:

If iOS is running out of memory and killing your app, you should see something like this:

The app "myapp" on "iPhone_device" quit unexpectedly.
Message from debugger: Terminated due to signal 9

You should use the Activity Monitor in Instruments to see how much memory your application is using.

You can also use the Memory Monitor instrument and enable graphing of "Physical Memory Free". If you see the graph approaching 0 before your crash you can be pretty sure it's a memory issue.

enter image description here

like image 110
Rushi Avatar answered Oct 05 '22 22:10

Rushi


This means that your app is using lot of memory and due to this the app is killed. Check for memory leakages.

like image 34
Fawad Masud Avatar answered Oct 06 '22 00:10

Fawad Masud