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

QML Application crashes with segfault on any interaction with Combobox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15
    • Quick: Controls 2
    • None
    • Distro:Linux Mint 19.1 Tessa Cinnamon
      Kernel:5.4.0-65-generic
      RAM:32 GB
      GPU Driver:NVIDIA 450.102.04
      GPU:NVIDIA GeForce GTX 1660 SUPER
      CPU:AMD Ryzen 7 3700X 8-Core
    • Linux/X11

    Description

      Interaction with QML Combobox, makes the application to crash with SEGFAULT on exit.

      The issue was identified during development. It was reproduced with the next steps:

      1. Create empty QML project
      2. import QtQuick.Controls 2.15 and add a Combobox in main.qml (the simple one shown in Qt API reference)
      ComboBox {
              width: 200
              model: [ "Banana", "Apple", "Coconut" ]
          }
      
      1. Build and Run on Qt creator
      2. If nothing is selected on Combobox, everything goes fine. On terminating the program (either by pressing the x mark on window, or by terminating the execution on Qt creator) nothing strange happens.
      3. If Combobox is clicked, no matter if the user selects anything, the program still operates normally. But on program termination (either by pressing the x mark on window, or by terminating the execution on Qt creator) it crashes with segfault.

      Notes:

      • If QtQuick.Controls 1.4 is imported, the issue doesn't happen.
      • Tried a random Combobox from the net (presented bellow), with the original setup (import QtQuick.Controls 2.15), and it didn't crash!!!
      ComboBox {
              id: control
              model: 10
              popup: Popup {
                  y: control.height - 1
                  width: control.width
                  implicitHeight: listview.contentHeight
                  padding: 1            contentItem: ListView {
                      id: listview
                      clip: true
                      model: control.popup.visible ? control.delegateModel : null
                      currentIndex: control.highlightedIndex                ScrollIndicator.vertical: ScrollIndicator { }
                  }            background: Rectangle {
                      border.color: "#21be2b"
                      radius: 2
                  }
              }
          }

       

      Attachments

        1. QtComboboxBug_Debugger.png
          QtComboboxBug_Debugger.png
          183 kB
        2. main.qml
          0.3 kB

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              logari84 Stamatis Poulios
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes