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

Operations on StackView via attached property within expression evaluation causes assert

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P5: Not important
    • None
    • 5.6
    • Quick: Controls 2
    • None

    Description

      See attached project.

      I mistakenly left out function() in the following code:

      onBackClicked: {
          root.StackView.view.pop(StackView.Immediate);
      }
      

      This causes the code within the expression to be evaluated too early, apparently, as there is an assertion within the QML engine:

      1	__GI_raise	raise.c	55	0x7ffff6051267	
      2	__GI_abort	abort.c	89	0x7ffff6052eca	
      3	qt_message_fatal	qlogging.cpp	1610	0x7ffff6a2bff1	
      4	QMessageLogger::fatal	qlogging.cpp	784	0x7ffff6a2829a	
      5	qt_assert	qglobal.cpp	2994	0x7ffff6a20a1f	
      6	QQmlEnginePrivate::getV8Engine	qqmlengine_p.h	354	0x7ffff73ae579	
      7	QQmlBinding::write	qqmlbinding.cpp	224	0x7ffff73aca2b	
      8	QQmlBinding::update	qqmlbinding.cpp	191	0x7ffff73ac770	
      9	QQmlBinding::setEnabled	qqmlbinding.cpp	412	0x7ffff73ade4d	
      10	QQmlObjectCreator::finalize	qqmlobjectcreator.cpp	1191	0x7ffff73bf074	
      11	QQmlIncubatorPrivate::incubate	qqmlincubator.cpp	348	0x7ffff73289b1	
      12	QQmlEnginePrivate::incubate	qqmlincubator.cpp	87	0x7ffff7327d82	
      13	QQmlComponent::create	qqmlcomponent.cpp	1052	0x7ffff73240cc	
      14	QQuickStackElement::load	qquickstackview_p.cpp	143	0x7fffe02a7264	
      15	QQuickStackViewPrivate::pushElements	qquickstackview_p.cpp	350	0x7fffe02a8060	
      16	QQuickStackView::push	qquickstackview.cpp	458	0x7fffe02a35f4	
      17	QQuickStackView::qt_static_metacall	moc_qquickstackview_p.cpp	222	0x7fffe02c1cb4	
      18	QQuickStackView::qt_metacall	moc_qquickstackview_p.cpp	384	0x7fffe02c245d	
      19	QMetaObject::metacall	qmetaobject.cpp	295	0x7ffff6c97aff	
      20	QQmlObjectOrGadget::metacall	qqmlpropertycache.cpp	1557	0x7ffff737ac93	
      ...	<More>				
      

      This is clearly misuse of the API, but I thought it worth reporting in case there was an easy way to guard against it.

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            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