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

ListView with implicitHeight bound to the contentHeight crashes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 5.8.0
    • None
    • Mageia Linux Cauldron x86_64

    Description

      To reproduce, run the test program and click on the button. I tested with Material theme.

      main.qml
      import QtQuick 2.8
      import QtQuick.Controls 2.1
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Button {
              anchors.centerIn: parent
              text: "Show dialog"
              onClicked: dialog.open()
      
              Dialog {
                  id: dialog
      
                  width: 250
                  x: (parent.width - width) / 2
                  y: (parent.height - height) / 2
      
                  footer: DialogButtonBoxStacked {
                      Button {
                          text: "Some text"
                      }
                      Button {
                          text: "Loooooooooooong text"
                      }
                  }
              }
          }
      }
      
      DialogButtonBoxStacked.qml
      import QtQuick 2.8
      import QtQuick.Templates 2.1 as T
      import QtQuick.Controls 2.1
      import QtQuick.Controls.Material 2.1
      
      T.DialogButtonBox {
          id: control
      
          implicitWidth: Math.max(background ? background.implicitWidth : 0,
                                  contentItem.implicitWidth + leftPadding + rightPadding)
          implicitHeight: Math.max(background ? background.implicitHeight : 0,
                                   contentItem.implicitHeight + topPadding + bottomPadding)
      
          Material.foreground: Material.accent
      
          delegate: Button { flat: true }
      
          contentItem: ListView {
              implicitHeight: contentHeight // This line cause crash
      
              model: control.contentModel
          }
      }
      
      Stack trace
      1  raise                                                                         0x7ffff521c828 
      2  abort                                                                         0x7ffff521df3a 
      3  qt_message_fatal                            qlogging.cpp                 1688 0x7ffff636373f 
      4  QMessageLogger::fatal                       qlogging.cpp                 796  0x7ffff635fb0c 
      5  qt_assert                                   qglobal.cpp                  3077 0x7ffff635860a 
      6  QQuickShaderEffectSource::updatePaintNode   qquickshadereffectsource.cpp 664  0x7ffff7b64f97 
      7  QQuickWindowPrivate::updateDirtyNode        qquickwindow.cpp             3111 0x7ffff7a4c55b 
      8  QQuickWindowPrivate::updateDirtyNodes       qquickwindow.cpp             2856 0x7ffff7a4b38d 
      9  QQuickWindowPrivate::syncSceneGraph         qquickwindow.cpp             419  0x7ffff7a3f194 
      10 QSGGuiThreadRenderLoop::renderWindow        qsgrenderloop.cpp            409  0x7ffff79bfb94 
      11 QSGGuiThreadRenderLoop::handleUpdateRequest qsgrenderloop.cpp            497  0x7ffff79c02bf 
      12 QQuickWindow::event                         qquickwindow.cpp             1576 0x7ffff7a4430b 
      13 QCoreApplicationPrivate::notify_helper      qcoreapplication.cpp         1109 0x7ffff65b60c0 
      14 doNotify                                    qcoreapplication.cpp         1050 0x7ffff65b5d43 
      15 QCoreApplication::notify                    qcoreapplication.cpp         1036 0x7ffff65b5cb6 
      16 QGuiApplication::notify                     qguiapplication.cpp          1670 0x7ffff7282544 
      17 QCoreApplication::notifyInternal2           qcoreapplication.cpp         975  0x7ffff65b5c46 
      18 QCoreApplication::sendEvent                 qcoreapplication.h           231  0x7ffff7268008 
      19 QWindowPrivate::deliverUpdateRequest        qwindow.cpp                  2171 0x7ffff72951c1 
      20 QWindow::event                              qwindow.cpp                  2142 0x7ffff72950dc 
      21 QQuickWindow::event                         qquickwindow.cpp             1595 0x7ffff7a44399 
      22 QCoreApplicationPrivate::notify_helper      qcoreapplication.cpp         1109 0x7ffff65b60c0 
      23 doNotify                                    qcoreapplication.cpp         1050 0x7ffff65b5d43 
      24 QCoreApplication::notify                    qcoreapplication.cpp         1036 0x7ffff65b5cb6 
      25 QGuiApplication::notify                     qguiapplication.cpp          1670 0x7ffff7282544 
      26 QCoreApplication::notifyInternal2           qcoreapplication.cpp         975  0x7ffff65b5c46 
      27 QCoreApplication::sendEvent                 qcoreapplication.h           231  0x7ffff65b9d90 
      28 QTimerInfoList::activateTimers              qtimerinfo_unix.cpp          643  0x7ffff6631534 
      29 timerSourceDispatch                         qeventdispatcher_glib.cpp    182  0x7ffff6632c44 
      30 g_main_context_dispatch                                                       0x7ffff35bd887 
      31 g_main_context_iterate.isra                                                   0x7ffff35bdab8 
      32 g_main_context_iteration                                                      0x7ffff35bdb5c 
      33 QEventDispatcherGlib::processEvents         qeventdispatcher_glib.cpp    423  0x7ffff6633611 
      34 QPAEventDispatcherGlib::processEvents       qeventdispatcher_glib.cpp    121  0x7ffff7eff1fa 
      35 QEventLoop::processEvents                   qeventloop.cpp               134  0x7ffff65b25ec 
      36 QEventLoop::exec                            qeventloop.cpp               212  0x7ffff65b28e8 
      37 QCoreApplication::exec                      qcoreapplication.cpp         1248 0x7ffff65b6390 
      38 QGuiApplication::exec                       qguiapplication.cpp          1661 0x7ffff72824f4 
      39 main                                        main.cpp                     12   0x400fcf       
      

      Attachments

        1. full_stack_trace.txt
          26 kB
          Nikita Krupenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shausman Simon Hausmann
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes