If a script has an error Krita displays a dialog with a stack trace. If you close the Krita window before closing the dialog, Krita doesn't return. To replicate: run sample code below from scripting menu when error dialog appears, click the close icon on the main Krita window then click the close button or the close icon on the dialog window. Sample code: import krita class Tester(krita.Extension): def __init__(self, parent): super().__init__(parent) def tester(self): print("No object called ", UNKNOWN_OBJECT) def setup(self): action = Application.createAction("Tester") action.triggered.connect(self.tester) Scripter.addExtension(Tester(Application))