Anki crashes when trying to record on Mac

Hi,

Every time I try to record through the microphone, Anki immediately crashes. But when I change the voice recording driver from Qt to PyAudio in the Preferences, it works like a charm. Problem is, when I changed the driver to PyAudio, it says that this driver will soon be deprecated… so I’d appreciate some help here.

The Anki version I have:

Version ⁨2.1.49 (dc80804a)⁩
Python 3.8.6 Qt 5.14.2 PyQt 5.14.2

Thanks

Please click on ‘report’ when it crashes, then copy and paste the first ~200 lines here.

Process:               AnkiMac [6314]
Path:                  /Applications/Anki.app/Contents/MacOS/AnkiMac
Identifier:            net.ankiweb.dtop
Version:               2.1.49 (???)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           AnkiMac [6314]
User ID:               501

Date/Time:             2021-11-09 01:22:38.408 +0000
OS Version:            macOS 11.6 (20G165)
Report Version:        12
Anonymous UUID:        4CF5129D-763C-4D06-99EE-CCF9F12409EE

Sleep/Wake UUID:       15C44AFF-8A63-4BEB-8133-726DF1FF69A4

Time Awake Since Boot: 32000 seconds
Time Since Wake:       360 seconds

System Integrity Protection: enabled

Crashed Thread:        38  com.apple.audio.IOThread.client

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [6314]

