In my understanding, it is not so much of the random destruction order or QObject's, but that all QObject's in Python has to be destructed before QCoreApplication. PyQt already solved it if the QCoreApplication is created from the Python side, by ensuring all QObject's destruction before QCoreApplication. but since in our case QCoreApplication is not created from Python, their solution doesn't do anything for us.
In our case, the KritaPyQtPlugin destructor (and thus PyKrita::finalize) is called during the destructor of QCoreApplication, which might be triggering UB? So I wonder if the proper way to clean up is to call PyKrita::finalize earlier, perhaps we can use the QCoreApplication::aboutToQuit signal? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1874096 Title: Closing Krita normally always result in "Krita closed unexpectedly" notification on Plasma To manage notifications about this bug go to: https://bugs.launchpad.net/krita/+bug/1874096/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs