[Bug] Anki freeze when I paste text to Add

When I try to paste text to “Add”, the entire Anki freeze.

Anki Version: 25.02
OS: KUbuntu 24.10

After I downgrade the Anki to 24.11 (Qt6), the issue disappears.

Can you go through Troubleshooting - Anki Manual?

1 Like

I’ve gone through the trouble shooting guide but it does not help. The only way to fix it is to downgrade to 24.11.

  1. What string do you try to paste?
  2. Does it always happen with any string? Or only with strings containing e.g. html, or media, …?
  3. If you run anki in a terminal and the add dialog freezes, what output do you get?

It seems that after a day 24.11 also have the same issue.

  1. just normal string without any special character. (e.g. “What is streaming?”)
  2. yes.
  3. here is the output
Anki starting...
Initial setup...
Preparing to run...
Wayland support is disabled by default due to bugs:
https://github.com/ankitects/anki/issues/1767
You can force it on with an env var: ANKI_WAYLAND=1
2025-04-10 10:40:37,291:INFO:aqt.mediasrv: Serving on http://127.0.0.1:38475
Starting main loop...
mpv not found, reverting to mplayer
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/noerrors
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mathtools
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mhchem
use clipboard

Also it seems that after each install it will work for a while. not sure what’s going on.

1 Like

Very odd.

Can you do the following?

  1. Run anki in a debugger with gdb --args anki --safemode.
  2. Inside of that debugger, start debugging with r.
  3. Get anki to freeze.
  4. Close debugger with q.
  5. Paste the output of the debugger here.

Not sure if it will actually show anything useful considering there are no debugging symbols in the release build and anki doesn’t crash in your case. But it’s worth a try.

(And if it does crash, can you run bt full inside of the debugger, please? It should return a longer backtrace)