Acknowledged

Marq series is using wrong widget memory limit in simulator

Hello Garmin team,

the Marq series is using the wrong memory limit for widgets in simulator.

The device reference is reporting: widget 1048576

https://developer.garmin.com/connect-iq/reference-guides/devices-reference/#marq%C2%AEathlete

But the simulator is showing: 28kB

Could you please check he device details and update the device details for the SDK manager?
With these settings, a test is not possible in simulator.
File/image upload seems not to be possible, so I could not add a screeshshot from the simulator.

Many thanks and regards

Ronny Winkler

Parents Comment Children
  • Try moving  your new HomeyApi() from initialize in AppBase to getInitialView, or in initialize() in your main view

    initialize() in Appbase is called when either the glance or the main view starts.

  • Yes, that's clear. I got problems, because in app.initialize I instantiated a class where I have many API relevant implementations (oAuth, webRequest...). I'm not sure, but it seemes that causes an error. Perhaos in this class are some resources used without the glance annotation. Or all together need too much memory.

    Now I don't instantiate this class on startup. Instead it's done in the get function. This way I don't get the error on glance view because is only instantiated from the main view.

    Such dependencies can cause compiler errors like this:
    Error: Illegal Access (Out of Bounds)
    Details: Failed invoking <symbol>
    Stack:
      - initialize() at Y:\...\garmin.widget.homey.oAuth\source\HomeyApp.mc:32 0x10000026

    And at this line ther is the class:
        public function initialize() {
            AppBase.initialize();
            mHomeyApi = new HomeyApi();

    If I call mHomeyApi = new HomeyApi(); only in a getApi() function, all is riight. But I can't see what's the exact cause of this app crash. I don't read ressources, only properties. So perhaps it's just the memory used by the two classes - but the memory peak in simulator is only 11kB.. So it's still not clear. But I got it working now with the mentioned changes.

    If the error message would mention the correct code line which is not allowed in glance, it woul dbe much easier to fix it.