Fatal Error During ActivityRecording

Hi guys,

I’ve been working on a running app for the past few weeks.  It uses ActivityRecording.  I’ve been able to make some good progress on it, and it normally runs fine, but I’ve got a fatal bug I can’t find.  The app will run just fine for a while, but then randomly crash, and completely reboot the device (vivoactive 3).  When it starts back up, the default run activity comes up in the paused state.  There is no error log.  This crash seems more prevalent when I stop suddenly after a few minutes of continuous running.  Has anyone else seen anything like this before?  I don’t think that it’s a problem with null or division by 0, because the app works fine when the watch is sitting on a table and the distance is 0. 

Thank you in advance!

Lance

  • Is there anything about the conditions where it happens?  Does it only happen after a certain time, distance, etc?  Smart recording or 1 sec?

    Are you low on space with the file system?  You see any clue in the err_log file?

    If when the watch boots and you see the native app, go ahead and save it, then copy it to your pc/mac and play it back in the sim.  Could be that will help id things, by looking at memory usage, etc.

  • Thanks Jim!  I can always count on you for a quick answer!

    I get the error most often at 3 minutes and four seconds. A lot of the time, it works just fine and gets to 15-40 minutes before it crashes.  I have a lot of memory available. I only use about 25kB out of 124kB. It seems like I can get it to crash more regularly when I’ve stopped running, but not stopped the activity. However, I went four miles today, stopping regularly, and wasn’t able to get it to crash once. Unlike the IQ! Crashes, there isn’t an error log in ciq_log.

    I’ve added a setProperty to onUpdate, that stores all the values I access, each second. It prints on the next app open. That way if an error occurs, I can find out what data caused it.  Hopefully I’ll get some results soon! 

    I use smart recording, not 1 second.

    Great idea on using the fit file in the sim. Next time the app crashes, I’ll have to try that!

    Thanks again for your ideas!

    Lance

  • Thanks again Jim!

    Very interesting log file. It looks like the log file in this post: https://forums.garmin.com/developer/connect-iq/f/discussion/7386/watch-app-stops-randomly-after-running-for-1-hour/49996#49996

    Here’s the file. Is there any way to interpret it?


    2700 (vívoactive 3) SW ver: 740
    Build Type: RELEASE
    Commit:e1a84cff08a398614df293f83a97565a538e8c24
    ESN: 3970559700
    12/09/20 12:46:14
    RTL
    errnum: 0x800a
    r0: 0x00000089
    r1: 0x0000007e
    r2: 0x0000007f
    r3: 0x0017a45b
    r4: 0x00000000
    r5: 0x00000000
    r6: 0x00000000
    r7: 0x00000000
    r8: 0x00000000
    r9: 0x00000000
    r10: 0x00000000
    r11: 0x00000000
    r12: 0x00000000
    r13: 0x00000000
    r14: 0x00000000
    r15: 0x00000000
    r16: 0x00000000
    r17: 0x00000000
    r18: 0x00000000
    r19: 0x00000000
    r20: 0x00000000
    r21: 0x00000000
    r22: 0x00000000
    r23: 0x00000000
    Stack frame PC, SP: 0x001badf9, 0x1fff2a70
    Call Stack - SP at 0x1fff2a70:
    0x001bb625
    0x0016012f
    0x0003e389
    0x0013b73f
    0x0017a45b
    0x001534a9
    0x0017a45b
    0x0017a45b
    0x001540f7
    0x0003ebb3
    0x0017ad75
    0x0013b955
    0x00153db7
    0x0000f3ed
    0x0013b955
    0x001540f7
    0x001540f7
    0x0017a65d
    0x00041395
    0x0003fb47
    0x0002b5bb
    0x001540f7
    0x001540f7
    0x00153f59
    0x00153f59
    0x0015512f
    0x00106901
    0x00153f59
    0x00113e6b
    0x00011985
    0x00113e99
    0x00113ea5
    Uptime: 157997504

    2700 (vívoactive 3) SW ver: 740
    Build Type: RELEASE
    Commit:e1a84cff08a398614df293f83a97565a538e8c24
    ESN: 3970559700
    12/09/20 12:54:21
    RTL
    errnum: 0x800a
    r0: 0x00000090
    r1: 0x0000007e
    r2: 0x0000007f
    r3: 0x0017a45b
    r4: 0x00000000
    r5: 0x00000000
    r6: 0x00000000
    r7: 0x00000000
    r8: 0x00000000
    r9: 0x00000000
    r10: 0x00000000
    r11: 0x00000000
    r12: 0x00000000
    r13: 0x00000000
    r14: 0x00000000
    r15: 0x00000000
    r16: 0x00000000
    r17: 0x00000000
    r18: 0x00000000
    r19: 0x00000000
    r20: 0x00000000
    r21: 0x00000000
    r22: 0x00000000
    r23: 0x00000000
    Stack frame PC, SP: 0x001badf9, 0x1fff2a70
    Call Stack - SP at 0x1fff2a70:
    0x001bb625
    0x0016012f
    0x0003e389
    0x0013b73f
    0x0017a45b
    0x001534a9
    0x0017a45b
    0x0017a45b
    0x001540f7
    0x0003ebb3
    0x0017ad75
    0x0013b955
    0x00153db7
    0x0000f3ed
    0x044ed82f
    0x001540f7
    0x001540f7
    0x0017a65d
    0x00041395
    0x0003fb47
    0x0002b5bb
    0x001540f7
    0x001540f7
    0x00153f59
    0x00153f59
    0x0015512f
    0x00106901
    0x00153f59
    0x00113e6b
    0x00011985
    0x00076b7d
    0x00113e99
    Uptime: 485803