I have a bunch of data fields running on most if not all Edge devices since a few years now.
A week ago or so I started to get many user reports of my data fields crashing on Edge 540/840 since firmware 20.x started to roll out. I have a 540 myself and I was able to confirm that after upgrading the firmware to version 20.19 I started to have the same problem.
The same data fields code remain unchanged since July 2023, and they worked fine up to firmware 19.22 on the same devices.
In ERA I don't see any other affected devices than 540/840 with 20.x firmware.
Running the same code in the simulator works just fine, so I suspect this is a firmware specific bug rather than an application code issue.
According to ERA crash reports the line of code that is causing the unhandled exception is the following:
dc.drawText(123, 12, Gfx.FONT_MEDIUM, Ui.loadResource(Rez.Strings.label), textCenter);
For the sake of completeness I'm adding a larger code snip:
using Toybox.Graphics as Gfx; using Toybox.WatchUi as Ui; hidden var textCenter = Gfx.TEXT_JUSTIFY_CENTER | Gfx.TEXT_JUSTIFY_VCENTER; dc.drawText(123, 12, Gfx.FONT_MEDIUM, Ui.loadResource(Rez.Strings.label), textCenter);
The ERA/app crash logs generated are very limited in actionable data, only providing the error type (unhandled exception in this case) and the line(s) of code involved, but no other details on what exactly is causing the exception.
I checked the firmware release notes and I couldn't find any documented change that can be causing this.
Any ideas?