Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App being force-quit / crashing - how to debug

I've been developing a replacement exercise app (as I want to be able to get proper split times out of it). I've configured the app to allow the run in background, Internet and Exercise permissions so that my custom exercise is recorded as such (OK it's "Aerobic Workout" but it'll do till that bug is squashed.

 

Sometimes, however, my app just … vanishes. I go to record a lap split, and it's just at the clock screen. Usually, it works for at least a dozen laps or about 20 minutes; sometimes longer, sometimes much less.

 

In a vain attempt to capture what's happening, I have a try/catch around the content of each and every function, which pops up an exception dump on an overlay - this works, for example if I try to call a non-existent method on an object (e.g. myDate.launchRocket()). When the app "just crashes" the exception handlers don't trigger.

 

How on earth do I go about finding out what's causing this? I've seen old references to notification popups closing apps, but generally I'm 50m away from my phone, in the pool so I thought I wouldn't receive any.

Best Answer
0 Votes
3 REPLIES 3

It could be appTimeoutEnabled. That, and some other possibilities, are described here.

Peter McLennan
Gondwana Software
Best Answer

Thanks - I'd not found that resource in my hunting around.

 

It seems that it is appTimeoutEnabled, and now all I have to do is work out why I can't disable it.

Best Answer
0 Votes

Well - I was wrong. I actually caught it crashing today, and I think the circumstances were something like this:

  • Started exercise at about 14:30;
  • Button called onSplitLap about every 1m18s;
  • Button paused exercise after 10 laps;
  • Resumed, another 10 laps and paused;
  • Resumed, another 10 laps and paused;

So at this point I have 30 laps up on my app, it's sitting at about 38 minutes total. Exercise is paused, timers are paused. Because I'm in the water, the screen turns itself off; then when I pulled my arm out of the water, the screen turned on, and the app immediately closed - no notification or anything.

What's annoying is that I don't even have any logs on the phone - despite sideloading rather than using the store link, all the log messages appear to have been lost/missed (perhaps because the phone was 100m away from the pool?)

So I'm stumped again.

Best Answer
0 Votes