Hi Travis.ConnectIQ - I just ran into the exact same problem with the FR165 on the sim. SDK 8.2.2 - all devices up2date. I noticed that the crash happens just after receiving no heartbeatintervals from the sensor within a sec. Once it crashes, it crashes immediatly (first sensor callback) when starting the app again - this happens until I close the sim and start it again. Then it works until the next empty callback. Same code, same scenario does not crash on the fenix 6 pro in the sim (or other devices)
This Array Out Of Bounds Error almost every time means there's a bug in your code. If you're lucky enough to be able to reproduce it, then the 1st thing I'd do is to look for all array access in my code and add a log 1 line each one of them, and log the array size and the index. I'm pretty sure that you'll see something like you're doing something like arr[0] on an empty array.
so this is my callback function (for testing) that produces an Error: Array out of bounds. function callback(data) {}
Sensor.registerSensorDataListener(method(:callback), {
:period => 1,
:heartBeatIntervals => {
:enabled => true,
},
});
Error: Array Out Of Bounds
Error Details: Error in sensor data callback
Stack:
(No stack trace available)
Again, so far I've only seen this in the sim with the fr165
No only happens after some time. And when i log it, it happens after a callback when there is no heartbeatintervals returned from the simulated sensor - when the callback fails, it fails before the log - so really before anything is execute in the callback. Data does come from the simulator.
again - this does not happen with other devices in the simulator! Never! So I‘m 100% sure this has nothing to do with my code (actually there is exactly zero my-code in the callback - there is no code at all as seen above)