Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138600

qtdiag crashes with "QOpenGLFunctions created with non-current context" on Wayland with Radeon GPU (Qt 5.15.17)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P1: Critical P1: Critical
    • None
    • 5.15.17
    • GUI: OpenGL, QPA: Wayland
    • None
    • Linux/Wayland

      Description:
      Running qtdiag under Wayland on a KDE Plasma 6 session causes a segmentation fault when using an AMD Radeon RX 6750 XT GPU with the radeonsi driver. The error message is:
      QOpenGLFunctions created with non-current context
      Segmentation fault (core dumped)
      This crash is specific to Wayland. Under X11, qtdiag works without issues.


      Steps to reproduce:

      1. Log into a Wayland session (KDE Plasma 6).
      1. Run:  qtdiag
      • Observe the crash and output.
      • Confirm that the issue does not occur under X11:
        XDG_SESSION_TYPE=x11 QT_QPA_PLATFORM=xcb qtdiag

      Expected result:
      qtdiag should display diagnostic information without crashing.

      Actual result:
      It immediately prints:
      QOpenGLFunctions created with non-current context
      Segmentation fault (core dumped)
       

      Additional Info:

      • qtdiag works if launched with:
        XDG_SESSION_TYPE=x11 QT_QPA_PLATFORM=xcb qtdiag
      • Other Qt6 and Qt5 applications (e.g. Cantata, Dolphin, Kate) work fine under Wayland with the same GPU and driver stack.
      • No Qt style override tools (like kvantum or qt5ct) are installed.
      • Setting QT_STYLE_OVERRIDE to Breeze, Oxygen, or Fusion does not prevent the crash.
      • Forcing software rendering (LIBGL_ALWAYS_SOFTWARE=1) allows qtdiag to run without crashing, suggesting an OpenGL + context management issue in Wayland mode.

      ldd output:
      ldd /usr/bin/qtdiag | grep -iE 'libgl|libglx|libegl'
      libGL.so.1 => /usr/lib/libGL.so.1
      libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0
      libGLX.so.0 => /usr/lib/libGLX.so.0

      libGLX.so.0 => /usr/lib/libGLX.so.0{}

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            sfdrifter Alan Jacobsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes