Intermittent hanging on Add screen when attempting to change Note type

steps to reproduce:

  1. Open deck
  2. Click add
  3. Click Note type
    Add screen then hangs. When I close the app i get the following message:

Anki 2.1.37 (6d596c8f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2020-12-23 10:57:02

Caught exception:
Traceback (most recent call last):
File “aqt\taskman.py”, line 87, in _on_closures_pending
File “aqt\taskman.py”, line 59, in
File “aqt\taskman.py”, line 76, in wrapped_done
File “aqt\sync.py”, line 114, in on_future_done
File “aqt\main.py”, line 892, in on_collection_sync_finished
File “aqt\main.py”, line 671, in reset
File “aqt\hooks_gen.py”, line 2650, in call
File “aqt\studydeck.py”, line 135, in onReset
File “aqt\studydeck.py”, line 112, in redraw
RuntimeError: wrapped C/C++ object of type QListWidget has been deleted

image

Running “Check Database” does not fix the problem.

I’ve added this to Avoid exec_() in studydeck.py · Issue #26 · ankitects/help-wanted · GitHub