Detect application crash

Hello,

Is there a way to detect that an application or Watchface has crashed ?

I need that to adjust some parameters if the apps trigger a Code too long watchdog.

Thanks !
  • In the sim, you'll see an error in the console. On a devices, you'll see it in \garmin\apps\logs\ciq_log.txt

    Are you looking for some kind of automated way to find out about it, or have the app itself do something the next time it runs? I can't think of a way to do that.

    What are you doing where there's a chance you may trigger the watchdog? It might be you can do things a bit differently and avoid the watchdog timer all together.

    If you are doing something like sorting a large array, maybe a different algorithm, or something like building it sorted so you never have to sort the whole thing.
  • I have a watchface who may trigger the watchdog when drawing a graph with some dithering effects.

    If I can detect the crash, I can adjust some parameters on the next launch to avoid another crash.

    I have tried to use a properties flag (not saved if the apps crashes), but it doesn't work very well.
  • Former Member
    Former Member
    If your operation can trip the watchdog with certain parameters, I strongly suggest going with something simpler.

    If you are close to tripping the watchdog, the performance of your watchface is going to be extremely sluggish, and will likely have a poor user experience. It is also possible it would have a noticeable impact on battery performance.
  • Another thing to note, is even if you cut back on things to avoid the watchdog on one device, it may not work on others, as the watchdog varies by device. You can look in devices.xml to see what it is on a device, and maybe plan/test for the device with the shortest one.
  • Well thanks for the answers.
    The battery impact is almost nul as I draw the graph once every 100 screen updates and its not slow.

    Thanks again!