GithubHelp home page GithubHelp logo

Comments (7)

rnorris avatar rnorris commented on July 17, 2024

I too am getting various memory corruption issues - (with an Ambit 3 MultiSport)

@centic9 - As far as I can tell this is introduced the latest commit - sha:a6fdcec0814e59b038702493000dbcde0b296974

If I simply disable the recent memory management changes in pmem20.c

//log_entry->samples[*sample_count].u.unknown.data = malloc(sample_len);
//memcpy(log_entry->samples[*sample_count].u.unknown.data, buf + offset + 2, sample_len);

Then the problem goes away.

NB1 Sometimes it crashed in malloc() above, other times in processing a periodic sample.

NB2 For me it's always outputting "Found unknown periodic sample spec type (0x28): len: 17" - it's always len 17 for me; and this sample spec is only in running logs (not Cycling ones).

NB3 I haven't worked out what's wrong the memory changes.

Edit: mistyped the C++ comment symbol

from openambit.

acocauab avatar acocauab commented on July 17, 2024

Thanks for your answer! Commenting the lines was not enoght for me but moving to commit: 6c3c781cfdfdd8587f6ed2876f3db631e67bb132 work smoth!

from openambit.

centic9 avatar centic9 commented on July 17, 2024

Thanks for narrowing down the root-cause, I don't have an Ambit 3, so cannot fully test effect of changes on that part of the code. However it looks like to be a simple bug anyway, so I should be able to fix it.

from openambit.

centic9 avatar centic9 commented on July 17, 2024

Should hopefully be fixed again by 9e6663a

The reporting/handling of the unknown sample was actually completely incorrect, likely would happen on Suunto Ambit 2 or other devices as well.

Please try the latest and report here if you still see crashes for some reason.

from openambit.

marguslt avatar marguslt commented on July 17, 2024

I don't have an Ambit 3, so cannot fully test effect of changes on that part of the code

@centic9 , just thinking out loud here - separating watch log transfer from parsing would enable easier testing and debugging ( saving binary logs by devs & users, later loading those directly into parser without physical access to certain watch / firmware versions ).

Actually this is what both Movescount Android app and Moveslink2 are doing - they first dump the binary log of the activity into a file and then parse it. MC Android app also keeps copy of those binlogs, Moveslink2 tends to delete those after parsing, but it's easy to block this behavior. Meaning that it would allow testing libambit parser against binlogs created by Suunto tools and compare the results against Moveslink2 SML files or Movescount app JSON files.

Though both Movescount mobile app and Moveslink2 will reach their EOL soon, I have a reason to believe that at least Moveslink2 watch sync (local log transfer and generating SML-files) stays functional.

from openambit.

centic9 avatar centic9 commented on July 17, 2024

Good idea and would be very useful to make testing easier, however I likely lack the time to work on something like this, but I am naturally open to receive pull requests in that regard.

from openambit.

acocauab avatar acocauab commented on July 17, 2024

Work smoth for me!

Thank you! :)

from openambit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.