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

Stopwatch continues running after stopped #70

Open
lerad opened this issue Feb 3, 2022 · 2 comments
Open

Stopwatch continues running after stopped #70

lerad opened this issue Feb 3, 2022 · 2 comments

Comments

@lerad
Copy link

lerad commented Feb 3, 2022

I have encountered a bug in the "Stopwatch" feature. It sometimes restarts a stopwatch, after I already stopped it.

I assume that this happens when the view is closed/terminated, before the "stop event" (or whatever the correct term is) is sent to the rust-backend. The best method I found to reproduce is:

  • Start a stopwatch
  • Let the stopwatch run for some time
  • Stop the stopwatch
  • Close the view manually, by using the "overview" button of the phone and closing the app
  • Re-open activitywatch
  • The stopwatch runs again

This does not trigger the bug 100%, so I would assume that there is some racing condition or the operation takes some time. My assumptions would have been that after pressing stop, the termination is directly "committed", but this does not seem to be the case.
The bug also happens, when I don't close the view manually, just by switching to another app.

ActivityWatch: v.0.10.0 (rust) (Installed over Google playstore)
Android: 8.0.0 (Samsung Galaxy S7)

@wojnilowicz
Copy link

wojnilowicz commented Mar 14, 2024

Still an issue. It just continues to run the last stopwatch. There are two faulty scenarios:
Steps:

  1. start 1st stopwatch
  2. stop 1st stopwatch
  3. start 2nd stopwatch
  4. stop 2nd stopwatch
  5. close the app
  6. reopen the app

Result:
2nd stopwatch keeps running

Steps:

  1. start 1st stopwatch
  2. stop 1st stopwatch
  3. start 2nd stopwatch
  4. stop 2nd stopwatch
  5. remove 2nd stopwatch
  6. close the app
  7. reopen the app

Result:
1st stopwatch keeps running

@wojnilowicz
Copy link

Setting battery usage of ActivityWatch to Unrestricted makes this issue go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants