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

Crash when opening a new menu when two submenus are already open

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.1, 5.12.2, 5.12.3, 5.13.0 Beta3
    • Fix Version/s: 5.12.4, 5.12.5, 5.13.0, 5.14.0 Alpha
    • Component/s: QPA: Wayland
    • Labels:
      None
    • Platform/s:
      Linux/Wayland
    • Commits:
      af9ec8a76d7e62444fadb518256fc58723fe5186 (qt/qtwayland/5.12) 2e4246ee71dd6689d3731e380f393185a1e3bd8e (qt/qtwayland/5.12.4) 79037e46eeb00e20c5f3bbe7d0de4b702af86884 (qt/qtwayland/5.13)

      Description

      An easy way to trigger the crash is to open any application with menus (e.g. kwrite) and start playing with the menus with the keyboard.

      Here's a backtrace:

      [751811,810]  -> wl_surface@56.set_buffer_transform(0)
      [751811,833]  -> wl_surface@56.commit()
      [751811,898]  -> xdg_surface@104.set_window_geometry(0, 0, 230, 52)
      [751812,196]  -> org_kde_kwin_appmenu_manager@20.create(new id org_kde_kwin_appmenu@107, wl_surface@56)
      [751812,287]  -> org_kde_kwin_appmenu@107.set_address("", "")
      [751861,274]  -> wl_shm_pool@41.destroy()
      [751861,334]  -> wl_buffer@42.destroy()
      [751861,950]  -> wl_shm_pool@40.destroy()
      [751861,984]  -> wl_buffer@43.destroy()
      [751862,618]  -> wl_shm_pool@44.destroy()
      [751862,645]  -> wl_buffer@45.destroy()
      [751863,266]  -> wl_shm_pool@38.destroy()
      [751863,308]  -> wl_buffer@39.destroy()
      [751863,451]  -> wl_shm@5.create_pool(new id wl_shm_pool@108, fd 11, 16182432)
      [751863,480]  -> wl_shm_pool@108.create_buffer(new id wl_buffer@109, 0, 1932, 2094, 7728, 0)
      
      ^[[CThread 1 "kwrite" received signal SIGSEGV, Segmentation fault.
      0x00007ffff539bd77 in wl_proxy_marshal () from /usr/lib/libwayland-client.so.0
      (gdb) where
      #0  0x00007ffff539bd77 in wl_proxy_marshal () from /usr/lib/libwayland-client.so.0
      #1  0x00007fffef580767 in wl_surface_damage (wl_surface=0x0, x=0, y=0, width=972, height=30)
          at ../../include/QtWaylandClient/5.13.0/QtWaylandClient/private/../../../../../src/client/wayland-wayland-client-protocol.h:3490
      #2  0x00007fffef580723 in QtWayland::wl_surface::damage (this=0x555555f58e68, x=0, y=0, width=972, height=30) at qwayland-wayland.cpp:1236
      #3  0x00007fffef553b0e in QtWaylandClient::QWaylandWindow::damage (this=0x555555f58e40, rect=...) at /home/apol/devel/frameworks/qt5/qtwayland/src/client/qwaylandwindow.cpp:566
      #4  0x00007fffef566dc6 in QtWaylandClient::QWaylandAbstractDecoration::contentImage (this=0x5555560525e0) at /home/apol/devel/frameworks/qt5/qtwayland/src/client/qwaylandabstractdecoration.cpp:135
      #5  0x00007fffef53b0fd in QtWaylandClient::QWaylandShmBackingStore::updateDecorations (this=0x555555e03c20) at /home/apol/devel/frameworks/qt5/qtwayland/src/client/qwaylandshmbackingstore.cpp:322
      #6  0x00007fffef53afbb in QtWaylandClient::QWaylandShmBackingStore::flush (this=0x555555e03c20, window=0x555555a6a120, region=..., offset=...)
          at /home/apol/devel/frameworks/qt5/qtwayland/src/client/qwaylandshmbackingstore.cpp:231
      #7  0x00007ffff5e96390 in QBackingStore::flush (this=0x555555f56010, region=..., window=0x555555a6a120, offset=...) at /home/apol/devel/frameworks/qt5/qtbase/src/gui/painting/qbackingstore.cpp:249
      #8  0x00007ffff63ef0dc in QWidgetBackingStore::qt_flush (widget=widget@entry=0x55555564dd00, region=..., backingStore=0x555555f56010, tlw=0x55555564dd00, widgetTextures=0x0, 
          widgetBackingStore=widgetBackingStore@entry=0x555555f5b780) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:159
      #9  0x00007ffff63f11f0 in QWidgetBackingStore::flush (this=this@entry=0x555555f5b780, widget=widget@entry=0x0) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1381
      #10 0x00007ffff63f15b2 in QWidgetBackingStore::endPaint (this=this@entry=0x555555f5b780, cleaned=..., backingStore=<optimized out>, beginPaintInfo=beginPaintInfo@entry=0x7fffffffc874)
          at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:363
      #11 0x00007ffff63f3020 in QWidgetBackingStore::doSync (this=this@entry=0x555555f5b780) at /home/apol/devel/frameworks/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1365
      

      This only happens with applications using Qt 5.13, if I run Qt 5.12 (on flatpak or so) it works just fine.

      Also it doesn't always crash, sometimes dialogs decide not to show up but it doesn't crash (e.g. with krunner, yakuake, plasma dialogs).

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              johanhelsing Johan Helsing
              Reporter:
              apol Aleix Pol
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes