Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone app crashes randomly without any error or stack trace

I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.

My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :

1.) How to get stack trace (I have tried NSZombie enabled and NSUnacughtExcpetion handler) but didn't worked

2.) I get Memory warning frequently in my app. How do I confirm whether it's the prime suspect for the above issue? (I have used Leaks, my app crashes when it has just 4Mb usage so I am not quite sure whether memory leak is causing it my app to crash. I know certain application which take heap memory more than 4MB .)

3.) What is the upper limit for Memory leak for an application in iOS before app crashes ?

4.) Would ARC help me in this situation ?

Also, I have tried to debug issue using NSLog statements but since it crashes randomly , it would be hard for me to detect the root cause using this technique.

Any ideas would be or help would be really appreciated

like image 453
Kunal Balani Avatar asked Dec 04 '22 16:12

Kunal Balani


1 Answers

My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue.

To confirm that it's a memory issue, sync your device with iTunes,and look in ~/Library/Logs/CrashReporter/MobileDevice/ for a files with LowMemory in their name. If you see (jettisoned) next to your app name, that confirms it was killed by iOS for using too much memory.

The only other way an app could exit without leaving a crash report is if it erroneously called exit().

For more information, see "Debugging Deployed iOS Apps", and "Understanding and Analyzing iOS Application Crash Reports".

like image 127
Vincent Gable Avatar answered Mar 25 '23 00:03

Vincent Gable