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

REG: QQuickDialogButtonBox: Crash when modifying standardButtons more than once

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.2.1
    • Fix Version/s: 6.2.3, 6.3
    • Component/s: Quick: Controls 2
    • Labels:
      None

      Description

      The following piece of code should reproduce a crash, when more than one CheckBox is checked. Intended behavior is to allow multiple buttons to dynamically appear/disappear in the QQuickDialogButtonBox.

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("QTBUG")
      
          Column {
              Row {
                  // Check this 1st
                  CheckBox {
                      id: yes
                      text: "yes"
                  }
                  // Check this 2nd (should crash)
                  CheckBox {
                      id: no
                      text: "no"
                  }
                  CheckBox {
                      id: ok
                      text: "ok"
                  }
              }
              Row {
                  DialogButtonBox {
                      standardButtons: (yes.checked ? 0x00004000 : 0) | (no.checked ? 0x00010000 : 0) | (ok.checked ? 0x00000400 : 0)
                  }
              }
          }
      }
      

       
      It worked with 6.2.0, so it's a regression.

      Stack trace:

                                                                                                        
      1  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::get                 qscopedpointer.h          147  0x7fffe4d6b85b 
      2  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>> const> qglobal.h                 1316 0x7fffe4d7bed9 
      3  QQuickItem::d_func                                                                   qquickitem.h              478  0x7fffe4dce01e 
      4  QQuickItem::width                                                                    qquickitem.cpp            6982 0x7fffe4e704c8 
      5  QQuickListViewPrivate::updateHighlight                                               qquicklistview.cpp        1043 0x7fffe5a419e4 
      6  QQuickItemViewPrivate::updateCurrent                                                 qquickitemview.cpp        1685 0x7fffe59fe980 
      7  QQuickItemView::createdItem                                                          qquickitemview.cpp        2406 0x7fffe5a083bb 
      8  QQuickItemView::qt_static_metacall                                                   moc_qquickitemview_p.cpp  505  0x7fffe5a0a0b7 
      9  doActivate<false>                                                                    qobject.cpp               3926 0x7ffff2f95adf 
      10 QMetaObject::activate                                                                qobject.cpp               3974 0x7ffff2f818b1 
      11 QQmlInstanceModel::createdItem                                                       moc_qqmlobjectmodel_p.cpp 269  0x7fffe44c7d14 
      12 QQmlObjectModel::object                                                              qqmlobjectmodel.cpp       285  0x7fffe44c4c64 
      13 QQuickItemViewPrivate::createItem                                                    qquickitemview.cpp        2351 0x7fffe5a0785d 
      14 QQuickListViewPrivate::applyInsertionChange                                          qquicklistview.cpp        3744 0x7fffe5a596bb 
      15 QQuickItemViewPrivate::applyModelChanges                                             qquickitemview.cpp        2061 0x7fffe5a0350a 
      16 QQuickItemViewPrivate::layout                                                        qquickitemview.cpp        1895 0x7fffe5a0138a 
      17 QQuickItemView::updatePolish                                                         qquickitemview.cpp        1476 0x7fffe59fb4e4 
      18 QQuickWindowPrivate::polishItems                                                     qquickwindow.cpp          379  0x7fffe5159819 
      19 QSGThreadedRenderLoop::polishAndSync                                                 qsgthreadedrenderloop.cpp 1533 0x7fffe59338f6 
      20 QSGThreadedRenderLoop::handleUpdateRequest                                           qsgthreadedrenderloop.cpp 1374 0x7fffe5930d4a 
      21 QQuickWindow::event                                                                  qquickwindow.cpp          1531 0x7fffe5163eae 
      22 QCoreApplicationPrivate::notify_helper                                               qcoreapplication.cpp      1230 0x7ffff2e370b6 
      23 doNotify                                                                             qcoreapplication.cpp      1159 0x7ffff2e36803 
      24 QCoreApplication::notify                                                             qcoreapplication.cpp      1142 0x7ffff2e366ae 
      25 QGuiApplication::notify                                                              qguiapplication.cpp       1930 0x7ffff44fe631 
      26 QCoreApplication::notifyInternal2                                                    qcoreapplication.cpp      1063 0x7ffff2e3649a 
      27 QCoreApplication::sendEvent                                                          qcoreapplication.cpp      1479 0x7ffff2e37d17 
      28 QPlatformWindow::deliverUpdateRequest                                                qplatformwindow.cpp       810  0x7ffff45da551 
      29 QPlatformWindow::windowEvent                                                         qplatformwindow.cpp       490  0x7ffff45d7dca 
      30 QXcbWindow::windowEvent                                                              qxcbwindow.cpp            2404 0x7fffeb8e1ec4 
      31 QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow                            qguiapplication.cpp       1985 0x7ffff44ff093 
      32 QGuiApplication::notify                                                              qguiapplication.cpp       1924 0x7ffff44fe603 
      33 QCoreApplication::notifyInternal2                                                    qcoreapplication.cpp      1063 0x7ffff2e3649a 
      34 QCoreApplication::sendEvent                                                          qcoreapplication.cpp      1479 0x7ffff2e37d17 
      35 QTimerInfoList::activateTimers                                                       qtimerinfo_unix.cpp       639  0x7ffff33f7adc 
      36 timerSourceDispatch                                                                  qeventdispatcher_glib.cpp 185  0x7ffff37bd01a 
      37 g_main_context_dispatch                                                                                             0x7ffff1b1617d 
      38 ??                                                                                                                  0x7ffff1b16400 
      39 g_main_context_iteration                                                                                            0x7ffff1b164a3 
      40 QEventDispatcherGlib::processEvents                                                  qeventdispatcher_glib.cpp 429  0x7ffff37bec01 
      41 QXcbGlibEventDispatcher::processEvents                                               qxcbeventdispatcher.cpp   132  0x7fffeb84890f 
      42 QEventLoop::processEvents                                                            qeventloop.cpp            136  0x7ffff2e6801b 
      43 QEventLoop::exec                                                                     qeventloop.cpp            218  0x7ffff2e68a1c 
      44 QCoreApplication::exec                                                               qcoreapplication.cpp      1384 0x7ffff2e37869 
      45 QGuiApplication::exec                                                                qguiapplication.cpp       1862 0x7ffff44fe442 
      46 main                                                                                 main.cpp                  22   0x555555557c76                                                                                                                
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              hurlevent Oliver Eftevaag
              Reporter:
              hurlevent Oliver Eftevaag
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes