Apologies if there is somewhere else I should report this, and all suggestions welcome:
as listed above, newly downloaded Anki 23.12 on Mac crashes each time I try to access the browser (either via click on top bar or via keyboard shortcut ‘b’).
Seems to occur more often in full-screen mode, and less often in windowed mode, though still seems random. Full crash report below as follows:
The bug seems to be imminently reproducible, so I’m happy to tailor any part of the report if it’s easier (I’m too much of a noob to know which part of the report to highlight or emphasize).
Seeing the same behavior here, @dae. Can reliably reproduce on a clean config folder when clicking on Browse from a maximized main window. Qt5 build seems unaffected.
CLI output & callstack
Anki starting...
Initial setup...
Preparing to run...
Qt debug: doh set to "" -- SystemOnly
Starting main loop...
2023-12-25 13:28:35.732 anki[61832:1521708] TSMSendMessageToUIServer: CFMessagePortSendRequest FAILED(-1) to send to port com.apple.tsm.uiserver
JS warning /_anki/js/editor.js:438 No version information available for component [tex]/noerrors
JS warning /_anki/js/editor.js:438 No version information available for component [tex]/mathtools
JS warning /_anki/js/editor.js:438 No version information available for component [tex]/mhchem
2023-12-25 13:28:37.482 anki[61832:1521708] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x00000001bfa350b8 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001bf77f8dc objc_exception_throw + 60
2 CoreFoundation 0x00000001bfb07158 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x00000001bf9a0a5c -[__NSArrayM objectAtIndexedSubscript:] + 188
4 libqcocoa.dylib 0x000000010d11a044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796
5 libqcocoa.dylib 0x000000010d11a0c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928
6 libqcocoa.dylib 0x000000010d118688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208
7 QtWidgets 0x000000010c18d1a8 _ZN9QListView16selectionChangedERK14QItemSelectionS2_ + 204
8 QtCore 0x0000000107bc348c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808
9 QtCore 0x0000000107d89e44 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 216
10 QtCore 0x0000000107d89a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636
11 QtCore 0x0000000107d8970c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68
12 QtCore 0x0000000107d8a8cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260
13 QtWidgets 0x000000010bfeb338 _ZNK9QComboBox5countEv + 828
14 QtWidgets 0x000000010bfee8b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412
15 QtCore 0x0000000107bc3224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192
16 QtCore 0x0000000107d72944 _ZN18QAbstractItemModel13endInsertRowsEv + 200
17 QtGui 0x000000010ab2b1a8 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 844
18 QtWidgets 0x000000010bff1e38 _ZN9QComboBox11insertItemsEiRK5QListI7QStringE + 340
19 QtWidgets.abi3.so 0x000000010cce6a14 _ZL23meth_QComboBox_addItemsP7_objectS0_ + 136
20 anki 0x0000000100de5f04 cfunction_call + 104
21 anki 0x0000000100d9f460 _PyObject_MakeTpCall + 136
22 anki 0x0000000100e9fcec _PyEval_EvalFrameDefault + 23972
23 anki 0x0000000100ea332c _PyEval_EvalCode + 532
24 anki 0x0000000100da05b4 _PyFunction_Vectorcall + 412
25 anki 0x0000000100da2a74 method_vectorcall + 128
26 anki 0x0000000100e9ee68 _PyEval_EvalFrameDefault + 20256
27 anki 0x0000000100ea332c _PyEval_EvalCode + 532
28 anki 0x0000000100da05b4 _PyFunction_Vectorcall + 412
29 anki 0x0000000100da09d4 _PyObject_Call_Prepend + 312
30 anki 0x0000000100e0c8a0 slot_tp_init + 256
31 anki 0x0000000100e02ec8 type_call + 316
32 anki 0x0000000100da0150 PyObject_Call + 200
33 anki 0x0000000100e9a4ac _PyEval_EvalFrameDefault + 1380
34 anki 0x0000000100ea332c _PyEval_EvalCode + 532
35 anki 0x0000000100da05b4 _PyFunction_Vectorcall + 412
36 anki 0x0000000100da2a74 method_vectorcall + 128
37 anki 0x0000000100e9e008 _PyEval_EvalFrameDefault + 16576
38 anki 0x0000000100da0508 _PyFunction_Vectorcall + 240
39 anki 0x0000000100da2b8c method_vectorcall + 408
40 QtCore.abi3.so 0x0000000105aca46c _ZNK8PyQtSlot4callEP7_objectS1_ + 68
41 QtCore.abi3.so 0x0000000105aca2d8 _ZNK8PyQtSlot6invokeEPPvP7_objectS0_b + 296
42 QtCore.abi3.so 0x0000000105acb2c8 _ZN13PyQtSlotProxy7unislotEPPv + 92
43 QtCore.abi3.so 0x0000000105acb238 _ZN13PyQtSlotProxy11qt_metacallEN11QMetaObject4CallEiPPv + 68
44 QtCore 0x0000000107bc31f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144
45 QtGui 0x000000010aba82b4 _ZN9QShortcut5eventEP6QEvent + 152
46 QtGui.abi3.so 0x0000000109d99330 _ZN12sipQShortcut5eventEP6QEvent + 224
47 QtWidgets 0x000000010bed8594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
48 QtWidgets 0x000000010bed93e8 _ZN12QApplication6notifyEP7QObjectP6QEvent + 504
49 QtWidgets.abi3.so 0x000000010cbef890 _ZN15sipQApplication6notifyEP7QObjectP6QEvent + 248
50 QtCore 0x0000000107b79474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
51 QtGui 0x000000010abab278 _ZN12QShortcutMap13dispatchEventEP9QKeyEvent + 1956
52 QtGui 0x000000010abaa718 _ZN12QShortcutMap11tryShortcutEP9QKeyEvent + 156
53 QtGui 0x000000010a8e0b8c _ZN22QWindowSystemInterface19handleShortcutEventEP7QWindowmi6QFlagsIN2Qt16KeyboardModifierEEjjjRK7QStringbt + 408
54 libqcocoa.dylib 0x000000010d1027d4 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 178428
55 libqcocoa.dylib 0x000000010d101778 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 174240
56 libqcocoa.dylib 0x000000010d102a58 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 179072
57 AppKit 0x00000001c268ce24 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 5908
58 AppKit 0x00000001c268b4a8 -[NSWindow(NSEventRouting) sendEvent:] + 348
59 libqcocoa.dylib 0x000000010d10ab14 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 212028
60 AppKit 0x00000001c268a450 -[NSApplication(NSEvent) sendEvent:] + 2780
61 libqcocoa.dylib 0x000000010d0adc00 qt_plugin_instance + 1052
62 AppKit 0x00000001c2944090 -[NSApplication _handleEvent:] + 76
63 AppKit 0x00000001c250bfa4 -[NSApplication run] + 636
64 libqcocoa.dylib 0x000000010d0b98fc qt_plugin_instance + 49432
65 QtCore 0x0000000107b83160 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 540
66 QtCore 0x0000000107b79b00 _ZN16QCoreApplication4execEv + 112
67 QtWidgets.abi3.so 0x000000010ccf83f4 _ZL22meth_QApplication_execP7_objectS0_ + 96
68 anki 0x0000000100de5f04 cfunction_call + 104
69 anki 0x0000000100d9f460 _PyObject_MakeTpCall + 136
70 anki 0x0000000100e9fcec _PyEval_EvalFrameDefault + 23972
71 anki 0x0000000100da06e8 _PyFunction_Vectorcall + 720
72 anki 0x0000000100e9df78 _PyEval_EvalFrameDefault + 16432
73 anki 0x0000000100da0508 _PyFunction_Vectorcall + 240
74 anki 0x0000000100e9ee68 _PyEval_EvalFrameDefault + 20256
75 anki 0x0000000100ea332c _PyEval_EvalCode + 532
76 anki 0x0000000100e99e44 PyEval_EvalCode + 80
77 anki 0x0000000100eede5c run_mod + 152
78 anki 0x0000000100eed3b8 PyRun_StringFlags + 152
79 anki 0x0000000100eed2dc PyRun_SimpleStringFlags + 64
80 anki 0x0000000100d0149c Py_RunMain + 340
81 anki 0x0000000100ae4a50 _ZN4anki4main17h6f7efa0d73b239c5E + 1500
82 anki 0x0000000100ae400c _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h654a6c9cd5039fffE + 12
83 anki 0x0000000100ae5dd4 main + 1180
84 dyld 0x0000000103ae908c start + 520
)
libc++abi: terminating with uncaught exception of type NSException
[1] 61832 abort /Applications/Anki/23.12.app/Contents/MacOS/anki -b Tests/Anki/23-12-clean
[61841:259:1225/132837.505702:ERROR:mach_port_rendezvous.cc(311)] bootstrap_look_up org.chromium.Chromium.MachPortRendezvousServer.1: Permission denied (1100)
[61841:259:1225/132837.505885:ERROR:child_thread_impl.cc(230)] Mach rendezvous failed, terminating process (parent died?)
Potentially related Qt bugs. Seems to happen while adding items to a combo box. If it’s this issue with the a11y system, 6.6.2 should fix things. However, in contrast to the call stacks there, there’s no mention of accessibility in the logs above.
I noticed this issue of not being able to access the card browser window in all of the 23.12 betas as well as the public release. I mentioned this issue in the Anki 23.12 Beta thread by @Freezable0596as well. It seems like this is an issue with the MacOS 14.2 on apple silicon.
I also can not access the preferences pane either with the MacOS menu bar or with the shortcut (cmd + comma).
Mentioned troubleshooting steps I have tried and have not worked:
renaming prefs21.db at ~/Library/Application Support/Anki2
It seems like the Qt5 and Qt6 verisons have some variation of the same issue.
Small workaround I found:
revert to last functional anki version (23.10)
open preferences panel and change video driver from metal to software
open anki 23.12 and open browse window
Closing the browse window and trying to open it again afterwards will crash anki in the same manner as before. I still can’t open the preferences pane. Happy Holidays!
running in terminal ./Anki.app/Contents/MacOS/anki shows the error attached at the end, quick search on github suggest its’s a qt6 issue which should be now fixed upstream, maybe need to update the qt on anki’s side?
Neither of my two machines could reproduce the issue out of the box. When I turned VoiceOver on, it started to reliably crash. If you’re not using VoiceOver, my guess is either you have another accessibility feature enabled, or you have a third-party tool running that is hooking into macOS’s accessibility features. Workarounds for now would be to disable VoiceOver/the tool, or switch to the Qt5 version of Anki. Qt 6.6.2 should fix it, but it’ll be 3-4 weeks until that’s available.
If you figure out the tool that’s causing the issue for you, please post it here, as it may help others.