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

Assertion failure when using "anchors.fill: parent" in tests/auto/qml/qmltc/QmltcTests/delegate_context.qml

    XMLWordPrintable

Details

    • 2f4935289e (qt/qtdeclarative/dev) 2f4935289e (qt/tqtc-qtdeclarative/dev) 4580f49fb9 (qt/qtdeclarative/6.4) 4580f49fb9 (qt/tqtc-qtdeclarative/6.4)

    Description

      As part of fixing this failure, I tried the following patch to tests/auto/qml/qmltc/QmltcTests/delegate_context.qml:

      diff --git a/tests/auto/qml/qmltc/QmltcTests/delegate_context.qml b/tests/auto/qml/qmltc/QmltcTests/delegate_context.qml
      index 8dfcbb24b4..0c32c8d4e3 100644
      --- a/tests/auto/qml/qmltc/QmltcTests/delegate_context.qml
      +++ b/tests/auto/qml/qmltc/QmltcTests/delegate_context.qml
      @@ -3,10 +3,13 @@ import QtQuick
       Text {
           id: root
           text: "hello"
      +    width: 100
      +    height: 100
       
           ListView {
               id: listView
               model: 1
      +        anchors.fill: parent
       
               delegate: Text { // QV4::CompiledData::Object::IsComponent
                   id: listViewDelegate
      

      It resulted in an assertion failure:

      QFATAL : tst_qmltc::contextHierarchy_delegate() ASSERT: "typeRef" in file /Users/mitch/dev/qt-dev/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp, line 1179
      FAIL!  : tst_qmltc::contextHierarchy_delegate() Received a fatal error.
         Loc: [/Users/mitch/dev/qt-dev/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp(1179)]
      
      1   __pthread_kill                                                                                                                                                       (arm64e) /usr/lib/system/libsystem_kernel.dylib       0x1b5afed98 
      2   pthread_kill                                                                                                                                                         (arm64e) /usr/lib/system/libsystem_pthread.dylib      0x1b5b33ee0 
      3   abort                                                                                                                                                                (arm64e) /usr/lib/system/libsystem_c.dylib            0x1b5a6e340 
      4   qAbort()                                                                                                                                                             qglobal.cpp                                      3363 0x112d38e10 
      5   qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&)                                                                                               qlogging.cpp                                     1923 0x112d60128 
      6   QMessageLogger::fatal(const char *, ...) const                                                                                                                       qlogging.cpp                                     850  0x11406de20 
      7   qt_assert(const char *, const char *, int)                                                                                                                           qglobal.cpp                                      3270 0x11406bc44 
      8   QQmlObjectCreator::createInstance(int, QObject *, bool)                                                                                                              qqmlobjectcreator.cpp                            1179 0x11085fbfc 
      9   QQmlObjectCreator::create(int, QObject *, QQmlInstantiationInterrupt *, int)                                                                                         qqmlobjectcreator.cpp                            184  0x11085ed10 
      10  QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt&)                                                                                                          qqmlincubator.cpp                                263  0x1107424d0 
      11  QQmlEnginePrivate::incubate(QQmlIncubator&, QQmlRefPointer<QQmlContextData> const&)                                                                                  qqmlincubator.cpp                                54   0x110741514 
      12  QQmlComponentPrivate::incubateObject(QQmlIncubator *, QQmlComponent *, QQmlEngine *, QQmlRefPointer<QQmlContextData> const&, QQmlRefPointer<QQmlContextData> const&) qqmlcomponent.cpp                                1254 0x1104f1db0 
      13  QQmlDelegateModelPrivate::object(QQmlListCompositor::Group, int, QQmlIncubator::IncubationMode)                                                                      qqmldelegatemodel.cpp                            1249 0x102006090 
      14  QQmlDelegateModel::object(int, QQmlIncubator::IncubationMode)                                                                                                        qqmldelegatemodel.cpp                            1290 0x102007af0 
      15  QQuickItemViewPrivate::createItem(int, QQmlIncubator::IncubationMode)                                                                                                qquickitemview.cpp                               2348 0x105906d18 
      16  QQuickListViewPrivate::addVisibleItems(double, double, double, double, bool)                                                                                         qquicklistview.cpp                               755  0x10596cac8 
      17  QQuickItemViewPrivate::refill(double, double)                                                                                                                        qquickitemview.cpp                               1798 0x105908974 
      18  QQuickItemViewPrivate::refill()                                                                                                                                      qquickitemview.cpp                               1766 0x1058eb410 
      19  QQuickItemViewPrivate::refillAndUpdateCurrent()                                                                                                                      qquickitemview.cpp                               1741 0x105900bd8 
      20  QQuickItemView::geometryChange(QRectF const&, QRectF const&)                                                                                                         qquickitemview.cpp                               1339 0x105900b54 
      [...]
      

      Attachments

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

        Activity

          People

            agolubev Andrei Golubev
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes