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

Popup with parent in StackView centered in overlay causes crash at exit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.8, 5.14.2, 5.15.0
    • Fix Version/s: 5.12.10, 5.15.1, 6.1.0 RC
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Environment:
      Ubuntu 18.04, Windows 10/MS Surface 4 Pro
    • Platform/s:
      Linux/X11, Windows
    • Commits:
      04901b170e009d844232067446fdd56f270d155d (qt/qtquickcontrols2/dev) 7810b97febd0bfe00132dec785c21ca4a361c818 (qt/qtquickcontrols2/5.15) 3a5a2408266ec47f350a89419f1ec618442c1d60 (qt/qtquickcontrols2/5.12)

      Description

      Following causes crash at app exit by closing window or pressing alt+F4:

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          StackView {
              anchors.fill: parent
      
              initialItem: Rectangle {
                  Popup {
                      visible: true
                      anchors.centerIn: Overlay.overlay
      
                      width: 100
                      height: 100
                  }
              }
          }
      }
      

      The problem disappears when

      1) Popup is not centered in overlay

      or

      2)  StackView has no anchors set

      or

      3) Popup has parent set to Overlay.overlay

      Backtrace:

      1  ??                                                                        0xa0           
      2  QMetaObject::cast(QObject const *) const                                  0x7ffff69c6d89 
      3  QQuickPopupPositioner::reposition()                                       0x7fffd17a7d2c 
      4  QQuickItem::geometryChanged(QRectF const&, QRectF const&)                 0x7fffd2cb5139 
      5  QQuickItem::setImplicitWidth(double)                                      0x7fffd2cba3e2 
      6  QQuickStackElement::~QQuickStackElement()                                 0x7fffd17b8909 
      7  QQuickStackElement::~QQuickStackElement()                                 0x7fffd17b8929 
      8  QQuickStackView::~QQuickStackView()                                       0x7fffd17b923e 
      9  QQmlPrivate::QQmlElement<QQuickStackView>::~QQmlElement()                 0x7fffd107a496 
      10 QObjectPrivate::deleteChildren()                                          0x7ffff69e69f3 
      11 QObject::~QObject()                                                       0x7ffff69f0b5c 
      12 QQuickWindow::~QQuickWindow()                                             0x7fffd2cd80b4 
      13 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement()             0x7fffd2d8bccd 
      14 QQmlApplicationEnginePrivate::cleanUp()                                   0x7ffff71c2dce 
      15 QQmlApplicationEngine::~QQmlApplicationEngine()                           0x7ffff71c2e58 
      16 main                                                          main.cpp 10 0x5555555554fa 
      

        Attachments

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

          Activity

            People

            Assignee:
            mitch_curtis Mitch Curtis
            Reporter:
            michalc Michał Cieślak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes