Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

C# Fit SDK Bug - Static Dictionary in Profile.cs causes errors

Rank

Total Posts: 2

Joined 2013-01-18

PM

The static Dictionary, m_mesgLookup in Dynastream\Fit\Profile.cs causes problems with when using the Fit SDK. The data which is cached using the dictionary causes invalid FIT files to be created or incorrect data to be parsed.

Adding the Dynastream code directly to my project and commenting out the lines in Profile.cs which add entries to the dictionary, I was able to resolve the incorrect data issues I was seeing. Unfortunately performance suffers greatly when parsing activity files.

I haven't looked into exactly what part of a Mesg object shouldn't be cached in a static dictionary. It would seem that caching the Mesg in the Encoder and Decoder instead of a static dictionary would be a good middle ground, but I'm not sure what that would take.