tormoder / fit

A Go package for decoding and encoding Garmin FIT files
MIT License
243 stars 42 forks source link

strange error message #43

Closed hneemann closed 3 years ago

hneemann commented 4 years ago

I get the following error message when importing a fit file:

parsing definition message: validating Session failed: field 6: size (4) is greater than size of profile base type BaseSint32 (4)

which to me seems like stating 4>4

This is the file causing the problem.

tormoder commented 4 years ago

Thanks, there was an error in the error message. I've fixed it, expanded it and now it says:

parsing definition message: validating Session failed: field 6: size 4 for BaseSint32 as base type in definition message is greater than size 1 for BaseEnum as base type from profile

I think the reason is that it expects an enum (sub_sport) for field 6 of the Session message. That's what is described in the profile and an enum has size 1.

The library may also do something wrong. I'll try to take a look later.

hneemann commented 4 years ago

The library may also do something wrong. I'll try to take a look later.

I had that feeling too. I played around with the file a bit, and I think it's fine.

bpg commented 3 years ago

I have the same error as above, will try to figure out what's going on there. My activity is from a Garmin device as well.

bpg commented 3 years ago

This happens when a message has more than 85 fields (255/3). The fix is coming...