I’ve facing a bug where Anki crashes. This occurs after doing the following:
Opening the “Browse” window
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 is a screen recording replicating the bug (file super compressed as this forum only allows small file sizes):
I open Anki, the “Browse” window, then press a hotkey to fully extend the window.
Anki crashes.
I reopen Anki, reset window sizes, open the “Browse” window, and successfully use the hotkey to extend the window without crashing Anki.
I close/quit Anki.
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
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?
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.
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.