Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.6.3, 5.9.3, 5.10.0, 5.15.2
Description
The following code
Button { id: crasher action: Action { checkable: true onCheckedChanged: PropertyAction { target: crasher; property: "visible"; value: true } } }
leads to a crash with the following stack trace:
1 QMessageLogger::fatal qlogging.cpp 808 0x6b98f9d8 2 qt_assert_x qglobal.cpp 3131 0x6b98ae13 3 QVector<QQmlPropertyData *>::at qvector.h 423 0x13c2fe88 4 QQmlObjectCreator::setupBindings qqmlobjectcreator.cpp 690 0x13c2fe88 5 QQmlObjectCreator::populateInstance qqmlobjectcreator.cpp 1356 0x13c2caa1 6 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1199 0x13c2d8db 7 QQmlObjectCreator::setPropertyBinding qqmlobjectcreator.cpp 751 0x13c2e252 8 QQmlObjectCreator::setupBindings qqmlobjectcreator.cpp 703 0x13c2ffbe 9 QQmlObjectCreator::populateInstance qqmlobjectcreator.cpp 1356 0x13c2caa1 10 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1199 0x13c2d8db 11 QQmlObjectCreator::setPropertyBinding qqmlobjectcreator.cpp 751 0x13c2e252 12 QQmlObjectCreator::setupBindings qqmlobjectcreator.cpp 703 0x13c2ffbe 13 QQmlObjectCreator::populateInstance qqmlobjectcreator.cpp 1356 0x13c2caa1 14 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1199 0x13c2d8db 15 QQmlObjectCreator::setPropertyBinding qqmlobjectcreator.cpp 751 0x13c2e252 16 QQmlObjectCreator::setupBindings qqmlobjectcreator.cpp 703 0x13c2ffbe 17 QQmlObjectCreator::populateInstance qqmlobjectcreator.cpp 1356 0x13c2caa1 18 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1199 0x13c2d8db 19 QQmlObjectCreator::create qqmlobjectcreator.cpp 202 0x13c2dc7c 20 QQmlComponentPrivate::beginCreate qqmlcomponent.cpp 858 0x13bb7d05 21 QQmlComponent::beginCreate qqmlcomponent.cpp 807 0x13bb7ebd 22 QQmlComponent::create qqmlcomponent.cpp 767 0x13bb4248 23 QQuickView::continueExecute qquickview.cpp 471 0x1f742e6b 24 QQuickViewPrivate::execute qquickview.cpp 107 0x1f743595 25 QQuickView::setSource qquickview.cpp 236 0x1f743622 26 ChatRoomWidget::ChatRoomWidget chatroomwidget.cpp 76 0x410662 27 MainWindow::MainWindow mainwindow.cpp 75 0x4055c3 28 main main.cpp 73 0x41eb51
If `onCheckedChanged` is replaced with `onToggled`, the crash doesn't occur. Moving the handler out of `Action` to `Button` helps too.