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

QWaylandXdgSurfaceV6::setGrabPopup crashes if the popups parent is deleted

    XMLWordPrintable

Details

    • Linux/Wayland
    • 7c0833f4bc22d2d947c793f0711e3f1e1a09012c (qt/qtwayland/5.14) 1e1f692dbdb0b1b8a1bbed99b5ff550dc978cdcd (qt/qtwayland/5.12)

    Description

      // 1. create and show a QWaylandXdgSurfaceV6::Popup (e.g. QMenu),
      parented to parent.
      auto pMenu = new QMenu("test", parent);
      pMenu->show();
      
      // 2. close the parent.
      QTimer::singleShot(100, [parent]() {parent->close(); });
      
      // 3. Next time a popup is shown it will crash in
      QWaylandXdgSurfaceV6::setGrabPopup.
      

      It seems a popup has a m_parent pointer to it's parent surface. Assuming the popup is closed first - the code works.
      But if the parent surface is closed first - the surface does not seem to have any
      knowledge of it's child popup(s) - and does nothing to destroy them first.

      In previous QT versions and windowing systems could be expected that closing a parent window will automatically close any child windows (especially without crashing).

      It seems to happen also only when the window decorations are disabled.

      Attachments

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

        Activity

          People

            johanhelsing Johan Helsing
            karimpinter Karim Pinter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes