Editor.web.eval crashesh anki

editor.web.eval(“console.log(‘hi’);”) no matter what javascript I run anki crashesh with no output in editor only this

fish: Job 1, 'anki' terminated by signal SIGTRAP (Trace or breakpoint trap)

I first check if editor or editor.web are None

here in this commit you can see where I commented web.eval out since it was causing anki to crash without any debug info.

And it dosen’t havy anything do with the fact that it calls editor from the class when cls._editor is aqt.editor.Editor(arguments are passed here)

This is most likely happening because the code is run in a background thread. Qt code should only be run in the main thread.

1 Like

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