i need help with an app crashing only on fr645 and 2 others watches... i tried to read the CIQ_LOG.YML but cannot see a clear evidence of the bug

One of my app is crashing on fr645, fenix 5 and vivoactive 3. I have the CIQ_LOG.YML file but unfortunately i cannot understand which is the problem... anyone out there can help?

  • the log says: 

    Error: Invalid Value
    Details: 'Failed invoking <symbol>'
    Time: 2024-01-09T07:31:08Z
    Part-Number: 006-B2886-00
    Firmware-Version: '6.90'
    Language-Code: dut
    ConnectIQ-Version: 4.2.4
    Store-Id: a08d9934-7dec-44c0-9ce8-8322b1100b9d
    Store-Version: 167
    Filename: E1965038
    Appname: DrakeSpinningApp01
    Stack:
    - pc: 0x10007204
    - pc: 0x100086f6

    but the symbol is a function which is working fine in other watches.

    the following is the debug file

    <entry filename="D:\\DrakeSpinningApp01View.mc" id="85" lineNum="1039" parent="globals/DrakeSpinningApp01View" pc="268464548" symbol="EvaluateB2BInterval"/>
    <entry filename="D:\\DrakeSpinningApp01View.mc" id="85" lineNum="1043" parent="globals/DrakeSpinningApp01View" pc="268464666" symbol="EvaluateB2BInterval"/>

  • What is the exact bit of code which is failing?  The debug file only helps you as we can’t reference that to your source code.

  • The debug points to these lines of code:

    0x10007204=268464644 (between lines 1039 and 1043 (see the ***)

                // calculate the rMSSD (MAX 15)

                if (HrIntervSize>1)
                    {

                        for (i=0;i<(HrIntervSize-1);i++)
                            {
    ***                           rMSSDTemp= Math.sqrt( Math.pow((HrIntervalArr[i].toFloat()-HrIntervalArr[i+1].toFloat()),2)/(HrIntervSize.toFloat()) );
                            }
                    }
               
    ***            rMSSD=((rMSSD.toFloat()+rMSSDTemp.toFloat())/2.0);
                if (rMSSD<15.0) {lastrMSSD=rMSSD;}
                if (rMSSD>=15.0) {rMSSD=lastrMSSD;}
    but the problem is that the app runs these lines only if you start the activity. The app crash as the user try to open it!! By the way i cannot understand why the debug says Failed invoking <symbol> and symbol is the function!!! 
  • can it be that you're trying to invoke toFloat() on a null value?

  • well at first it seems to be such a kind of error but... the user which has a fr645 says that the app is not running at all. When he open it the IQ logo appear!! As i wrote before the error is on a function (EvaluateB2BInterval) that is inside a callback and just in case i added a check for null in such values:

    may i did it right?

        // accelerometer callback
        public function onAccelSens(sensorData as SensorData) as Void
            {

              if (sensorData has :accelerometerData && sensorData.accelerometerData != null)
                {
                     ....some other code ....
                }

              if (sensorData has :heartRateData  && sensorData.heartRateData != null)
                {
                    if ((sensorData.heartRateData has :heartBeatIntervals) && (sensorData.heartRateData.heartBeatIntervals!=null))
                    {
                        HrIntervalArr=sensorData.heartRateData.heartBeatIntervals;
                        HrIntervSize=sensorData.heartRateData.heartBeatIntervals.size();
                        // evaluate b2b interval time
                        EvaluateB2BInterval();
                    }
                }
            }
  • no it is fr645. But you gave me a track to follow about the null inside the array. Just for a check i will search for any null value inside the beat2beat array changing them with 0!

  • Error: Invalid Value
    Details: 'Failed invoking <symbol>'
    Time: 2024-01-09T20:13:49Z
    Part-Number: 006-B2886-00
    Firmware-Version: '6.90'
    Language-Code: dut
    ConnectIQ-Version: 4.2.4
    Store-Id: a08d9934-7dec-44c0-9ce8-8322b1100b9d
    Store-Version: 167
    Filename: E19A3639
    Appname: DrakeSpinningApp01
    Stack:
      - pc: 0x10007204
      - pc: 0x100086f6
    006-B2886-00 seems to be the fr645 not music one
     006-B2888-00 Forerunner 645 Music
     006-B2886-00 Forerunner 645