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

[REG 5.14->5.15] crash on close in QQuickItemLayer destructor on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 5.15.16
    • 5.15.0
    • None
    • Linux 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

      gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
    • Linux/X11
    • c1d07c819 (tqtc/lts-5.15), bc3e74d01 (tqtc/lts-5.15)

    Description

      Creating a simple application using the "Qt Quick Application - Empty" template and replacing the main.qml with the following leads to a crash on close in 5.15 but not in prior versions (tested with 5.14.2)

      The crash happens on Linux but not on Windows (I have not tested other platforms). 

      import QtQuick 2.14
      import QtQuick.Controls 2.3
      import QtQuick.Layouts 1.3
      import QtQuick.Window 2.14
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Menubar regression Qt 5.14 -> 5.15")
          menuBar: Item {
                  id: root
                  height: 44
                  visible: true
                  implicitWidth: headerItems.implicitWidth
      
                  Rectangle {
                      anchors.fill: parent
                      color: "gray"
                  }
      
                  Rectangle {
                      id: bottomDivider
                      anchors {
                          left: parent.left
                          right: parent.right
                          bottom: parent.bottom
                      }
                      height: 1
                      color: "black"
                      z: 1
                  }
      
                  RowLayout {
                      id: headerItems
                      anchors {
                          top: parent.top
                          left: parent.left
                          right: parent.right
                          bottom: bottomDivider.top
                      }
                      spacing: 4
      
                      MenuBar {
                          id: mainMenuBar
                          implicitHeight: headerItems.height
                          delegate: MenuBarItem {
                              id: menuBarItem
                              contentItem: Text {
                                  text: menuBarItem.text
                                  textFormat: Text.StyledText
                                  opacity: enabled ? 1.0 : 0.3
                                  horizontalAlignment: Text.AlignLeft
                                  verticalAlignment: Text.AlignVCenter
                                  elide: Text.ElideRight
                              }
                              background: Rectangle {
                                  implicitHeight: mainMenuBar.height
                                  opacity: enabled ? 1 : 0.3
                                  color: "#eee"
                              }
                          }
                          Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
      
                          Menu {
                              title: qsTr("File")
                              MenuItem {
                                  text: qsTr("Placeholder")
                              }
                              Action {
                                  text: qsTr("Quit")
                                  onTriggered: Qt.quit()
                                  shortcut: "Ctrl+Q"
                              }
                          }
      
                      Item {
                          id: flexibleSpaceRight
                          Layout.fillWidth: true
                      }
                  }
              }
          }
      }
      

      Attachments

        1. bZ7NVP8.png
          33 kB
          aamann
        2. QTBUG-84858.zip
          2 kB
          Liang Qi
        3. QTBUG-84858-2.zip
          2 kB
          Liang Qi

        Issue Links

          For Gerrit Dashboard: QTBUG-84858
          # Subject Branch Project Status CR V

          Activity

            People

              liaqi Liang Qi
              aamann aamann
              Votes:
              5 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes