Obscure crash in the Drawable of a IconMenuItem and issues debugging a program on a user's watch

Hoping to get some guidance from the experienced developers here - as I don't have much experience debugging remotely:

user reported a crash in the on-device menu of my watchface on his Fenix 8 47mm Amoled (fenix847mm, sideloaded). It occurs when he simply scrolls through the menu without selecting any option. Based on the crash log, it is an unhandled exception in the draw() function of the Drawable used as the icon of an IconMenuItem in a Menu2. The stack trace points near (1 byte off) a call to Dc.clear().

The menu works fine in the simulator (including for fenix847mm) and on the physical watches I have seen it run on. According to the API documentation there's no exception thrown from Dc.clear() or any of the other system calls in this function, and I can't see anything wrong in my own simple code either.

Without the icons (when I replace the three instances of IconMenuItem with MenuItem), the user reports it works on his fenix847mm.
With a try-catch block around all the code in the draw() function of the drawable, it also doesn't crash on the user's watch.

My questions are:

  • Is there anything wrong with my drawable class
  • How can I further investigate the issue without access to the device on which it happens? The user is able to retrieve crash logs (the CIQ_LOG.YML file) from his device but does not see the text from the println() statements I added in his log file (the .TXT file).
  • In this situation, would you just implement a try-catch block and move on?

Watchface: github.com/.../SwissRailwayClock
Issue: github.com/.../32
Drawable: github.com/.../MenuIcon.mc

Top Replies

  • How can I further investigate the issue without access to the device on which it happens? The user is able to retrieve crash logs (the CIQ_LOG.YML file) from his device but does not…

All Replies

  • How can I further investigate the issue without access to the device on which it happens? The user is able to retrieve crash logs (the CIQ_LOG.YML file) from his device but does not see the text from the println() statements I added in his log file (the .TXT file).

    From the GitHub ticket, it looks like you are trying to use the app name as the log file name. However, this needs to be the internal filename of the binary, which is a 16-character string.

    Here you can find a guide on how to set up the log file:

    https://docs.google.com/document/d/1RHC1kyrGux5NKRESmeQ4SQKRFK-VtCpL_Z7ixmuMPjI/edit?tab=t.0#heading=h.ge3l2fbikird

    In this situation, would you just implement a try-catch block and move on?

    I would not do that until I have a better understanding of what is going on.

  • If the app was installed from the store, it's given a 8 character "store name" and that must be used for the txt file

    The easiest way to handle this is to have the user uninstall the store version. send them a sideload (say "app123.prg"). tell them how to copy the prg to their device, and create a "app123.txt" file under logs,  You may want to send them a debug build of the side load,

    Also see https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#debugging. but that doesn't address the prg being given a "store name".

  • Thanks for the feedback. The app is not published in the store. It is sideloaded and after the crash report the user has sideloaded and tested several debug versions with debug System.println() statements. Following is one of the crash logs, showing the filename and appname. The name of the logfile that he copied to the watch is SwissRailwayClock.TXT but he is not able to retrieve it after testing and is wondering if it could have to do with his MTP tool - apparently he's using an Apple computer.

    Error: Unhandled Exception
    Time: 2026-02-01T13:46:39Z
    Part-Number: 006-B4536-00
    Firmware-Version: '20.29'
    Language-Code: eng
    ConnectIQ-Version: 5.2.0
    Filename: 'SwissRailwayClock-v5debug4-fenix847mm'
    Appname: SwissRailwayClock
    Stack: 
      - pc: 0x10000542