When I build the app using "build for device", it does not crash. When I download it from Connect IQ App Store, it often crashes on startup. The logs in CIQ_LOG.txt are not very useful. They indicate that some invalid value was used. Likely a null value. The problem is that it is not in my code. I know this because I have added logging and try/catch blocks to all the classes in the initializer methods. If any of them had an exception, it would log that information with the name of the class but all I get is this (which also implies it is not in my code when it says "native function": UnexpectedTypeException: Expected Number/Float/Long/Double, given null/Number
native function
ERROR: Invalid Value
DETAILS: Failed invoking <symbol>
STORE_ID: ae433c7ad7064f808e29f64e3fc4add4
CALLSTACK:
@PC = 0x100002af
@PC = 0x100019d8
This happens on both my 1000 and 1030 but not all the time and only when it is downloaded from Garmin Connect IQ. Both devices are up to the latest firmware.
The code can be seen here: https://github.com/creacominc/connectiq-PowerField
Has anyone else seen this issue?
Does anyone have a suggestion about how to fix this issue?