Anki 24.04 does not close properly

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.

1 Like

Can you reproduce the issue with add-ons disabled? Troubleshooting - Anki Manual

Yes, I was able to reproduce it even with add-ons disabled.
If I had to backtrack I’d say.
I used these commands recently. Don’t know how it may have affected this behavior.
After which this bug became more prominent to me.
I do not know how to revert changes made by these commands to check further.

I am able to reproduce the same in Windows as well.
Times I need to close and reopen anki to encounter this varies.

I just tried 20 times but I don’t seem to be able to replicate the issue on Windows 11…
Maybe there are some conditions for it to happen. How many times do you have to stop/start on Windows?
However, it did happen once for me since the update.

1 Like

I share the same issue. Anki would keep lurking around in my task manager even after having closed it.

1 Like

I also have this problem since using the beta (that’s exactly what I was talking about here : Anki 24.04 beta/RC - #125 by Ouranos).
I’m on archlinux 6.8.2 with kde plasma 6. One of my computer runs wayland and the other x11, I encounter the issue on both.

1 Like

It happens more on fedora than on windows for me. I only need to close it two or three times to replicate the same on fedora.
Very annoying.

Unfortunately, I can’t seem to trigger the problem on the machines I have here. Does it happen when automatic sync is turned off? @abdo, any luck on your machine?

Cannot replicate this issue with automatic sync turned off.

Also I would like to point it out that it only occurs to me when I make no changes to my collection during opening and closing anki. If I even make slight changes such as folding decks it does not happen and anki closes properly with changes synced up.

Same problem here on Arch Linux with Gnome.

1 Like

Same here, Windows 11 22H2. In my case, it always happens, whether I review any cards or not.
Turning off automatic sync resolves the issue, I don’t have to disable add-ons. Disabling add-ons while having automatic sync on also resolves the issue.

1 Like

Same here. I closed Anki, but the icon is still in my dock and the only way to actually close Anki is to Force Quit.

No luck reproducing it (Windows 10).

Starting anki from terminal gives these outputs upon closing anki.

When it fails to close anki properly -

Window should have been closed: <aqt.progress.ProgressDialog object at 0x7f02eeb43dc0>
2024-04-08 09:15:21,151:WARNING:waitress: unhandled close event
Error in sys.excepthook:
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "aqt.taskman", line 142, in _on_closures_pending
  File "aqt.taskman", line 86, in <lambda>
  File "aqt.progress", line 239, in do_window_cleanup
RuntimeError: wrapped C/C++ object of type QTimer has been deleted

When it succeeds in closing anki properly -

2024-04-08 09:16:46,310:WARNING:waitress: unhandled close event
1 Like

Thanks, that gives us a hint. I’ve logged this on Anki 24.04 does not close properly · Issue #3126 · ankitects/anki · GitHub

1 Like