Closed aplaice closed 3 years ago
hey, apologies for the delay getting back to this. have some big changes in life that I'm focusing on. should be able to review both your PR's now though!
No problem! Good luck with the life changes! Thanks for your review here!
Fix #128.
The crash was caused by the warning dialog, itself! The issue was that export is now run in a background thread, but GUI operations from a background thread cause a crash.
AnkiModalNotifier is used in
anki_exporter_wrapper.py
andgithub_importer.py
. The former is in a background thread, the latter in the main thread. In both cases, error messages are now correctly displayed, without crashing.Tested on Anki 2.1.40 and 2.1.43.
For comparison / a similar issue see.
I'm not very happy about the solution — particularly the timer — but without the timer
run_on_main
results in some sort of weird deadlock and I can't think of a better method.