Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.2.0
-
None
-
fc218a91ce03187f51058deba9d5cdde9c3e6d05
Description
The following code will crash when the Timer is triggered. This code does not crash with Qt 5.1.0.
import QtQuick 2.0 ListView { id: myList width: 400; height: 400 header: Item { height: parent ? 10 : 20 // this line is responsible for the crash width: parent.width } model: 10 delegate: Rectangle { width: parent.width; height: 20 color: index % 2 ? "green" : "red" } } Timer { interval: 1000 running: true onTriggered: myList.verticalLayoutDirection = ListView.BottomToTop } }
The backtrace is:
Program received signal SIGABRT, Aborted. 0xb7fdd424 in __kernel_vsyscall () (gdb) bt #0 0xb7fdd424 in __kernel_vsyscall () #1 0xb60871df in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb608a825 in __GI_abort () at abort.c:91 #3 0xb62dd13d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #4 0xb62daed3 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #5 0xb62daf0f in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #6 0xb62dbb82 in __cxa_pure_virtual () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #7 0xb7d8f94f in QQuickListViewPrivate::headerSize (this=0x822c580) at items/qquicklistview.cpp:1283 #8 0xb7d8fd58 in QQuickListViewPrivate::updateHeader (this=0x822c580) at items/qquicklistview.cpp:1350 #9 0xb7dde1ae in QQuickItemViewPrivate::itemGeometryChanged (this=0x822c580, item=0x8227e58, newGeometry=..., oldGeometry=...) at items/qquickitemview.cpp:1154 #10 0xb7d8fed7 in QQuickListViewPrivate::itemGeometryChanged (this=0x822c580, item=0x8227e58, newGeometry=..., oldGeometry=...) at items/qquicklistview.cpp:1367 #11 0xb7cce7aa in QQuickItem::geometryChanged (this=0x8227e58, newGeometry=..., oldGeometry=...) at items/qquickitem.cpp:3279 #12 0xb7cd50c6 in QQuickItem::setHeight (this=0x8227e58, h=100) at items/qquickitem.cpp:5989 #13 0xb7cd9ff3 in QQuickItem::qt_metacall (this=0x8227e58, _c=QMetaObject::WriteProperty, _id=8, _a=0xbfffd25c) at .moc/moc_qquickitem.cpp:877 #14 0xb65e083e in QMetaObject::metacall (object=0x8227e58, cl=QMetaObject::WriteProperty, idx=9, argv=0xbfffd25c) at kernel/qmetaobject.cpp:308 #15 0xb7830fd4 in QQmlPropertyPrivate::writeBinding (object=0x8227e58, core=..., context=0x8227e00, expression=0x8228158, result=..., isUndefined=false, flags=...) at qml/qqmlproperty.cpp:1492 #16 0xb78e7b81 in QQmlBinding::update (this=0x8228148, flags=...) at qml/qqmlbinding.cpp:260 #17 0xb78e83fd in QQmlBinding::update (this=0x8228148) at qml/qqmlbinding_p.h:106 #18 0xb78e7fcb in QQmlBinding::expressionChanged (e=0x8228158) at qml/qqmlbinding.cpp:312 #19 0xb78de38b in QQmlJavaScriptExpressionGuard_callback (e=0x8232818) at qml/qqmljavascriptexpression.cpp:369 #20 0xb78bdecd in QQmlNotifier::emitNotify (endpoint=0x8232818, a=0xbfffd718) at qml/qqmlnotifier.cpp:81 #21 0xb78bde66 in QQmlNotifier::emitNotify (endpoint=0x8232834, a=0xbfffd718) at qml/qqmlnotifier.cpp:76 #22 0xb78151e4 in QQmlData::signalEmitted (object=0x8227e58, index=9, a=0xbfffd718) at qml/qqmlengine.cpp:713 #23 0xb661574e in QMetaObject::activate (sender=0x8227e58, signalOffset=3, local_signal_index=6, argv=0xbfffd718) at kernel/qobject.cpp:3564 #24 0xb6615684 in QMetaObject::activate (sender=0x8227e58, m=0xb7fb24cc, local_signal_index=6, argv=0xbfffd718) at kernel/qobject.cpp:3546 #25 0xb7cda49a in QQuickItem::parentChanged (this=0x8227e58, _t1=0x0) at .moc/moc_qquickitem.cpp:967 #26 0xb7ccbbb1 in QQuickItem::setParentItem (this=0x8227e58, parentItem=0x0) at items/qquickitem.cpp:2347 #27 0xb7dda190 in FxViewItem::~FxViewItem (this=0x82288c0, __in_chrg=<optimized out>) at items/qquickitemview.cpp:69 #28 0xb7d97a44 in FxListItemSG::~FxListItemSG (this=0x82288c0, __in_chrg=<optimized out>) at items/qquicklistview.cpp:247 #29 0xb7d97a7f in FxListItemSG::~FxListItemSG (this=0x82288c0, __in_chrg=<optimized out>) at items/qquicklistview.cpp:247 #30 0xb7de0f5f in QQuickItemViewPrivate::regenerate (this=0x822c580) at items/qquickitemview.cpp:1777 #31 0xb7ddbb13 in QQuickItemView::setVerticalLayoutDirection (this=0x8232060, layoutDirection=QQuickItemView::BottomToTop) at items/qquickitemview.cpp:535