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

Some qt3d demo applications crash with QPA Wayland-EGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.9.7
    • QPA: Wayland
    • None
    • TI SoC AM57xx,
      Linux: Kernel 4.14
      Weston: 2.0
      SGX DDK 1.14
    • Linux/Wayland

    Description

      The following Qt3d demo applications crash with QPA Wayland(-EGL).

      SoC: TI AM57xx
      Linux: Kernel 4.14
      Qt: 5.9.7

      It looks like the problem is that wl_egl_window_resize() is called with invalid egl_window.

      Here is a trace of good example: scene3d:

      root@am57xx-evm:~# /usr/share/qt5/examples/qt3d/scene3d/scene3d
      Using Wayland-EGL
      wlpvr: PVR Services Initialised
      QWaylandEglWindow::QWaylandEglWindow 0x0
      Using the 'xdg-shell-v5' shell integration
      QWaylandEglWindow::updateSurface 0x0
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb70b8, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb70b8, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb70b8
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb70b8
      wlpvr: wl_egl_window_destroy: egl_window=0xb70b8
      QWaylandEglWindow::updateSurface 0x0
      QWaylandEglWindow::updateSurface call wl_egl_window_create
      wlpvr: wl_egl_window_resize: egl_window=0xaff009e0, 506x533, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xaff009e0, 506x533
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xaff12348, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xaff12348, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xaff12348
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xaff12348
      wlpvr: wl_egl_window_destroy: egl_window=0xaff12348
      wl_surface.enter received for output with id: 10 screen name: "unknown" screen model: "" 0x34f70
      QWaylandEglWindow::QWaylandEglWindow 0x0
      ^C

      wl_egl_window_size() is called at QWaylandEglWindow::updateSurface to set m_waylandEglWindow.

      Here is the bad case: qardboard 

      root@am57xx-evm:~# /usr/share/qt5/examples/qt3d/qardboard/qardboard
      Using Wayland-EGL
      wlpvr: PVR Services Initialised
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb150efd0, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb150efd0, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb150efd0
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb150efd0
      wlpvr: wl_egl_window_destroy: egl_window=0xb150efd0
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb15173c8, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb15173c8, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb15173c8
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb15173c8
      wlpvr: wl_egl_window_destroy: egl_window=0xb15173c8
      Using the 'xdg-shell-v5' shell integration
      QWaylandEglWindow::QWaylandEglWindow 0x0
      QWaylandEglWindow::updateSurface 0xb5e412f4
      wlpvr: wl_egl_window_get_attached_size: egl_window=0xb5e412f4, -1245645312x-1245646408
      wlpvr: wl_egl_window_resize: egl_window=0xb5e412f4, 806x433, 0,0
      Segmentation fault (core dumped)

      We do know why m_waylandEglWindow was set to 0xb5e412f4 before wl_egl_window_create() is called. And therefore wl_egl_window_resiz() is called with the invalid egl_window and the overall timing is different from the good case.

      The same error is also observed for anaglyph-rendering and scene2d

      root@am57xx-evm:~# /usr/share/qt5/examples/qt3d/anaglyph-rendering/anaglyph-renering
      Using Wayland-EGL
      wlpvr: PVR Services Initialised
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb160efd0, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb160efd0, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb160efd0
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb160efd0
      wlpvr: wl_egl_window_destroy: egl_window=0xb160efd0
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb16173c8, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb16173c8, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb16173c8
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb16173c8
      wlpvr: wl_egl_window_destroy: egl_window=0xb16173c8
      Using the 'xdg-shell-v5' shell integration
      QWaylandEglWindow::QWaylandEglWindow 0x0
      QWaylandEglWindow::updateSurface 0xb5ef22f4
      wlpvr: wl_egl_window_get_attached_size: egl_window=0xb5ef22f4, -1244920320x-1244921416
      wlpvr: wl_egl_window_resize: egl_window=0xb5ef22f4, 1030x801, 0,0
      Segmentation fault (core dumped)
      root@am57xx-evm:~# /usr/share/qt5/examples/qt3d/scene2d/scene2d
      Using Wayland-EGL
      wlpvr: PVR Services Initialised
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb160efd0, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb160efd0, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb160efd0
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb160efd0
      wlpvr: wl_egl_window_destroy: egl_window=0xb160efd0
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb16173c8, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb16173c8, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb16173c8
      QWaylandGLContext::updateGLFormat: call wl_egl_window_destroy 0xb16173c8
      wlpvr: wl_egl_window_destroy: egl_window=0xb16173c8
      QWaylandEglWindow::QWaylandEglWindow 0x0
      Using the 'xdg-shell-v5' shell integration
      Non-blocking swap buffers not supported. Subsurface rendering can be affected.
      wlpvr: wl_egl_window_resize: egl_window=0xb1532c78, 1x1, 0,0
      wlpvr: wl_egl_window_create: egl_window=0xb1532c78, 1x1
      QWaylandGLContext::updateGLFormat: call wl_egl_window_create 0xb1532c78
      QWaylandEglWindow::QWaylandEglWindow 0x0
      QWaylandEglWindow::updateSurface 0xb5ea32f4
      wlpvr: wl_egl_window_get_attached_size: egl_window=0xb5ea32f4, -1245243904x-1245245000
      wlpvr: wl_egl_window_resize: egl_window=0xb5ea32f4, 1406x1133, 0,0
      Segmentation fault (core dumped)

       

       

       

       

       

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            ericruei Eric Ruei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes