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

Regression: crash in QQuickItem destructor when qml contains layouts and default property alias

    XMLWordPrintable

Details

    Description

      Opening and closing TestQml.qml in qmlscene causes a crash in the destructor of QQuickItem. The same happens in a C++ program when loading the qml to a QQuickWidget and then unloading it.

      No crash occurs with Qt 5.5.1.

      No crash occurs when ColumnLayout is replaced with Column or when RowLayout is replaced with Row. No crash occurs when merging TestQml.qml and ColumnInRectangle.qml to the single file NoCrash.qml (in the attachment), that avoids using the default property alias to insert children.

      May be related to bug 52241, but it is not the same, because I was not able to reproduce that bug on my Linux system.

      TestQml.qml
      import QtQuick 2.0
      import QtQuick.Controls 1.0
      import QtQuick.Layouts 1.0
      
      ColumnInRectangle
      {
         RowLayout
         {
            Text
            {
               text: 'Close me.'
            }
         }
      }
      
      ColumnInRectangle.qml
      import QtQuick 2.0
      import QtQuick.Layouts 1.0
      
      Row
      {
         default property alias content: column.children
      
         ColumnLayout
         {
            id: column
         }
      }
      

      Attachments

        1. QmlCrash.zip
          0.8 kB
          Josef Cibulka

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              cibulka Josef Cibulka
              Votes:
              13 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes