Strange error: Simulator and real device behaviour not the same

I am getting an “Unhandled Exception” error occurring on four different device types – 18 times in the last 2 weeks from 300+ downloads of the HRV analysis app. The same line of code in every case which is reading an app property. Now you would have thought this would be easy to debug but this error never happens in the simulator on any device and has never happened on my own device.

The property exists, the key is the same in all uses. The only difference from other calls to Properties.getValue in the same function is that this one is not also a setting.

<properties>

…snip

      <property id="MaxTimerTimeSet" type="number">600</property>

…snip

</properties>

On initialisation one of the functions calls a storageHandler function which reads a long list of properties and settings …

Variable = $._mApp.Properties.getValue("MaxTimerTimeSet").toNumber();

In reality, I could now use a CONST to set this value as the code structure has evolved.

In the simulator I have tried deleting all apps and all data and run the app a number of times. No error happens.

Any suggestions gratefully received.