hanumanDev
hanumanDev

Reputation: 6614

app crashing on device

the app I've installed on an iPhone 3G device periodically crashes. I'm wondering if it's the device or the code. the code works fine on the simulator.

I have other apps from the app store that do the same thing. e.g. the stackoverflow app - whenever I do a search the app crashes. I've even had the iPod app crash too.

I've restored the phone a few times and still the same thing. I'm getting ready to upload the app to the app store and was wondering if anyone had any tips to make sure that my code is not the problem. it's difficult to tell because there are no errors in the simulator or memory leaks in Instruments

thanks in advance.

Upvotes: 1

Views: 192

Answers (3)

Eiko
Eiko

Reputation: 25632

It most certainly is your code that crashes.

Run in debug mode and watch the console (real debug mode, not only the debug target).

Also, you can (and should) grab the crash report from the organizer. You can also watch the device's console there.

Upvotes: 2

nacho4d
nacho4d

Reputation: 45118

Are you sure you are not running out of memory? the easiest way to see if this is your problem is to implement didReceiveMemoryWarning method of your controllers and check if they are called. In the simulator you can simulate a memory warning but I am not sure if even in simulator app will crash if memory is not released. (I believe not)

Also run your app with instruments, using allocations: Run > Run with performance tools > Allocations. And use your app for a while and you will see. ;)

Upvotes: 2

Liam
Liam

Reputation: 8092

You can be guaranteed that it is your code. Run it in the debugger on the device and see where it is crashing. If you are getting EXC_BAD_ACCESS use the following to help track it down

http://www.cocoadev.com/index.pl?NSZombieEnabled

Upvotes: 2

Related Questions