Stereo buffering crash
-
I'm currently trying to port a Qt 4.8.2 application to Qt 5.5 on MacOSX 10.10.4.
Everything compiles just fine but when I start the application it crashes upon the creation of a new QGLWidget. The crash report is unfortunately not very helpful to me and I currently don't know how to fix this:<pre><code>
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8a1010dd objc_msgSend + 29
1 libqcocoa.dylib 0x000000010f1b8073 QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext*) const + 83
2 org.qt-project.QtGui 0x0000000108df979b QOpenGLContext::create() + 59
3 org.qt-project.QtOpenGL 0x000000010866aeaf QGLContext::chooseContext(QGLContext const*) + 383
4 org.qt-project.QtOpenGL 0x000000010866ab09 QGLContext::create(QGLContext const*) + 57
5 org.qt-project.QtOpenGL 0x000000010866bac1 QGLWidget::setContext(QGLContext*, QGLContext const*, bool) + 209
6 org.qt-project.QtOpenGL 0x000000010866ddcc QGLWidgetPrivate::initContext(QGLContext*, QGLWidget const*) + 236
7 org.qt-project.QtOpenGL 0x000000010866b2d8 QGLWidget::QGLWidget(QWidget*, QGLWidget const*,
</code></pre>I never experienced this problem when running the application with Qt 4.8.2 on the same machine. I also ported it to Qt 5.5 for Windows already and it worked flawlessly.
Thanks a lot for your help!
Edit:
The culprit seems to be QGLFormat::setStereo(true) (see below). However, I'm dependent on stereo buffering and simply removing this line is no solution for me! Why does Qt 5.5 crash when using stereo buffering and is there a fix for that?
-
I see that a couple of the error messages reference QOpenGLContext and others QGLContext. I don't know enough to say if that is a problem or not, but it caught my eye. I know that QGLWidget, QGLContext, etc. are declared obsolete now and it is recommended to use QOpenGLWidget, QOpenGLContext, etc. now.
Paul -
Thanks a lot for your response, Paul!
I wasn't aware that QGLWidget and QGLContext are deprecated. However, since this will be a bigger change and QGLWidget should still work I want to fix this before moving to QOpenGLWidget. Again, this application already works perfectly fine on Windows with Qt 5.5 and MacOS with Qt 4.8.2.I might have found the culprit:
Removing this lineQGLFormat::setStereo(true)
seems to fix the issue. However, I am dependent on stereo buffering and therefore this is no solution.
Is this a bug in Qt 5.5? -
Hi and welcome to devnet,
If you can reproduce that with a minimal compilable example then it likely is