All QML apps crash with: Failed to create OpenGL context for format QSurfaceFormat
-
wrote on 13 Jul 2017, 14:27 last edited by
Hi,
I've been learning QML and have been writing simple test programs for the last few days. This has been working fine.
Using Qt 5.9.1, Ubuntu 14.04 VBox VM.Yesterday my simple app crashed for no apparent reason and now no QML apps will run on my system.
Any QML app, including the examples, crashes with the following:
OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x8ea0fa0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x8ea0fa0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x8ea1000, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring OpenGL Warning: glXChooseVisual: bad attrib=0x8ea1000, ignoring QEGLPlatformContext: Failed to create context: 3004 Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile)) Aborted (core dumped)
I'm stumped why things would suddenly break.
I searched online for "QML Failed to create OpenGL context for format QSurfaceFormat". There are many references to similar issues, but no clear resolution.
I've got openGL stuff (mesa) installed. glxgears and glxinfo run fine.
Any ideas what could have gone wrong?
Thanks!
-
wrote on 13 Jul 2017, 14:41 last edited by
My "workaround" was to remove all mesa GL packages, which also removed xorg and xfce. Then I reinstalled xubuntu-desktop.
Voila! QML stuff runs again!
This is not an optimal solution. I'd like to understand why this happened so I can avoid it in the future.
1/2