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

Crash on Wayland if no EGLConfig.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      iMac, macOS 11.2.1, Parallels Desktop 16.5.0, Ubuntu 20.04 Wayland.
    • Platform/s:
      Linux/Wayland

      Description

      I get a crash on Ubuntu Wayland running in Parallels on macOS if I launch a GUI Qt app with QT_QPA_PLATFORM=wayland.

      First I get a message 'Cannot find EGLConfig, returning null config'. Then SIGSEGV with such backtrace:

      #0 0x00007ffff78eb980 in ?? () from /lib/x86_64-linux-gnu/libEGL.so.1
      #1 0x000000000c85bfde in q_glFormatFromConfig (display=0x12105c00, config=config@entry=0x0, referenceFormat=...) at qeglconvenience.cpp:373
      #2 0x000000000c80e9f6 in QtWaylandClient::QWaylandEglWindow::QWaylandEglWindow (this=0x12cfe3b0, window=<optimized out>, display=<optimized out>)
       at ../../../../hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp:65
      #3 0x000000000c80d076 in QtWaylandClient::QWaylandEglClientBufferIntegration::createEglWindow (this=0x12b6bbc0, window=0x12c4bf20)
       at ../../../../hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp:150
      #4 0x000000000c8cb1d3 in QtWaylandClient::QWaylandIntegration::createPlatformWindow (window=0x12c4bf20, this=0x11ea2490) at qwaylandintegration.cpp:164
      #5 QtWaylandClient::QWaylandIntegration::createPlatformWindow (this=0x11ea2490, window=0x12c4bf20) at qwaylandintegration.cpp:160
      #6 0x000000000ce0e256 in QWindowPrivate::create (this=0x12cf3330, recursive=recursive@entry=false, nativeHandle=nativeHandle@entry=0)
       at kernel/qwindow.cpp:533
      #7 0x000000000ce0e48d in QWindow::create (this=this@entry=0x12c4bf20) at kernel/qwindow.cpp:650
      #8 0x000000000cac6faa in QWidgetPrivate::create (this=this@entry=0x11e28f30) at kernel/qwidget.cpp:1314
      #9 0x000000000cac758e in QWidget::create (this=0x11e7eee0, window=<optimized out>, initializeWindow=<optimized out>, destroyOldWindow=<optimized out>)
       at kernel/qwidget.cpp:1179
      #10 0x000000000cad5124 in QWidgetPrivate::setVisible (this=0x11e28f30, visible=<optimized out>) at kernel/qwidget.cpp:8080

      It looks like here:

      https://github.com/qt/qtwayland/blob/d10d7bab434b6917cd20ea57355570981974c54d/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp#L64-L65

      there is no check for nullptr inĀ m_eglConfig.

      Maybe the config availability could be checked before creating the QWaylandEglWindow and if there is none fallback to QWaylandWindow instead.

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.graphics.and.multimedia Qt Graphics Team
            Reporter:
            johnpreston John Preston
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes