Reputation: 64834
My iOS app is randomly crashing but I don't get any warning/error in the console. I think it might be a memory leak but shouldn't I receive a EXC_BAD_ACCESS error at least ?
The other thing might be a memory overloading, but I don't get any memory warning and I've just tested the app with the instruments tool.
So why does it crash without printing anything in the console ?
Thanks
UPDATE: I'm actually getting a memory warning in the instruments although I don't see the memory to increase. COuld be the cause of the crash ? How do i know where is the memory warning generated ? (See screenshot: )
Upvotes: 1
Views: 199
Reputation: 6803
Tell your program to print a backtrace every time it receives a low memory warning.
From Apple documentation:
UIKit provides several ways to receive low-memory notifications, including the following:
- Implement the
applicationDidReceiveMemoryWarning:
method of your application delegate.- Override the
didReceiveMemoryWarning
method in your custom UIViewController subclass.- Register to receive the
UIApplicationDidReceiveMemoryWarningNotification
notification.
Upvotes: 1
Reputation: 137
Enable Zombie objects and try again. https://stackoverflow.com/a/8050701/1271579
Edit: If the device runs out of memory, you will recieve a few memory warnings before crashing so you should probably optimize it.
Upvotes: 0