watchface crash - need help

Hi, I have a few users (on Fenix 5x) having problems to apply my watch face. It downloads onto the device okey and it shows up as a preview as it should, when they go into watch face settings, but when the users selects "apply" to aply the watch face, it crashes and the watch loads the previous/default watch face. I have not been able to reproduce on Fenix5 or Fenix 5X Plus (I dont have a Fenix 5x). 

I have received the CIQ_LOG file from one of the users and it has the following:

Error: Symbol Not Found Error
Details: "Could not find symbol '00800a91'"
Time: 2024-02-03T03:51:27Z
Part-Number: 006-B2604-00
Firmware-Version: '25.00'
Language-Code: eng
ConnectIQ-Version: 4.2.3
Store-Id: 3b678321-0fd7-4529-8526-aa6a732f0e08
Store-Version: 29
Filename: E1V72706
Appname: Dexcom Watch Face
Stack: 
  - pc: 0x300026ea
  - pc: 0x300021f8
  - pc: 0x30001642
  - pc: 0x300015aa
  - pc: 0x10002660

Only the last PC address (0x10002660) points to my source code when I lookup in the debug.xml file, none of the others do (is that normal?). 

0x10002660 translates to 268445280. The closest I can find in the debug.xml file is this: 

It seems to point somehwere after line 190 in my DexFaceView file (it is the very last part of the onUpdate function) and before line 43 in the Rez.mcgen file (no clue what that file is doing?).

My code looks like this:

DexFaceView.mc:

Rez.mcgen 

My watch face uses layouts, with custom drawables and a custom font. I have not had any issues with it except with these two users. I am afraid I am way out of my waters here, so any help or hints with debugging this is greatly appreciated. TIA

/Fredrik 

  • You have to interpolate between the lines. Find the address in the debug.xml file which is closest to but not higher than the line number listed in the CIQ log.  The error is in that line.

  • Thank you for replying, truly appreciated. I think I've done exactly what you sugessted.

    the PC address 0x10002660 converts to 268445280 and when looking at the debug.xml file, the closest line I can find is line190 in the onUpdate function in my view class (on address 268445257). 

    On that line I make the call to the parent onUpdate: View.onUpdate() and after that call my onUpdate function exits. 

    The next address in my debug.xml (268445282) sits with the Rez.mcgen file on line  42. "parent=globals/Rez/Layouts". 

    This is line 41-44 in the rez.mcgen file:

    (line 41) module Layouts {
    (line 42)        function WatchFace(dc as Graphics.Dc) as Array<WatchUi.Drawable> {
    (line 43)            var local_Rez_Fonts_DexArial64 = (WatchUi.loadResource($.Rez.Fonts.DexArial64) as Graphics.FontReference);
    (line 44)            var rez_cmp_local_custom_drawable_69553608316995649298 = new Background();

    First, I am not very familiar with mcgen files, I believe they are compiler generated (?) and this particular section seems to have something to do with my custom drawable and custom font.

    The app runs fine in the simulator but not on the target. 

    The CIQ_LOG file also has this: Details: "Could not find symbol '00800a91'"

    is this information usable in any way? 00800a91 converts to 8391313 but didn't find anything in the debug.xml on that address. 

  • If you try to search for 00800a91 and 8391313 in all the files created during the compilation then I think you'll be able to find out what that symbol is supposed to be. (Though if it's not found then maybe you won't find it???)

    Anyway, I suppose you tested it in the simulator, and there everything works as expected?

  • I built a side-load to one of the users having this issue and got some more details in the crash log file:

    Error: Symbol Not Found Error
    Details: "Could not find symbol '<Toybox_WatchUi_TextArea_>>fitTextToArea>'"
    Time: 2024-02-11T10:38:40Z
    Part-Number: 006-B2604-00
    Firmware-Version: '25.00'
    Language-Code: eng
    ConnectIQ-Version: 4.2.3
    Filename: F97B28AD
    Appname: Dexcom Watch Face
    Stack: 
      - pc: 0x300026ea
      - pc: 0x300021f8
      - pc: 0x30001642
      - pc: 0x300015aa
      - pc: 0x10002753
        File: 'C:\Users\fsall\OneDrive\Garmin\Garmin Projects\DexFace\source\DexFaceView.mc'
        Line: 190
        Function: onUpdate

    It refers to line 190 in the onUpdate function in my view class. Line 190 looks like this:

    View.onUpdate(dc);

    It's the call to the parent onUpdate()

    I am using relative layouts with text-areas to tailor the UX for different screens sizes. 

    The crash log reveals some problem related to "Toybox_WatchUi_TextArea_>>fitTextToArea>" I am not sure what he problem is. The watch face loads fine in the preview mode and looks like it should,but when the use applies the watch face it crashes. Not able to reproduce the problem in sim, and I don't think every Fenix 5X user have this problem (but not sure). I know that text areas only works for CIQ > 3.1 but that should not be a problem with the Fenix 5. 

    Could it be a bug with text-areas? 

          

  • Where is fitTextToArea in your code? I don't see anything like that in TextArea or Drawable in the docs.

  • Hi, I don't have that anywhere in my code. 

  • we can't help if you don't post your relevant code. If you think it's called from onUpdate, then show us your onUpdate, preferrably with some comment to show line 190

  • Hi, line 190 in my onUpdate function is a call to the parent onUpdate. 

  • Are you drawing using dc calls or using layouts? If you're drawing on dc then you don't need to call parent onUpdate