Thread 0:: CrBrowserMain  Dispatch queue: com.apple.main-thread
0   libsystem_malloc.dylib        	0x00007fff20194e0e nanov2_allocate_from_block + 258
1   libsystem_malloc.dylib        	0x00007fff20194500 nanov2_allocate + 130
2   libsystem_malloc.dylib        	0x00007fff2019654d nanov2_calloc + 123
3   libsystem_malloc.dylib        	0x00007fff201aeff4 _malloc_zone_calloc + 59
4   com.apple.CoreGraphics        	0x00007fff24faf0da img_data_lock + 4754
5   com.apple.CoreGraphics        	0x00007fff24faa390 CGSImageDataLock + 1230
6   com.apple.CoreGraphics        	0x00007fff24fa9e89 RIPImageDataInitializeShared + 164
7   com.apple.CoreGraphics        	0x00007fff24fa9b4a RIPImageCacheGetRetained + 750
8   com.apple.CoreGraphics        	0x00007fff24fa9614 ripc_AcquireRIPImageData + 384
9   com.apple.CoreGraphics        	0x00007fff24fa8341 ripc_DrawImage + 1180
10  com.apple.CoreGraphics        	0x00007fff24fa7597 CGContextDrawImageWithOptions + 454
11  com.apple.coreui              	0x00007fff26f32cd0 DrawQualifiedAnimationFrameWithOperation + 915
12  com.apple.coreui              	0x00007fff26f32936 DrawAbsoluteAnimationFrameWithOperation + 109
13  com.apple.coreui              	0x00007fff26f326aa CUICoreThemeRenderer::DrawDisclosureTriangle(CUIDescriptor const*) + 346
14  com.apple.coreui              	0x00007fff26f09d41 CUIRenderer::Draw(CGRect, CGContext*, __CFDictionary const*, __CFDictionary const**) + 1833
15  com.apple.coreui              	0x00007fff26f095dd CUIDraw + 172
16  com.apple.AppKit              	0x00007fff22dd3248 __44-[NSAppearance _drawInRect:context:options:]_block_invoke + 83
17  com.apple.AppKit              	0x00007fff22c76e8c -[NSCompositeAppearance _callCoreUIWithBlock:options:requireBezelTintColor:] + 399
18  com.apple.AppKit              	0x00007fff22dd31e6 -[NSAppearance _drawInRect:context:options:] + 111
19  com.apple.AppKit              	0x00007fff22de6333 -[NSButtonCell drawBezelWithFrame:inView:] + 483
20  libqmacstyle.dylib            	0x0000000118e26b43 QMacStyle::drawPrimitive(QStyle::PrimitiveElement, QStyleOption const*, QPainter*, QWidget const*) const + 6707
21  QtWidgets                     	0x000000011391f397 QStyleSheetStyle::drawPrimitive(QStyle::PrimitiveElement, QStyleOption const*, QPainter*, QWidget const*) const + 5703
22  QtWidgets                     	0x0000000113b4d494 QTreeView::drawBranches(QPainter*, QRect const&, QModelIndex const&) const + 1028
23  QtWidgets.abi3.so             	0x000000011330d1e7 sipQTreeView::drawBranches(QPainter*, QRect const&, QModelIndex const&) const + 279
24  QtWidgets                     	0x0000000113b4cb2c QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const + 2812
25  QtWidgets.abi3.so             	0x00000001134554c0 meth_QTreeView_drawRow(_object*, _object*) + 176
26  Python                        	0x000000010dbb15c2 cfunction_call_varargs + 290
27  Python                        	0x000000010dbb0f85 _PyObject_MakeTpCall + 373
28  Python                        	0x000000010dc7f945 call_function + 533
29  Python                        	0x000000010dc7c74e _PyEval_EvalFrameDefault + 25678
30  Python                        	0x000000010dc80734 _PyEval_EvalCodeWithName + 2804
31  Python                        	0x000000010dbb1a6e _PyFunction_Vectorcall + 270
32  Python                        	0x000000010dbb407c method_vectorcall + 396
33  Python                        	0x000000010dbb12ad PyVectorcall_Call + 109
34  sip.cpython-38-darwin.so      	0x00000001126bc9d7 sip_api_call_procedure_method + 199
35  QtWidgets.abi3.so             	0x000000011330d2e2 sipQTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const + 226
36  QtWidgets                     	0x0000000113b4ade8 QTreeView::drawTree(QPainter*, QRegion const&) const + 1080
37  QtWidgets                     	0x0000000113b4a989 QTreeView::paintEvent(QPaintEvent*) + 313
38  QtWidgets.abi3.so             	0x000000011330e488 sipQTreeView::paintEvent(QPaintEvent*) + 120
39  QtWidgets                     	0x00000001138adc28 QWidget::event(QEvent*) + 1096
40  QtWidgets                     	0x0000000113955aad QFrame::event(QEvent*) + 45
41  QtWidgets                     	0x0000000113add639 QAbstractItemView::viewportEvent(QEvent*) + 1417
42  QtWidgets                     	0x0000000113b4a6b5 QTreeView::viewportEvent(QEvent*) + 517
43  QtWidgets.abi3.so             	0x000000011330d4f0 sipQTreeView::viewportEvent(QEvent*) + 192
44  QtCore                        	0x00000001102f4ca4 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 148
45  QtWidgets                     	0x0000000113872f45 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 245
46  QtWidgets                     	0x00000001138743e6 QApplication::notify(QObject*, QEvent*) + 598
47  QtWidgets.abi3.so             	0x000000011342bfea sipQApplication::notify(QObject*, QEvent*) + 234
48  QtCore                        	0x00000001102f49f4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
49  QtWidgets                     	0x000000011389ed4b QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 3467
50  QtWidgets                     	0x00000001138a7ba0 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1120
51  QtWidgets                     	0x000000011389f065 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4261
52  QtWidgets                     	0x00000001138a7ba0 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1120
53  QtWidgets                     	0x000000011389f065 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4261
54  QtWidgets                     	0x00000001138a7ba0 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1120
55  QtWidgets                     	0x000000011389f065 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4261
56  QtWidgets                     	0x00000001138a7ba0 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1120
57  QtWidgets                     	0x00000001138a7a3d QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 765
58  QtWidgets                     	0x000000011389f065 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4261
59  QtWidgets                     	0x00000001138809cc QWidgetRepaintManager::paintAndFlush() + 4844
60  QtWidgets                     	0x0000000113880bd2 QWidgetRepaintManager::sync() + 274
61  QtWidgets                     	0x00000001138ade4d QWidget::event(QEvent*) + 1645
62  QtWidgets                     	0x00000001139c0415 QMainWindow::event(QEvent*) + 277
63  QtWidgets.abi3.so             	0x0000000113380760 sipQMainWindow::event(QEvent*) + 192
64  QtWidgets                     	0x0000000113872f5a QApplicationPrivate::notify_helper(QObject*, QEvent*) + 266
65  QtWidgets                     	0x00000001138743e6 QApplication::notify(QObject*, QEvent*) + 598
66  QtWidgets.abi3.so             	0x000000011342bfea sipQApplication::notify(QObject*, QEvent*) + 234
67  QtCore                        	0x00000001102f49f4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
68  QtCore                        	0x00000001102f5be9 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 809
69  libqcocoa.dylib               	0x000000011681f0e9 QCocoaEventDispatcherPrivate::processPostedEvents() + 313
70  libqcocoa.dylib               	0x000000011681f858 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 40
71  com.apple.CoreFoundation      	0x00007fff204652bc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
72  com.apple.CoreFoundation      	0x00007fff20465224 __CFRunLoopDoSource0 + 180
73  com.apple.CoreFoundation      	0x00007fff20464fa4 __CFRunLoopDoSources0 + 242
74  com.apple.CoreFoundation      	0x00007fff204639cc __CFRunLoopRun + 893
75  com.apple.CoreFoundation      	0x00007fff20462f8c CFRunLoopRunSpecific + 563
76  com.apple.HIToolbox           	0x00007fff286ab1f3 RunCurrentEventLoopInMode + 292
77  com.apple.HIToolbox           	0x00007fff286aaf55 ReceiveNextEventCommon + 587
78  com.apple.HIToolbox           	0x00007fff286aacf3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
79  com.apple.AppKit              	0x00007fff22c6c172 _DPSNextEvent + 864
80  com.apple.AppKit              	0x00007fff22c6a945 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
81  com.apple.AppKit              	0x00007fff22c5cc69 -[NSApplication run] + 586
82  libqcocoa.dylib               	0x000000011681e5d3 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2579
83  QtCore                        	0x00000001102f0a7f QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 431
84  QtCore                        	0x00000001102f5002 QCoreApplication::exec() + 130
85  QtWidgets.abi3.so             	0x000000011351d032 meth_QApplication_exec(_object*, _object*) + 82
86  Python                        	0x000000010dbb15c2 cfunction_call_varargs + 290
87  Python                        	0x000000010dbb0f85 _PyObject_MakeTpCall + 373
88  Python                        	0x000000010dc7f945 call_function + 533
89  Python                        	0x000000010dc7c74e _PyEval_EvalFrameDefault + 25678
90  Python                        	0x000000010dbb18d0 function_code_fastcall + 128
91  Python                        	0x000000010dc7f8ec call_function + 444
92  Python                        	0x000000010dc7c7e5 _PyEval_EvalFrameDefault + 25829
93  Python                        	0x000000010dbb18d0 function_code_fastcall + 128
94  Python                        	0x000000010dc7f8ec call_function + 444
95  Python                        	0x000000010dc7c74e _PyEval_EvalFrameDefault + 25678
96  Python                        	0x000000010dc80734 _PyEval_EvalCodeWithName + 2804
97  Python                        	0x000000010dc76224 PyEval_EvalCode + 100
98  net.ankiweb.dtop              	0x000000010d6de01b 0x10d6dc000 + 8219
99  net.ankiweb.dtop              	0x000000010d6de41c 0x10d6dc000 + 9244
100 net.ankiweb.dtop              	0x000000010d6dcbf4 0x10d6dc000 + 3060

What type/model of Mac are you using? Do you have any third-party tools installed that modify audio handling/routing?

Sorry for the late reply. I had Soundflower installed. I just uninstalled it, and now the Qt driver is working fine :slight_smile:

Thanks for your help!