Unable to duplicate circular dependency error

I have some errors reported in the ERA that I cannot duplicate in the simulator.  Does anyone have an idea of the cause or how to debug?


Error Name: Circular Dependency Error
Occurrences: 1
First Occurrence: 2024-09-30
Last Occurrence: 2024-09-30
Devices:
fēnix® 8 47mm / 51mm: 11.84
App Versions: 2.12.0
Languages: eng
Backtrace:
Rez.<init>:7
ChronoView.onLayout:209

Error Name: Circular Dependency Error
Occurrences: 1
First Occurrence: 2024-09-25
Last Occurrence: 2024-09-25
Devices:
Venu® 3: 11.14
App Versions: 2.12.0
Languages: eng
Backtrace:
Rez.<init>:7
ChronoView.onLayout:207

The code snippet involved is:

    function onLayout(dc as Dc) as Void {
        readDevSettings();                                                                            // line 207
        dialFont = Toybox.WatchUi.loadResource(Rez.Fonts.Dial);
        setLayout(Rez.Layouts.WatchFace(dc));                                          // line 209
    }
  • Can you post the code for readDevSettings() please?

  •     function readDevSettings() {
            var gDeviceSettings = System.getDeviceSettings();
            is24Hour=gDeviceSettings.is24Hour;
            showFarenheit = gDeviceSettings.temperatureUnits!=System.UNIT_METRIC;
            modeLbl[7] = showFarenheit ? "°F" : "°C";
            modeLbl[21] =modeLbl[7];
            modeLbl[13]=modeLbl[7];
            metricElevUnits=gDeviceSettings.elevationUnits==System.UNIT_METRIC;
            modeLbl[9]=metricElevUnits? "m":"ft";
            modeLbl[18]=modeLbl[9];
            metricUnits=gDeviceSettings.distanceUnits==System.UNIT_METRIC;
            modeLbl[11]=metricUnits? "km":"mi";
            $.middleX = gDeviceSettings.screenWidth/2;
            $.middleY = gDeviceSettings.screenHeight/2;

            secHandWid = $.middleX > 160 ? 3 : 2;   // wider hand for 320x360 displays and above        
           
            if (gDeviceSettings has :requiresBurnInProtection) {
                burnInProtReqd = gDeviceSettings.requiresBurnInProtection;
            }
            gDeviceSettings=null;
        }
  • Isn't the problem related to the layout in the XML?

  • I would assume so but I don't see any errors in the file, and why do only 2 watch models report the error.  There are hundreds of downloads of this app on many watch models.