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

Anki 24.04 does not close properly #3126

Closed
dae opened this issue Apr 8, 2024 · 3 comments · Fixed by #3142
Closed

Anki 24.04 does not close properly #3126

dae opened this issue Apr 8, 2024 · 3 comments · Fixed by #3142

Comments

@dae
Copy link
Member

dae commented Apr 8, 2024

I recently updated to latest anki version 24.04 on my Fedora 39 (Linux).
In this version when I start anki and close it multiple times without any changes made to the decks or settings.
At one point it closes with an instant effect and then If I start to run it again I cannot do it because it says Already running in terminal window. For which I have to go to system monitor and Kill it from there to start it again.
It was not happening in earlier version 23.12.
I just want it to close properly so I do not have to go in system monitor to kill the process.

Originally reported on https://forums.ankiweb.net/t/anki-24-04-does-not-close-properly/43185/15

Probably connected to 7784321. Maybe we could swallow errors when accessing the timers, or have some 'shutting down' flag that causes the errors to be ignored?

@dae
Copy link
Member Author

dae commented Apr 8, 2024

For me, changing 0.5 to 0.3 in the following line caused it to happen the first time I tried to reproduce it:

    time_to_wait = 0.3 - elapsed_time

Edit: but it doesn't happen when I try again. Might have just gotten lucky? I got a similar traceback to the one reported in the thread above, in any case.

@voczi
Copy link
Contributor

voczi commented Apr 14, 2024

Race condition, maybe?

I was personally just able to reproduce the bug once. For now I'm going to use a mutex for the entire do_window_cleanup code. I'll see if it helps.

@voczi
Copy link
Contributor

voczi commented Apr 14, 2024

Just figured out that you can study a card to consistently reproduce the bug.
Weird because the OP of that thread said that the bug never happens when they have a sync-able change. I'm on Windows 11, and the OP did mention something about different behavior between Windows and Fedora.

@dae dae closed this as completed in #3142 Apr 17, 2024
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

Successfully merging a pull request may close this issue.

2 participants