This results in anki just crashing on windows with no logging, stack trace whatsoever.
Does the call to editor.set_note seem wrong in this situation ? If so, what’s the right way of getting the editor to refresh after I updated a field from python ? I suspect I’m experiencing a crash at the Qt level but not sure how to get more debug details about it.
Looks like your intuition was spot on. Here’s the situation:
I actually instantiate a PyQt dialog from the bridge handler if the user selects “new preset” (as opposed to an existing present where sound will be added directly)
The user configures the audio setting, then clicks “add to note”
then the editor.set_note is now called on the same thread as the bridge handler I believe.
if I call editor.set_note as a aqt.mw.taskman.run_on_main task, no crash.
I’m experiencing this issue right now and can’t find any information about it except this post, which I understand like ten percent of. I get a hard crash every time I try to apply a preset to one or several cards, regardless if I press Add audio, Run all or Apply to note.