Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markers imported from a KMZ file which are at the end of the track are shown at the track start #1827

Open
hercek opened this issue Jan 13, 2024 · 1 comment
Labels
potential bug A bug that could not (yet) be reproduced

Comments

@hercek
Copy link
Contributor

hercek commented Jan 13, 2024

Describe the bug
Import of a KMZ file with markers which are located after the start of a track will lead to track charts with the markers only shown at the start of the track.

It is interesting that exporting this imported track again leads to a KMZ file which is the same as the imported KMZ file. So the error is somewhere in the OpenTrack internals and does not propagate again to the exports. Searching for the affected markers in the both the imported and again exported KMZ file shows that the markers point to the right places (somewhere far from the start of the track).

Markers are properly shown for tracks recorded directly in the app. This is related only to the imported tracks. Looks like possibly related to comparing floating point numbers precisely (while they differ slightly due to import/export) or maybe some timezone/localTime/GMT related stuff.

I do not care about this bug nor whether it ever fixed. I only wanted it recorded. I detected it by a chance while implementing #1820. That task was marginally related to marker drawing in the charts.

To Reproduce

  1. Record a track with markers which are not at the very beginning of the track.
  2. Export as KMZ.
  3. Delete the track.
  4. Import the KMZ.
  5. Look at a chart of the imported track.
  6. All markers will be shown (one over another) at the beginning of the track.

Technical information

  • This is likely unrelated to a specific version of Android. I have seen it in the Android Pixel virtual phone of the current android-studio.
  • The KMZ file was from my Samsung XCover4s with Android 11.
  • OpenTracks version was a few commits newer than v4.10.1.
@hercek hercek added the potential bug A bug that could not (yet) be reproduced label Jan 13, 2024
@dennisguse
Copy link
Member

What you describe sounds possible.
The "position" of a marker is stored in MarkerColumns.duration and .length.
There is no real link to a TrackPoint as all the data is duplicated.

I am working closely to that problem aka #1725.
Until now there is only an indirect link between Markers and TrackPoints.
The code there is ancient...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug A bug that could not (yet) be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants