ANKI quit unexpectedly on Monterey 12.6.1, from Add/Browse screens

Dear users (hopefully more tech-saavy :wink: )

I have only installed ANKI about two weeks ago - I´m on Macbook, OS Monterey, version 12.6.1, chip Apple M1 (I installed the Silicon version of ANKI).

For the first two days ANKI worked fine, and then - all of a sudden - it started crashing after I leave the Add or Browse screens. I open ANKI, then I choose the deck, then I use Add/Browse, and when I click the red mark to close it - the whole app closes/quits and I immediately get the “Reopen/Ignore/Send to Apple” screen. There is no specific error message, but there are logs from the “Send to Apple” (I saved them and will try to add them to this thread).

I have performed the following action (following (When problem occurs page):

  • I searched the forum but only found a few threads with suggestions that I personally did not identify as solutions for my issues (but, I have no idea about crashing on Mac…) :frowning:
  • I closed the app naturally a few times (I opened ANKI, synchronized, and closed - a few times).
  • I restarted my laptop.
  • I opened ANKI without any add-ons (I have AwesomeTTT, Relplay button and Big Colorful Buttons installed, nothing else).
  • I checked the database, performed with no issues.
  • I reinstalled ANKI for the Intel processor.
  • I reinstalled ANKI for the last stable version (when it started crashing after a few openes during the dane, I went back to the latest Silicon version).
  • I updated my system to the latest Monterey updates.
  • I didn’t do anhything for video codecs becuase there was no link to Macbook (I’m not very computer-savvy).

However, after a few uses (even within one day), the app goes back to crashing every time I exit Add/Browse screens, sometimes randomly as well… I’m at the end of my wits :frowning:

Can anyone help please? And if you can, please be detailes, as you’re speaking to a 5yo child so I can understand :wink:

Thank you!!

1 Like

There is a limit on characters, so the forum won’t accept the log information - is there a way I can attach a Notepad file, maybe? Or is there a specific part of the log I could provide?

Please include the first ~100 lines of the logs here. What language are you typing in to your cards?

Hi! I’m using Polish, Swedish and Spanish. I thought maybe the AwesomeTTS is messing the file with sounds, but when I used ANKI without add-ons (with shift), it kept quitting anyway :slight_smile:

Here is the crash report, if it’s not enough I have the rest :wink:

Process: anki [29168]
Path: /Applications/Anki.app/Contents/MacOS/anki
Identifier: net.ankiweb.dtop
Version: 2.1.54 (???)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 2077178859

Date/Time: 2022-10-30 23:11:01.8806 +0100
OS Version: macOS 12.6.1 (21G217)
Report Version: 12
Anonymous UUID: 6DD8A849-EF8F-E9C9-9963-B235B84EEDBC

Sleep/Wake UUID: A23802EE-3EB6-4E9C-8824-DD092BF0D07D

Time Awake Since Boot: 120000 seconds
Time Since Wake: 90030 seconds

System Integrity Protection: enabled

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Codes: 0x0000000000000001, 0x0000000000000018
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [29168]

VM Region Info: 0x18 is not in any region. Bytes before following region: 105553518919656
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
—>
MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL …(unallocated)

Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - Compressor failed a blocking pager_get

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 QtGui 0x10edf6198 QPlatformWindow::window() const + 0
1 libqcocoa.dylib 0x1118b2404 0x11184c000 + 418820
2 AppKit 0x1c699bfa8 -[NSTextInputContext(NSInputContext_WithCompletion) selectedRangeWithCompletionHandler:] + 100
3 AppKit 0x1c68774d8 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2196
4 AppKit 0x1c6876bc8 _NSTSMEventHandler + 348
5 HIToolbox 0x1cc71e6c8 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1084
6 HIToolbox 0x1cc71db4c SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
7 HIToolbox 0x1cc71d9dc SendEventToEventTargetWithOptions + 44
8 HIToolbox 0x1cc77c7bc SendTSMEvent_WithCompletionHandler + 496
9 HIToolbox 0x1cc95e7dc __SendTextInputEvent_WithCompletionHandler_block_invoke + 564
10 HIToolbox 0x1cc95cd38 SendTextInputEvent_WithCompletionHandler + 1064
11 HIToolbox 0x1cc9c2824 -[IMKInputSession _postEvent:completionHandler:] + 184
12 HIToolbox 0x1cc9d4bcc -[IMKInputSession selectedRange_withCompletionHandler:] + 300
13 HIToolbox 0x1cc9c3144 __49-[IMKInputSession imkxpc_selectedRangeWithReply:]_block_invoke + 452
14 CoreFoundation 0x1c3b04a54 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28
15 CoreFoundation 0x1c3b048cc __CFRunLoopDoBlocks + 412
16 CoreFoundation 0x1c3b038dc __CFRunLoopRun + 1720
17 CoreFoundation 0x1c3b02a84 CFRunLoopRunSpecific + 600
18 HIToolbox 0x1cc746338 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x1cc745fc4 ReceiveNextEventCommon + 324
20 HIToolbox 0x1cc745e68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
21 AppKit 0x1c666a51c _DPSNextEvent + 860
22 AppKit 0x1c6668e14 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
23 AppKit 0x1c665afe0 -[NSApplication run] + 596
24 libqcocoa.dylib 0x111860200 0x11184c000 + 82432
25 QtCore 0x10c4b2cfc QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 544
26 QtCore 0x10c4a9d54 QCoreApplication::exec() + 128
27 QtWidgets.abi3.so 0x11083e2b4 meth_QApplication_exec(_object*, _object*) + 96
28 anki 0x104b868bc cfunction_call + 104
29 anki 0x104b3f884 _PyObject_MakeTpCall + 136
30 anki 0x104c3dd38 _PyEval_EvalFrameDefault + 24852
31 anki 0x104b40b88 _PyFunction_Vectorcall + 712
32 anki 0x104c4097c call_function + 124
33 anki 0x104c3bb10 _PyEval_EvalFrameDefault + 16108
34 anki 0x104b409b0 _PyFunction_Vectorcall + 240
35 anki 0x104c3cba8 _PyEval_EvalFrameDefault + 20356
36 anki 0x104c40d4c PyEval_EvalCode + 568
37 anki 0x104c37b20 PyEval_EvalCode + 80
38 anki 0x104c8bc98 run_mod + 152
39 anki 0x104c8b1f4 PyRun_StringFlags + 152
40 anki 0x104c8b118 PyRun_SimpleStringFlags + 64
41 anki 0x104b23684 Py_RunMain + 232
42 anki 0x1048fd924 pyembed::interpreter::MainPythonInterpreter::run::h6deb1b8d91fedaa9 + 192
43 anki 0x1048f4468 anki::main::hd79f166908327261 + 820
44 anki 0x1048f400c std::sys_common::backtrace::__rust_begin_short_backtrace::h703820edb0d12123 + 12
45 anki 0x1048f4024 std::rt::lang_start::
$u7b$$u7b$closure$u7d$$u7d$::h0963fd2fe8a413ab + 16
46 anki 0x1052e964c std::rt::lang_start_internal::h35c587f98e9244f6 + 44
47 anki 0x1048f460c main + 48
48 dyld 0x10808508c start + 520

Thread 1:
0 libsystem_pthread.dylib 0x1c3a33078 start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x1c3a33078 start_wqthread + 0

Thread 3:
0 libsystem_pthread.dylib 0x1c3a33078 start_wqthread + 0

Thread 4:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x1c3a05598 __select + 8
1 CoreFoundation 0x1c3b2f808 __CFSocketManager + 644
2 libsystem_pthread.dylib 0x1c3a3826c _pthread_start + 148
3 libsystem_pthread.dylib 0x1c3a3308c thread_start + 8

The error message does look like the issue could be related to text input. If you experiment a bit, do the crashes seem connected to one of those languages - eg if you only input Polish and Spanish for example, do they go away? It looks like a bug in the toolkit Anki’s built on unfortunately.

Hi! Please give me a little while to test it, I didn’t pay any attention to this. For some reason, I thought turning the add-ons means it’s not connected to languages - but now that you mentioned it, they seem to be two different things… I will play around today and tomorrow and I will report later!

Update after a few days of putting various languages into a testing deck, using sounds and all the weird letters :slight_smile: Well… So far so good! Like, literally, just the fact that you took an interest scared the error, I guess! I swear to god, I did all the things before, and it was crashing, and now it behaves well!

I’m testing every day, adding random languages and letters and I’ll let you know immediately when things crash :slight_smile: Thank you!

Hopefully it stays that way! :crossed_fingers:

So far so good, and I’ve been using different card types, switching between online and app, and using mobile! So yay! Let’s keep our fingers crossed for infinite days, haha! Thanks!

P.S. I think it was one of those cases when it doesn’t work for you, and then It comes over and bam! it works! So maybe it was enough that you @dae ! So thanks!

Dear @dae , it just now started happening again. I have no idea if this is related: I switched between Polish and Spanish on one card (I did this multiple times before as well), and it crashed. Immediately after I received a request to update AwesomeTTS. I did, re-opened ANKI a few times (every time now when I’m in Add/Browse and leave the screen the app quits. I also open ANKI and did nothing, rebuild the database, and closed without entering Add/Browse screen. And then I opened ANKI with shift, so no add-ons, and the same thing was happening.

This is the beginning of the crash log:

rocess: anki [16319]
Path: /Applications/Anki.app/Contents/MacOS/anki
Identifier: net.ankiweb.dtop
Version: 2.1.54 (???)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 2077178859

Date/Time: 2022-11-11 13:04:22.3207 +0100
OS Version: macOS 12.6.1 (21G217)
Report Version: 12
Anonymous UUID: 6DD8A849-EF8F-E9C9-9963-B235B84EEDBC

Sleep/Wake UUID: 928D0AC8-E596-45E3-8F11-857EFF0B627D

Time Awake Since Boot: 70000 seconds
Time Since Wake: 13424 seconds

System Integrity Protection: enabled

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Codes: 0x0000000000000001, 0x0000000000000018
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [16319]

VM Region Info: 0x18 is not in any region. Bytes before following region: 105553518919656
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
—>
MALLOC_NANO (reserved) 600018000000-600020000000 [128.0M] rw-/rwx SM=NUL …(unallocated)

Kernel Triage:
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage
VM - pmap_enter failed with resource shortage

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 QtGui 0x10d012198 QPlatformWindow::window() const + 0
1 libqcocoa.dylib 0x10fac6404 0x10fa60000 + 418820
2 AppKit 0x199047fa8 -[NSTextInputContext(NSInputContext_WithCompletion) selectedRangeWithCompletionHandler:] + 100
3 AppKit 0x198f234d8 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2196
4 AppKit 0x198f22bc8 _NSTSMEventHandler + 348
5 HIToolbox 0x19edca6c8 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1084
6 HIToolbox 0x19edc9b4c SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
7 HIToolbox 0x19edc99dc SendEventToEventTargetWithOptions + 44
8 HIToolbox 0x19ee287bc SendTSMEvent_WithCompletionHandler + 496
9 HIToolbox 0x19f00a7dc __SendTextInputEvent_WithCompletionHandler_block_invoke + 564
10 HIToolbox 0x19f008d38 SendTextInputEvent_WithCompletionHandler + 1064
11 HIToolbox 0x19f06e824 -[IMKInputSession _postEvent:completionHandler:] + 184
12 HIToolbox 0x19f080bcc -[IMKInputSession selectedRange_withCompletionHandler:] + 300
13 HIToolbox 0x19f06f144 __49-[IMKInputSession imkxpc_selectedRangeWithReply:]_block_invoke + 452
14 CoreFoundation 0x1961b0a54 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28
15 CoreFoundation 0x1961b08cc __CFRunLoopDoBlocks + 412
16 CoreFoundation 0x1961af8dc __CFRunLoopRun + 1720
17 CoreFoundation 0x1961aea84 CFRunLoopRunSpecific + 600
18 HIToolbox 0x19edf2338 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x19edf1fc4 ReceiveNextEventCommon + 324
20 HIToolbox 0x19edf1e68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
21 AppKit 0x198d1651c _DPSNextEvent + 860
22 AppKit 0x198d14e14 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
23 AppKit 0x198d06fe0 -[NSApplication run] + 596
24 libqcocoa.dylib 0x10fa74200 0x10fa60000 + 82432
25 QtCore 0x10a6cecfc QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 544
26 QtCore 0x10a6c5d54 QCoreApplication::exec() + 128
27 QtWidgets.abi3.so 0x10ea5a2b4 meth_QApplication_exec(_object*, _object*) + 96
28 anki 0x102da28bc cfunction_call + 104
29 anki 0x102d5b884 _PyObject_MakeTpCall + 136
30 anki 0x102e59d38 _PyEval_EvalFrameDefault + 24852
31 anki 0x102d5cb88 _PyFunction_Vectorcall + 712
32 anki 0x102e5c97c call_function + 124
33 anki 0x102e57b10 _PyEval_EvalFrameDefault + 16108
34 anki 0x102d5c9b0 _PyFunction_Vectorcall + 240
35 anki 0x102e58ba8 _PyEval_EvalFrameDefault + 20356
36 anki 0x102e5cd4c PyEval_EvalCode + 568
37 anki 0x102e53b20 PyEval_EvalCode + 80
38 anki 0x102ea7c98 run_mod + 152
39 anki 0x102ea71f4 PyRun_StringFlags + 152
40 anki 0x102ea7118 PyRun_SimpleStringFlags + 64
41 anki 0x102d3f684 Py_RunMain + 232
42 anki 0x102b19924 pyembed::interpreter::MainPythonInterpreter::run::h6deb1b8d91fedaa9 + 192
43 anki 0x102b10468 anki::main::hd79f166908327261 + 820
44 anki 0x102b1000c std::sys_common::backtrace::__rust_begin_short_backtrace::h703820edb0d12123 + 12
45 anki 0x102b10024 std::rt::lang_start::
$u7b$$u7b$closure$u7d$$u7d$::h0963fd2fe8a413ab + 16
46 anki 0x10350564c std::rt::lang_start_internal::h35c587f98e9244f6 + 44
47 anki 0x102b1060c main + 48
48 dyld 0x10647108c start + 520

Any ideas? Now it crashes every time after I’m done with Add-Browser )it doesn´t crash after adding cards, just after the final exit from the window it also doesn´t crash when I´m entering other features (Study session or Stats, for example).

If it’s happening after restarting Anki, that seems to imply something about your computer’s state - maybe a reboot will make it go away for a while? If so, this could be a macOS bug.

Hmm, considering no other software is doing this, and you yourself pointed towards a text input window in ANKI, the “macOS bug” sounds uncertain… Now I’m back to the error behavior :frowning:

Did you try rebooting to see if it made any difference?

Always :slight_smile: Currently the state of things is that it works for a day or two, and then starts crashing again, so I have to delete it and install again, and then it works for a while and then crashes. It’s not the worst solution (my files stay in, even after it crashed using Add, the card I added is actually added), but of course a little bothersome :slight_smile:

That’s surprising - I would not expect removing/reinstalling the app to make a difference. Is it possible there’s another explanation, such as a certain amount of time elapsing or some other action you’re taking?

In any case, I’m afraid this is probably not something we can easily address - it’s likely either a bug in the toolkit Anki is built on, or in macOS that the toolkit is somehow managing to trigger. The fact that it comes and goes could mean that the issue is sensitive to the state of the machine, such as what happens to be in memory at the time.

Some things you could try:

  • the latest beta version, which uses an updated toolkit: Anki 2.1.55 Beta 3+
  • the slower Intel version of Anki, either Qt5 or Qt6

Yes, I’m already playing with different installation packages. I think I accepted this fate, at least until I can find a replacement. Sadly, because I love what you’ve done, this is not a very efficient way of using ANKI. Maybe next version will help :slight_smile:

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