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

"QQmlEngine::setContextForObject(): Object already has a QQmlContext" when running auto tests

    XMLWordPrintable

    Details

      Description

      I started seeing this a while ago when running auto tests. It can be seen by running e.g. tst_basic with the following argument:

      ComboBox::test_reopen_popup
      

      The stack trace up to the warning is:

      1   QQmlEngine::setContextForObject                                                                                                                                                                                                                  qqmlengine.cpp               1462 0x7ffff0ec8fd5 
      2   QQmlEnginePrivate::singletonInstance<QJSValue>                                                                                                                                                                                                   qqmlengine.cpp               2389 0x7ffff0ed4475 
      3   QQmlEnginePrivate::singletonInstance<QObject *>                                                                                                                                                                                                  qqmlengine_p.h               504  0x7ffff0c31a51 
      4   QV4::QQmlContextWrapper::getPropertyAndBase                                                                                                                                                                                                      qv4qmlcontext.cpp            238  0x7ffff0c2a655 
      5   QV4::QQmlContextWrapper::resolveQmlContextPropertyLookupGetter                                                                                                                                                                                   qv4qmlcontext.cpp            486  0x7ffff0c2d11b 
      6   QV4::Moth::VME::interpret                                                                                                                                                                                                                        qv4vme_moth.cpp              629  0x7ffff0d86a9e 
      7   QV4::Moth::VME::exec                                                                                                                                                                                                                             qv4vme_moth.cpp              507  0x7ffff0d80e62 
      8   QV4::Function::call                                                                                                                                                                                                                              qv4function.cpp              70   0x7ffff0b61270 
      9   QQmlJavaScriptExpression::evaluate                                                                                                                                                                                                               qqmljavascriptexpression.cpp 229  0x7ffff0f98fb2 
      10  QQmlBinding::evaluate                                                                                                                                                                                                                            qqmlbinding.cpp              216  0x7ffff0e41646 
      11  QQmlNonbindingBinding::doUpdate                                                                                                                                                                                                                  qqmlbinding.cpp              252  0x7ffff0e49de9 
      12  QQmlBinding::update                                                                                                                                                                                                                              qqmlbinding.cpp              192  0x7ffff0e412e4 
      13  QQmlBinding::setEnabled                                                                                                                                                                                                                          qqmlbinding.cpp              555  0x7ffff0e43f28 
      14  QQmlObjectCreator::finalize                                                                                                                                                                                                                      qqmlobjectcreator.cpp        1417 0x7ffff10442c2 
      15  QQmlComponentPrivate::complete                                                                                                                                                                                                                   qqmlcomponent.cpp            988  0x7ffff0e77907 
      16  QQmlComponentPrivate::completeDeferred                                                                                                                                                                                                           qqmlcomponent.cpp            981  0x7ffff0e77749 
      17  QtQuickPrivate::completeDeferred                                                                                                                                                                                                                 qquickdeferredexecute.cpp    150  0x7ffff1ce197e 
      18  quickCompleteDeferred<QQuickItem>                                                                                                                                                                                                                qquickdeferredexecute_p_p.h  87   0x7ffff1c3af02 
      19  QQuickControlPrivate::executeContentItem                                                                                                                                                                                                         qquickcontrol.cpp            735  0x7ffff1cd60d8 
      20  QQuickControl::componentComplete                                                                                                                                                                                                                 qquickcontrol.cpp            1906 0x7ffff1cdab97 
      21  QQuickAbstractButton::componentComplete                                                                                                                                                                                                          qquickabstractbutton.cpp     1028 0x7ffff1c333d7 
      22  QQmlObjectCreator::finalize                                                                                                                                                                                                                      qqmlobjectcreator.cpp        1449 0x7ffff10448f2 
      23  QQmlIncubatorPrivate::incubate                                                                                                                                                                                                                   qqmlincubator.cpp            364  0x7ffff0f8f82e 
      24  QQmlEnginePrivate::incubate                                                                                                                                                                                                                      qqmlincubator.cpp            90   0x7ffff0f8d5e0 
      25  QQmlComponentPrivate::incubateObject                                                                                                                                                                                                             qqmlcomponent.cpp            1224 0x7ffff0e7972a 
      26  QQmlDelegateModelPrivate::object                                                                                                                                                                                                                 qqmldelegatemodel.cpp        1296 0x7fffed93037d 
      27  QQmlDelegateModel::object                                                                                                                                                                                                                        qqmldelegatemodel.cpp        1337 0x7fffed930930 
      28  QQuickItemViewPrivate::createItem                                                                                                                                                                                                                qquickitemview.cpp           2349 0x7fffef8d669c 
      29  QQuickListViewPrivate::addVisibleItems                                                                                                                                                                                                           qquicklistview.cpp           717  0x7fffef90a393 
      30  QQuickItemViewPrivate::refill                                                                                                                                                                                                                    qquickitemview.cpp           1801 0x7fffef8cf0b4 
      31  QQuickItemViewPrivate::refill                                                                                                                                                                                                                    qquickitemview.cpp           1771 0x7fffef8ceb43 
      32  QQuickItemView::componentComplete                                                                                                                                                                                                                qquickitemview.cpp           1496 0x7fffef8ca72e 
      33  QQmlObjectCreator::finalize                                                                                                                                                                                                                      qqmlobjectcreator.cpp        1449 0x7ffff10448f2 
      34  QQmlComponentPrivate::complete                                                                                                                                                                                                                   qqmlcomponent.cpp            988  0x7ffff0e77907 
      35  QQmlComponentPrivate::completeDeferred                                                                                                                                                                                                           qqmlcomponent.cpp            981  0x7ffff0e77749 
      36  QtQuickPrivate::completeDeferred                                                                                                                                                                                                                 qquickdeferredexecute.cpp    150  0x7ffff1ce197e 
      37  quickCompleteDeferred<QQuickItem>                                                                                                                                                                                                                qquickdeferredexecute_p_p.h  87   0x7ffff1c3af02 
      38  QQuickPopupItemPrivate::executeContentItem                                                                                                                                                                                                       qquickpopupitem.cpp          106  0x7ffff1dab616 
      39  QQuickControl::componentComplete                                                                                                                                                                                                                 qquickcontrol.cpp            1906 0x7ffff1cdab97 
      40  QQuickPane::componentComplete                                                                                                                                                                                                                    qquickpane.cpp               392  0x7ffff1d8b766 
      41  QQuickPage::componentComplete                                                                                                                                                                                                                    qquickpage.cpp               453  0x7ffff1d857a4 
      

      The full stack trace is attached.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes