OpenTracksApp / OpenTracks

OpenTracks is a sport tracking application that completely respects your privacy.
https://OpenTracksApp.com
Apache License 2.0
1.07k stars 190 forks source link

App crashes after stopping non-GPS workout via Gadgetbridge-linked fitness tracker #1850

Closed beansmachine closed 9 months ago

beansmachine commented 9 months ago

Describe the bug

After stopping a workout recording via fitness tracker, the app immediately crashes. This issue doesn't occur when recording a workout that uses GPS, such as walking or cycling. All requested app permissions are enabled, battery use is unrestricted.

To Reproduce

  1. Stop any non-GPS workout on tracker
  2. See error

Technical information

Crash log: crashlog.txt

dennisguse commented 9 months ago

Can you upload the logs to Github?

beansmachine commented 9 months ago

Edited original to include the log file

dennisguse commented 9 months ago

Can you give detailed instructed how to reproduce this (incl. in which if the screen is on/off)?

beansmachine commented 9 months ago

The crash consistently happens whenever data are sent over from the fitness tracker. Tested this with the app being open, running in background, with the screen on and after unlocking - as soon as the tracker's recording is stopped (including cases when the band says the workout is too short to be recorded), OpenTracks displays the crash log and closes.

dennisguse commented 9 months ago

Best guess: introduced in 9a0f9271. When stopping a the service should not be started as it is already running.

dennisguse commented 9 months ago

Fix reverted due to #1853.

And this is actually a duplicate of #1824. Due to https://github.com/OpenTracksApp/OpenTracks/issues/1824#issuecomment-1941956834