3

I'm writing an iPad app that is a "kiosk" app. The iPad should be hanging on the wall and the app should just run. I did a test, starting the app last night (Friday, December 31) and letting it run. This morning, when I woke up, it was not running. I just checked the iPad's console and I can't figure out why it crashed.

The iPad was plugged in and so the battery is not the issued. I did disable the idleTimer in my application delegate. The app was seen running as late as midnight last night.

I would like to note that my app acts as a Bluetooth server through Game Kit and large portion of the console output is occupied by bluetooth status messages.

When I opened the iPad, the app was paused and there was a system alert which prompted me to check an "Expiring Provisioning Profile". I tapped "dismiss" and the alert went away. The app crashed about a second after I dismissed the system alert.

Any ideas how I can diagnose this problem? Why would my app crash?

Here is my iPad's Console log, as copied from Xcode's organizer.

Edit:

A bit of Googling lead me to this site which says that alert views cause the app to lose focus. Could that be involved? What can I do to fix the problem?

EDIT2:

My Crash log describes the situation as:

Application Specific Information:

appname failed to resume in time

Elapsed total CPU time (seconds): 10.010 (user 8.070, system 1.940), 100% CPU

Elapsed application CPU time (seconds): 9.470, 95% CPU

Moshe
  • 57,511
  • 78
  • 272
  • 425

1 Answers1

0

Well, an expired provisioning profile would prevent the app from running, but the log error sounds like you are taking too long in either the applicationDidBecomeActive: or applicationWillResignActive: methods in your application delegate.

ughoavgfhw
  • 39,734
  • 6
  • 101
  • 123
  • The app runs. It was running for 10 hours. An expiring profile warning appeared and then the app lost "active" status. I think that's what caused it. Make sense? – Moshe Jan 02 '11 at 04:49
  • Yes, an alert causes the app to lose active status (see the second part of my post), but if your profile expired during the time it was running, it could have been quit by the system. – ughoavgfhw Jan 02 '11 at 04:52
  • My profile did not expire. It was a warning that my profile would expire in 29 days. – Moshe Jan 02 '11 at 04:58
  • The alert stayed up for about 8 hours or so before I dismissed it. – Moshe Jan 02 '11 at 04:58
  • applicationWillResignActive: is called before the alert comes up and applicationDidBecomeActive: is called after the alert is dismissed. Apple has a time limit on status change methods so that it doesn't look like the device is frozen, and will terminate an application that does not meet these limits. I would suggest timing these methods to make sure they do not run for more than a couple of seconds. – ughoavgfhw Jan 02 '11 at 05:20
  • @ughoavgfhw - Again, it't not my app. I just didn't dismiss the alert for a few hours. I was testing the app and I just let it run. I came a while later and the alert had been there for quite some time. Thanks though. – Moshe Jan 03 '11 at 00:27