mortii / anki-morphs

A MorphMan fork rebuilt from the ground up with a focus on simplicity, performance, and a codebase with minimal technical debt.
https://mortii.github.io/anki-morphs/
Mozilla Public License 2.0
52 stars 7 forks source link

Anki crashes when trying to set the note type in Ankimorphs settings #117

Closed wrinkledeth closed 8 months ago

wrinkledeth commented 8 months ago

Describe the bug Anki crashes when trying to set the note type in Ankimorphs settings

To Reproduce

  1. Open anki
  2. Tools -> ankimorphs -> settings
  3. Click note type dropdown and attempt to set it to my subs2srs card type
  4. Anki Crashes

Console Output ➜ MacOS ./anki
Anki starting... Initial setup... Preparing to run... Qt debug: doh set to "" -- SystemOnly Starting main loop... conf key heatmap should be fetched with col.get_config(), and saved with col.set_config() conf key heatmap should be fetched with col.get_config(), and saved with col.set_config() conf key heatmap should be fetched with col.get_config(), and saved with col.set_config() Qt warning: skipping QEventPoint(id=1 ts=0 pos=0,0 scn=1839.12,183.132 gbl=1839.12,183.132 Released ellipse=(1x1 ∡ 0) vel=0,0 press=-1839.12,-183.132 last=-1839.12,-183.132 Δ 1839.12,183.132) : no target window Using ankimorphs: AnkiMorphs with command line ['/Users/zen/Library/Application Support/Anki2/addons21/472573498/deps/mecab/mecab', '--node-format=%m[%f[7]] ', '--eos-format=\n', '--unk-format=%m[] ', '-d', '/Users/zen/Library/Application Support/Anki2/addons21/472573498/deps/mecab', '-r', '/Users/zen/Library/Application Support/Anki2/addons21/472573498/deps/mecab/mecabrc'] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array' *** First throw call stack: ( 0 CoreFoundation 0x00000001888ac570 exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018839deb4 objc_exception_throw + 60 2 CoreFoundation 0x0000000188822d10 -[__NSCFString hasSuffix:] + 0 3 libqcocoa.dylib 0x000000010f52a044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796 4 libqcocoa.dylib 0x000000010f52a0c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928 5 libqcocoa.dylib 0x000000010f528688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208 6 QtWidgets 0x000000010e59d1a8 ZN9QListView16selectionChangedERK14QItemSelectionS2 + 204 7 QtCore 0x0000000109d5b48c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808 8 QtCore 0x0000000109f21e44 ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2 + 216 9 QtCore 0x0000000109f21a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636 10 QtCore 0x0000000109f2170c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68 11 QtCore 0x0000000109f228cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260 12 QtWidgets 0x000000010e3fb338 _ZNK9QComboBox5countEv + 828 13 QtWidgets 0x000000010e3fe8b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412 14 QtCore 0x0000000109d5b224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192 15 QtCore 0x0000000109f0a944 _ZN18QAbstractItemModel13endInsertRowsEv + 200 16 QtGui 0x000000010cf3b1a8 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 844 17 QtWidgets 0x000000010e401e38 _ZN9QComboBox11insertItemsEiRK5QListI7QStringE + 340 18 QtWidgets.abi3.so 0x000000010f0f6a14 _ZL23meth_QComboBox_addItemsP7objectS0 + 136 19 anki 0x00000001030ddf04 cfunction_call + 104 20 anki 0x0000000103097460 _PyObject_MakeTpCall + 136 21 anki 0x0000000103197cec _PyEval_EvalFrameDefault + 23972 22 anki 0x0000000103098508 _PyFunction_Vectorcall + 240 23 anki 0x000000010309ab08 method_vectorcall + 276 24 anki 0x0000000102f5e5bc partial_vectorcall + 396 25 QtCore.abi3.so 0x0000000107c4e4c4 _ZNK8PyQtSlot4callEP7objectS1 + 156 26 QtCore.abi3.so 0x0000000107c4e2d8 _ZNK8PyQtSlot6invokeEPPvP7_objectS0_b + 296 27 QtCore.abi3.so 0x0000000107c4f2c8 _ZN13PyQtSlotProxy7unislotEPPv + 92 28 QtCore.abi3.so 0x0000000107c4f238 _ZN13PyQtSlotProxy11qt_metacallEN11QMetaObject4CallEiPPv + 68 29 QtCore 0x0000000109d5b1f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144 30 QtWidgets 0x000000010e3fe978 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2608 31 QtWidgets 0x000000010e3fb358 _ZNK9QComboBox5countEv + 860 32 QtWidgets 0x000000010e3fe28c _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 836 33 QtCore 0x0000000109d5b224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192 34 QtWidgets 0x000000010e3fd9a8 _ZN25QComboBoxPrivateContainer11eventFilterEP7QObjectP6QEvent + 920 35 QtCore 0x0000000109d11748 _ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent + 244 36 QtWidgets 0x000000010e2e8574 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 240 37 QtWidgets 0x000000010e2ea5c0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5072 38 QtWidgets.abi3.so 0x000000010efff890 _ZN15sipQApplication6notifyEP7QObjectP6QEvent + 248 39 QtCore 0x0000000109d11474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292 40 QtWidgets 0x000000010e2e8b34 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808 41 QtWidgets 0x000000010e346cdc _ZNK21QWidgetRepaintManager3rhiEv + 12228 42 QtWidgets 0x000000010e345a6c _ZNK21QWidgetRepaintManager3rhiEv + 7508 43 QtWidgets 0x000000010e2e8594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272 44 QtWidgets 0x000000010e2e93e8 _ZN12QApplication6notifyEP7QObjectP6QEvent + 504 45 QtWidgets.abi3.so 0x000000010efff890 _ZN15sipQApplication6notifyEP7QObjectP6QEvent + 248 46 QtCore 0x0000000109d11474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292 47 QtGui 0x000000010cc979ec _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1740 48 QtGui 0x000000010ccf3674 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 408 49 libqcocoa.dylib 0x000000010f4cbd74 qt_plugin_instance + 58768 50 CoreFoundation 0x0000000188837a4c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 51 CoreFoundation 0x00000001888379e0 CFRunLoopDoSource0 + 176 52 CoreFoundation 0x0000000188837750 CFRunLoopDoSources0 + 244 53 CoreFoundation 0x0000000188836340 __CFRunLoopRun + 828 54 CoreFoundation 0x00000001888359ac CFRunLoopRunSpecific + 608 55 HIToolbox 0x0000000192de4448 RunCurrentEventLoopInMode + 292 56 HIToolbox 0x0000000192de40d8 ReceiveNextEventCommon + 220 57 HIToolbox 0x0000000192de3fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76 58 AppKit 0x000000018c0128a4 _DPSNextEvent + 660 59 AppKit 0x000000018c7ec980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716 60 AppKit 0x000000018c005d50 -[NSApplication run] + 476 61 libqcocoa.dylib 0x000000010f4c98fc qt_plugin_instance + 49432 62 QtCore 0x0000000109d1b160 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 540 63 QtCore 0x0000000109d11b00 _ZN16QCoreApplication4execEv + 112 64 QtWidgets.abi3.so 0x000000010f1083f4 _ZL22meth_QApplication_execP7objectS0 + 96 65 anki 0x00000001030ddf04 cfunction_call + 104 66 anki 0x0000000103097460 _PyObject_MakeTpCall + 136 67 anki 0x0000000103197cec _PyEval_EvalFrameDefault + 23972 68 anki 0x00000001030986e8 _PyFunction_Vectorcall + 720 69 anki 0x0000000103195f78 _PyEval_EvalFrameDefault + 16432 70 anki 0x0000000103098508 _PyFunction_Vectorcall + 240 71 anki 0x0000000103196e68 _PyEval_EvalFrameDefault + 20256 72 anki 0x000000010319b32c _PyEval_EvalCode + 532 73 anki 0x0000000103191e44 PyEval_EvalCode + 80 74 anki 0x00000001031e5e5c run_mod + 152 75 anki
libc++abi: terminating due to uncaught exception of type NSException [1] 29405 abort ./anki

Desktop (please complete the following information):

wrinkledeth commented 8 months ago

I think this is a separate issue unrelated to AnkiMorphs as it crashes on Anki23 even when i just hit "Browse"

May be related to this: https://forums.ankiweb.net/t/anki-quit-unexpectedly-on-monterey-12-6-1-from-add-browse-screens/24341/17

mortii commented 8 months ago

@wrinkledeth Did you get it working? I don't have that problem on my monterey macbook using anki 23.12.1 qt6, intel.

wrinkledeth commented 8 months ago

Yes I did, it was fixed in the newest release on github.

image

I was on 23.12 before.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.