R – iPhone + application crash on device

crashiphone

I have developed an iPhone application with Snow Leopard (10.6.2) and Xcode (3.2.1). As many of us know that in this new version of Xcode we get facility of Build and Analyze (to check memory leaks and other issues). When I build and analyze my application, it gives me no error / no warnings.

My application runs fine on simulator also.

Now, I try to test the application on iPhone device (device configuration: iPhone 2G and iPhone OS 3.0) with 8GB memory.

The problem is that application starts well on iPhone device but after some time, it crashes.

When I see the console from Window->Organizer->Console. I see following error:

Tue Dec 22 17:17:39 unknown SpringBoard[27] : Memory level is urgent (8%) and there are no background apps to ask to exit.

Best Answer

The analyzer will only detect the most obvious memory issues. You should give your app a quick run through instruments leak checking.

Go to Run -> Run with performance tool -> Leaks

Instruments will start up and it will appear very confusing if you did not use it before. It is best to consult the Instruments documentation at this point for further clarification of whats going on.

I will be shure there are plenty of leaks in your App and with Instruments you can find and debug even the hardest memory issues.