I have been developing with Qt for some time now on my project, and we are starting to move to a more thread-oriented design. Upon moving some GL rendering widgets to other threads I have discovered some very weird behavior. It appears that if a GL Widget begins updating from another thread (boost thread or QThread) before a widget that accepts user input (such as a QTextEdit) grabs focus, I get XCB crashes that look like:
[xcb] Too much data requested from _XRead
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
hypnotizer: ../../src/xcb_io.c:735: _XRead: Assertion ‘!xcb_xlib_too_much_data_requested’ failed.
To test this out, I actually can make a simple modification to the GLHypnotizer demo to reproduce the crash. That demo can be found here: http://qt-project.org/doc/qt-4.8/demos-glhypnotizer.html [qt-project.org]
If I add the line ‘mdiArea.addSubWindow(new QTextEdit(this));’ at around line 313 (before the call to newThread()), then when the demo starts there will be a QTextEdit and a GL Hypnotizer Widget. If I then click on the QTextEdit to grab focus I will get the above crash every time.
Can anyone reproduce the error on there Linux install using the above instructions? Has anyone encountered these types of issues on Linux using Qt and threading before?
Note: I am using Ubuntu 12 and this crash happens in VirtualBox and non VirtualBox Ubuntu installations