Anki Browse Window Crashes When Using Window Tiling App (Mac)

Hi all,

I’ve facing a bug where Anki crashes. This occurs after doing the following:

  1. Opening the “Browse” window
  2. Pressing hotkeys on a window tiling app to “tile” the new window. I’m specifically using a Mac app called “Rectangle”.

I’ve done all of the Anki Manual Troubleshooting steps. The one thing that does work is reseting window sizes, however, it has to be done every time before opening a new “Browse” window or the issue reappears.

Here (mac-m1-anki-crashes-when-resizing-search-window) is one other user experiencing the same issue, and here (anki-crashes-when-tiling-browse-window-with-rectangle) is another.

Here are details about my system:
Anki version

24.04.1 (ccd9ca1a)⁩
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1

MacOS version

Sonoma 14.5 (23F79)

I can also provide the Apple debug details if they would be helpful.

Thanks all.

I believe it’s a bug in the toolkit Anki’s built on. I can’t seem to trigger it on my machine.

1 Like

I’ll try and post an example and debug data later then. Thanks

Hey @dae or anyone who comes across this thread.

Here is a screen recording replicating the bug (file super compressed as this forum only allows small file sizes):

  1. I open Anki, the “Browse” window, then press a hotkey to fully extend the window.
  2. Anki crashes.
  3. I reopen Anki, reset window sizes, open the “Browse” window, and successfully use the hotkey to extend the window without crashing Anki.
  4. I close/quit Anki.
  5. I repeat step 1 to show that resetting windows only works one time.

Debug info (pulled right after reopening Anki after a crash). I can try and pull from a different point if someone has a better idea:
Anki 24.04.1 (ccd9ca1a)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.5-arm64-arm-64bit

1 Like

Unfortunately I still can’t seem to trigger it - I suspect it’s a timing-related issue that depends on the speed of your computer and size of your collection.

Does it continue to crash when you have View>Layout set to vertical or horizontal rather than auto?

Hey @dae

I tried your suggestion to try View > Layout > Vertical/Horizontal.

I tried both, and was able to reproduce the crash for both options. It specifically crashes after pressing hotkey to tile the window, and wasn’t dependent on whether Layout was Auto/Vertical/Horizontal.

Here is a bug report that appeared to send to Apple following the crash:

Unfortunately this is going to require someone who can build from source and who is able to reproduce the problem, as getting to the bottom of it will involve making experimental changes and rebuilding to see if that helps. I’m not sure at this point whether this is just a Qt bug that we may be able to work around, or whether Anki is doing something improper in the construction of the window.

Ok, thanks @dae

For anyone’s information who may try to rectify this bug, many Mac users use window tiling apps, two of the most popular being Rectangle and Magnet, as it’s not natively implemented in the same way Windows has had Aero forever.

It was also just announced that MacOS Sequoia/15 will finally have native window tiling, which would be released sometime in the Fall of 2024. Currently the features in beta are not very fleshed out compared to the features Rectangle and Magnet offer.

So for anyone weighing whether the bug is worth fixing, maybe these apps become obsolete soon, but also possible they don’t provide the same feature set.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.