Complete
over 4 years ago

WERETECH-9471

Fixed

Sensor.setEnabledSensors exception on Venu, Vivoactive 4

I have been getting numerous reports of app crashes due to the Sensor.setEnabledSensors call. This is occurring on a Venu with the new 4.90 firmware, and I've had reports of possibly the same error on Vivoactive 3 and 4 watches after they received their most recent firmware updates in the past week.

My call is

 Snsr.setEnabledSensors( [Snsr.SENSOR_HEARTRATE,Snsr.SENSOR_BIKECADENCE,Snsr.SENSOR_BIKEPOWER] );

(which has been unchanged for literally years) and this is causing this error:
Error: Array Out Of Bounds Error
Details: 'Failed invoking <symbol>'

Removing Snsr.SENSOR_BIKEPOWER from the array does not make any difference.

  • Some users reported this problem with my app as well but I can´t reproduce it on my test devices where I also have Garmin firmware 11.10 installed.

    Could it be that it also depends which Sensor Hub or ANT/BLE/BT version is installed?

    This is really a severe problem!!!

  • UPDATE: App built by CIQ 3.2 SDK is crashing on Fenix 6 Pro 11.10 too... 

    (Can somebody PLEASE enable editing posts in this forum section? It will make easier life for everybody involved...)  

  • I am getting the same with Locus Map application:
    The problem is Sensor.SENSOR_BIKECADENCE . Even if only this sensors is enabled in the code, the app crashes without any message on device with CIQ 3.2 (not even IQ!). 

    The app was built using CIQ 3.1.9 !! - this can be reason why you are unable to reproduce it. 

  • This does nor occur in the simulator. Here is a recent log from a user with a Venu with 5.00:

    Error: Array Out Of Bounds Error
    Details: 'Failed invoking <symbol>'
    Time: 2020-08-26T16:22:00Z
    Part-Number: 006-B3226-00
    Firmware-Version: '5.00'
    Language-Code: eng
    ConnectIQ-Version: 3.1.9
    Filename: A8PK2954
    Appname: dwMap
    Stack:
    - pc: 0x10002338
    File: '/Volumes/PersonalSSD/dynamicWatch/eclipse-workspace/watch/dynamic/source/dynamicModel.mc'
    Line: 288
    Function: accessGPS
    - pc: 0x100046a4
    File: '/Volumes/PersonalSSD/dynamicWatch/eclipse-workspace/watch/dynamic/source/dynamicView.mc'
    Line: 24
    Function: onShow

    That line is:

                Snsr.setEnabledSensors( [Snsr.SENSOR_HEARTRATE,Snsr.SENSOR_BIKECADENCE,Snsr.SENSOR_BIKEPOWER] );

    Commenting it out and sending a build to the user removes the crash.

    The calling code (second item in stack trace) is in the onShow of my main view:

        function onShow() {

    ...            m.accessGPS(true);

    ...

            }

        }

  • We have been unable to reproduce this so far on a Venu or in the simulator using Firmware 5.00. Is there any more information you can provide? A full console log of the error. Are there any other initialized arrays that this may be referring to or code that references this array?