ERA report can only be replicated with brute force, any known issues with settings?


I have started seeing an error report in ERA that I cannot make sense of. The error occurs on multiple Forerunner® 245 Music: 4.40 (which looks like the most recent FW) in two languages so far (English and Korean) using the latest version of the app and it occurs on a seemingly innocuous line where I write a value that has just been read from settings into a FitField without manipulating it.

I have pasted a code extract below:

<property id="fieldValue" type="number">300</property>

<setting propertyKey="@Properties.fieldValue" title="@Strings.fieldValueTitle" prompt="@Strings.durationError">
	<settingConfig type="numeric" min="0" max="3000" errorMessage="@Strings.durationError"/>

// IN APP initialize()
var type = FitContributor.DATA_TYPE_UINT16; 
var options = {};
options[:mesgType] = FitContributor.MESG_TYPE_SESSION;
options[:units] = loadStr(:unitSeconds);
var fieldValue = app.getProperty("fieldValue"); 
ff = session.createField(loadStr(:fieldTitle),fieldId, type, options);
ff.setData(fieldValue); // CRASHES HERE WITH "Error Name: Invalid Value" IN ERA LOG

The only way I can replicate the error is to hardcode "var fieldValue = null;"

I have previously seen behaviour where properties that are defined in properties.xml but not explicitly managed via settings.xml are lost, but that cannot be the cause here. My app both sets and manages the property in settings.xml and properties.xml complete with a valid default value. I have not been able to even input, let alone save, an invalid value into settings via any of the apps.

This is not even a new or recently introduced property! It has been there since the first release.


Is this a bug that I need to do a bug report for, or is it that I need to introduce an additional level of paranoid coding to default my settings if they are null or not found?