On Wed, 2008-01-30 at 11:47 -0800, gct wrote:

> 
> OK so I've got a thread that monitors some hardware, and periodically sends
> a
> custom event back to the GUI to basically mirror an internal table to a
> QTable I have on the GUI.  I'm told this is the proper way to update GUI
> elements from a thread other than the main one.  My problem is, despite this
> being the "correct" way, it's causing python to segfault.
> 
> When I leave the messages enabled my GUI will run an average of 7 minutes
> before I see a signal 11 and all my python processes die.   Disabling the
> messages (so the GUI is never updated, though the internal table is), the
> run time moves all the way out to 30 minutes (at which point I manually
> close the application, it does NOT segfault).
> 
> I'm using Python 2.2.3 and PyQT 3.12
> 
> Has anyone run into this before, is this a known issue with customEvents
> that they can segfault python?

yes, I've got exactly the same problem for several years now (across
different qt/pyqt versions). I have never managed to reduce it to
something feasable to be sent over to Phil, so the bug is still there :/

In my case, it's much easier to trigger (it segfaults after a couple of
seconds).

I've got a nasty workaround in place (I use a Python's deque to move
data across threads, but the main thread as a QTimer to poll the deque
and check if there's data). It doesn't work too well since the data is
supposed to be read "real-time" and it's impossible to configure the
timer correctly (it should go too fast and the CPU usage would top). I
hope such a workaround will work with you as well.
-- 
Giovanni Bajo


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to