Lots of Invalid errors reported in ERA points to font resource load line

I am finding a lot of occurrences of and Invalid error reported in ERA as below

Error Name: Invalid Value
Occurrences: 69
First Occurrence: 2022-08-20
Last Occurrence: 2022-08-22
Devices:
fēnix® 6S Pro / 6S Sapphire / 6S Pro Solar / 6S Pro Dual Power: 22.10
fēnix® 6 Pro / 6 Sapphire / 6 Pro Solar / 6 Pro Dual Power / quatix® 6: 22.10
fēnix® 5 Plus: 18.00
 epixTm (Gen 2) / quatix® 7 Sapphire: 8.37, 9.33
vívoactive® 4: 6.90
 fēnix® 7X / tactix® 7 / quatix® 7X Solar / EnduroTm 2: 8.37
fēnix® 7 / quatix® 7: 8.37
 DescentTm Mk2 / DescentTm Mk2i: 14.10
Forerunner® 255 Music: 11.12
fēnix® 6 / 6 Solar / 6 Dual Power: 22.10
Forerunner® 255: 11.12
fēnix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 22.10
fēnix® 6S / 6S Solar / 6S Dual Power: 22.10
fēnix® 5S Plus: 17.10
fēnix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 22.10
 epixTm (Gen 2) / quatix® 7 Sapphire: 8.37
MARQ® Aviator: 22.10
fēnix® 5X Plus: 18.00
Forerunner® 955 / Solar: 12.20, 11.12
Forerunner® 245 Music: 11.10
 fēnix® 7X / tactix® 7 / quatix® 7X Solar / EnduroTm 2: 8.37
MARQ® Athlete: 22.10
MARQ® Captain / MARQ® Captain: American Magic Edition: 22.10
 fēnix® 7X / tactix® 7 / quatix® 7X Solar / EnduroTm 2: 8.37, 8.39
Forerunner® 255s Music: 11.12
App Versions: 1.2.1
Languages: ces, chs, cht, dan, deu, dut, eng, fre, heb, ita, jpn, kor, pol, rus, slo, spa, swe
Backtrace:
Background.draw:33

-------

The offending line is 

var faceFont = Toybox.WatchUi.loadResource(Rez.Fonts.Num);
 
or one of the lines immediately following this line.  The resource is valid as far as I can see.  Everything works fine in the simulator with no warnings or errors, and there is plenty of memory margin.  For example, on a watch with 92k available for the watchface, peak memory use is <56k and reported running memory use is <46k.   Usually the issue with this operation is out of memory but I think this is not the case.  
Has anyone else seen this and have any comments?
  • If you mean on an actual watch, yes just the model that I have. I do note that a couple of devices in the list I don't use onPartialUpdate() at all on.  BTW, the last line of the backtrace was missing:

    Backtrace:
    Background.draw:33
    __redacted__View.onUpdate:337

    You will note that the call was from View.onUpdate, and not onPartialUpdate()

  • I don't know how exactly power budget is counted (but suppose it is a kind of average the whole minute). Because, even in low power, every minutes onUpdate is called you can exceed power budget.

    I suppose you have curved fonts but you have a lot of free memory (not for 65k devices) so  you can load them simple in initialise.

  • While I guess this is possible, I don't think this is happening in my case.  It is happening across multiple device models, and multiple watchface apps.  It often seems to happen when settings are being saved for the watchface.  Even on app/device model combinations with 10-20k or more of memory margin as reported by the simulator it is happening on the real device, and not the simulator.

    Sometimes ERA reports a file not found error, sometimes an Invalid value error.  What can cause a resource load failure?

  • I can't help without code but there are 69 errors so it means rather bug in code not in firmware.

    For me is clear not use storage/resources/etc in any frequently used function e.g. onUpdate and only when I know something was changed (e.g. settings) that force to use costly func.

    But check fonts.xml if you have <font id="Num"

    because if you have other symbol like string of name Num system try to load font of bad symbol