New errors sending settings to F5X+ also crashing simulator

So, I have received a few reports that that EuroPilotPlus can no longer send settings to the Fenix 5X Plus.

Essentially users are reporting that nothing happens when saving the settings, when previously it would update the settings right away. I can't reproduce this issue on my Fenix 5X, and I don't have a F5X+.

I checked the simulator and though I haven't changed any code in the past several months, the simulator is now crashing when changing settings (such as the background color). In some cases I am getting the following in the console:

Unhandled Exception
UnexpectedTypeException: Expected Number/Float/Boolean/Long/Double, given null


In other case, the simulator simply stops responding (freezes).

Has something material changed in the recent SDK releases that would require adjustments to code?

Currently using:

SDK 3.0.3
Eclipse Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200
  • So, I've rolled back the selected SDK to 2.4.7 and everything is working fine without issue within the simulator.

    I haven't changed anything on the watchfaces since adding the explicit permission for location info. Does anyone have any insight into this?
  • How large is your WF? When you run in the sim, what's the memory usage/peak memory usage you see in "View Memory" before making any changes and after?
    I heard about something similar, but it was for an app that was approaching max memory. It could be with 2.4.7 things were a tiny bit smaller, but enough to make a difference.

    Do you have a large number of settings?

  • Yes, there are a lot of settings for configuring different elements of the watch face for colour, etc.

    Peak memory is 88.9kB on this last crash of the face on 3.0.3

    The messages in the console were:

    Out Of Memory Error
    in reloadSettings (C:\Users\Administrator\Dropbox\Work\Consulting\ConnectIQ\eclipse-workspace\EuroPilotPlus\source\EuroPilotPlusView.mc:1058)
    in onSettingsChanged (C:\Users\Administrator\Dropbox\Work\Consulting\ConnectIQ\eclipse-workspace\EuroPilotPlus\source\EuroPilotPlusView.mc:1048)
    in onSettingsChanged (C:\Users\Administrator\Dropbox\Work\Consulting\ConnectIQ\eclipse-workspace\EuroPilotPlus\source\EuroPilotPlusApp.mc:35)


    But at least this time the simulator itself did not crash, just the watch face in the sim.

  • After commenting out a fair bit of the code, I noticed I'm getting this in the console output on the launch of the simulator on SDK 3.0.3:

    Failed loading application
    Failed loading application
    Out Of Memory Error

    This is with the memory showing as 78.5/92.1kB

    When launching it using SDK 2.4.7 there are no messages in the console and no crashes or issues. 78.3/92.1kB

    Things go bad at SDK 3.0.1 and up.



  • hi

    I notice that when calling the parameter change the maximum memory size is much bigger in version 3.
    To test, you have to change the maximum size of the watch in device.xml to see that the peak is much higher in 3 than in version 2. and for the same code
  • hi

    I notice that when calling the parameter change the maximum memory size is much bigger in version 3.
    To test, you have to change the maximum size of the watch in device.xml to see that the peak is much higher in 3 than in version 2. and for the same code


    That's not great news. Does that constitute a bug on the ConnectIQ side or is this just going to be the new normal?

    What's the solution to this, strip out configurable features from the watch face?

    It would be a shame to have to strip out features that users like and were already working for years.


  • I think the "failed loading app" messages are related to having a background process, but I thought that was fixed in 3.0.3.

    What's involved is the onAppInstall() and onAppUpdate() now available in AppBase.

    To get rid of them, in your AppBase, you can add: (I think Sys.exit() should work, or it could be the function can be empty)
    function onAppInstall() {
    Sys.exit();
    }

    and the same for onAppUpdate()
    But like I said, I thought the was fixed at least for some targets. What target were you using?
  • For the peak memory increase with settings changes, if there's not something in the bug report forum about it already, do a post there.

    Ok, looks like this one is similar:
    https://forums.garmin.com/forum/developers/connect-iq/connect-iq-bug-reports/1404816-memory-usage-with-different-sdk-s
  • For the peak memory increase with settings changes, if there's not something in the bug report forum about it already, do a post there.

    Ok, looks like this one is similar:
    https://forums.garmin.com/forum/developers/connect-iq/connect-iq-bug-reports/1404816-memory-usage-with-different-sdk-s


    Thanks, Jim. I've added to that thread.

    BTW, the onAppInstall() and onAppUpdate() did not fix the error messages.