Unexpected exception from Application.Properties.setValue on Fenix 5X

I've just released a new watchface, and I'm getting some reports of a crash on the Fenix 5X (and possibly the same on D2 Charlie).

I've had one log file to look at so far, and the error is an unhandled exception with message: Key does not exist in Application Properties

It happens on the first line of this function:

using Application.Properties as applicationProperties;

function clearExportImportStrings()
 {
  applicationProperties.setValue("EP", "");
  applicationProperties.setValue("EF", "");
  applicationProperties.setValue("EG", "");
 }

The trouble is it works fine in the simulator and on other real watches, so I'm wondering if there is something different about the Fenix 5X which is causing this exception?

All 3 of those properties are defined in my properties.xml file as strings. Could it be because they are initialised as empty strings that that is causing it?

<property id="EP" type="string"></property>				<!-- export import profile -->
<property id="EF" type="string"></property>				<!-- export import fields 1-3 -->
<property id="EG" type="string"></property>				<!-- export import fields 4-6 -->

  • Yep, it was me that posted originally about the problem with 103 properties Slight smile That's why I've reduced the number down! (ciq.forums.garmin.com/.../adding-one-property-then-application-settings-memory-size-increases-by-7kb) It's possible the "reduced memory" note for SDK 3.0.11 is related to that, as it sounded like in some cases some memory was not being released or too much was being allocated in the dictionary. But that problem was visible by seeing the size of Application.Settings change in the simulator memory view by 7kB for one extra property, so this one is something different.

    I suspect it could be due to what is in the settings too! But there must also be some difference between GCM (iOS) and the GCIQS app since using one or the other makes the difference between it working or not. There have been a lot of problems posted in the past with settings and GCM iOS, in particular strings, so that's why it makes me consider them. But if CIQ apps & settings will be removed from GCM in the future, then it's probably not worth fixing this bug in GCM now anyway (that's why I was wondering if that is planned).

    If another developer (or even someone from Garmin) has a Fenix 5X or D2 Charlie and is prepared to test some versions for me, then I'm happy to make some more builds as it still intrigues me what this could be Slight smile