Houdini Crash Message when closed after using PyQt

   3457   3   1
User Avatar
Member
52 posts
Joined: 6月 2012
Offline
Hi,

I'm using PyQt in Houdini, loading a ui file as my interface, everything works great however, when I close Houdini, no matter if I closed the QT window or not, I get a crash message and this message :

Qt Warn: QObject::startTimer: QTimer can only be used with threads started with QThread (This message appears when I close Houdini but only if I already closed the QWindow)
7423: Fatal error: Segmentation fault (sent by pid 16)
Saving application data to /tmp/…….
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset

I guess I should add some instruction to close the window properly but not sure to add in there as the common way I use out of Houdini is not adapted for this situation.

Any idea ?

Cheers
Chris
User Avatar
Member
52 posts
Joined: 6月 2012
Offline
I really would appreciate some help on this one, any idea, anyone ?

Cheers
Chris
User Avatar
Member
4 posts
Joined: 1月 2023
Offline
Sorry to ping this thread after so long, did you happen to find out how to handle this properly? I too am having a similar issue when closing Houdini in an activity timeout script I am doing.
User Avatar
Member
30 posts
Joined:
Offline
without knowing anything about your UI or what it's doing or how it's constructed...

if you're using qThreads and they're still running when you close the dialog, you'll usually get an insta-crash like this.

so something like

    def closeEvent(self, event):
        super(MyNodeUI, self).closeEvent(event)
        # self.worker is a reference to a QThread in this case
        if self.worker:
            logger.debug("waiting for worker thread")
            # wait for the thread to finish cleanly
            self.worker.wait()
        self.deleteLater()
  • Quick Links