Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. All QML apps crash with: Failed to create OpenGL context for format QSurfaceFormat
Forum Updated to NodeBB v4.3 + New Features

All QML apps crash with: Failed to create OpenGL context for format QSurfaceFormat

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    knoxy
    wrote on 13 Jul 2017, 14:27 last edited by
    #1

    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!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      knoxy
      wrote on 13 Jul 2017, 14:41 last edited by
      #2

      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 Reply Last reply
      1

      1/2

      13 Jul 2017, 14:27

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved