Ticket Created
over 4 years ago

HORNET-934

Transferred

Corrupt user-defined Activity fields

The Activity FIT file generated from my watch app suffers Intermittent but serious corruption of Lap messages.

I am creating seven user defined fields in the lap message which usually get populated correctly, but intermittently get corrupted. I am processing the data through Garmin Health API.

To demonstrate the issue, I have processed a correct (A3ID5501.FIT) and an incorrect (A3JH5003.FIT) FIT file through FitCSVTool and pasted the output into the linked spreadsheet and extracted just the "lap" messages.

Both files were generated on the same watch with the same app code, although running in any number of different modes, 24 hours apart.

The first A3ID5501.FIT,  shows the seven field definition messages

and the lap records containing the seven defined fields with valid data:

The second, A3JH5003.FIT, contains no field definition records and fields 37 to 42 corresponding to my user defined fields  containing corrupt data:

Note the unusual pipe-delimited format of the value fields.

The issue is very intermittent, occurring this week for the first time for a few months, but  this app feature is in Alpha testing with a very small number of testers, so there are not a lot of test results.

What could be causing the corruption and how can I manage it?

[ADD]

A controlled test of the app this afternoon (March 21 15:00 UTC+11) using very similar operational modes as the second (failing) test above produced the expected user-defined fields and lap records.

  • I have had another report from someone who analyzed another intermittent failed .fit file. 

    They indicate that they found the field definitions AFTER the lap rows, while presumably they should be before like in the good files.

    Not sure if there is a timing issue within the connect iq library, or device firmware, or within the connect iq application that could cause the AddLap function to be executed out of sequence vs when fit fields are defined, in my case just before the call to ActivityRecording.start.

    Has there been any activity on this issue?

  • i have seen similar issue. It is very intermittent and not sure what the cause is. The same app works most of the time without this issue.

    I have written some C#.net code based on the .fit SDK to debug into this. If need be i can analyze other bad fit files, perhaps see if the same type of corruption occurs.

    When it occurs, if i decode the .fit file, it appears the data for the added fit contributor fields is in place.

    What i find however is the field definitions have become corrupt, so the field name, type etc appear to have reverted to default values, and thus the data cannot be decoded correctly.

    In my case there is 1 fit field added to 'lap' but there are several other that are 'activity' fit fields. All are messed up the same way.

    I have seen this occur on a few device models.

  • Stephen.ConnectIQ

    I see there is a ticket with your name. Any chance of some feedback? Anything I can do to track it down or work around?