[Qt-interest] Segment fault when updating OpenGL QGLWidget from thread ?
Ed Sutton
ESutton at fescorp.com
Wed Jul 1 14:18:14 CEST 2009
How can I synchronize thread access to my GUI window?
1 - I have a thread receiving video data over the network.
2 - When a frame is complete it makes a callback to my QGLWidget derived class's frame handler - a static method that gets passed the instance of the class.
3 - The segment fault appears to be triggered when calling glClearColor(),before it gets to the end and calls QWidget::update()
4 - The segment fault occurs after I select a new video channel in my GUI and the changedChannel slot handler has been called.
My figure I need a mutex in my frame handler. However, according to my debug print statements the main window's changedChannel slot handler appears to have already completed before the segment fault occurs. I am a Qt / Linux newbie and realize I may be doing this all wrong.
Thanks in advance for sharing your experience and any tips or direction.
-Ed
PS: Using Red Hat Enterprise Linux 5.2. I did not know I had a problem until I tested on a multi-core machine. ( I must figure out how get my Red Hat development VM working under 2 cores. )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090701/ff5f04ed/attachment.html
More information about the Qt-interest-old
mailing list