[Interest] Qt 5 app on Qt 6 crashes

Александр Иваш elderorb at gmail.com
Sat Apr 30 15:06:15 CEST 2022


I'm in the process of porting the Qt 5 QML app to Qt 6. After having
some fun with the QML namespaces difference finally I've got all the
issues resolved and.... it crashed during startup.

Crash happened inside qproperty.cpp:

CompatPropertySafePoint::CompatPropertySafePoint(QBindingStatus
*status, QUntypedPropertyData *property)
    : property(property)
{
    // store a pointer to the currentBindingEvaluationState to avoid a
TLS lookup in
    // the destructor (as these come with a non zero cost)

    currentState = &status->currentCompatProperty; /////// this line crashes!
    previousState = *currentState;
    *currentState = this;

    currentlyEvaluatingBindingList = &bindingStatus.currentlyEvaluatingBinding;
    bindingState = *currentlyEvaluatingBindingList;
    *currentlyEvaluatingBindingList = nullptr;
}

It happened because 'status' turned out to be 0xfeeefeeefeeefeee

Just in case here is the stack trace:
1   QtPrivate::CompatPropertySafePoint::CompatPropertySafePoint

                                          qproperty.cpp
520  0x7ffa12c909f5
2   QObjectCompatProperty<QQuickItemPrivate,double,&QQuickItemPrivate::_qt_property_width_offset,{QQuickItemPrivate::setWidth,0},{QQuickItemPrivate::widthChanged,0},0>::bindingWrapper
qproperty_p.h                488  0x7ffa19b652f2
3   QPropertyBindingPrivate::evaluateRecursive_inline

                                          qproperty_p.h
805  0x7ffa12a7b9fc
4   QPropertyBindingPrivate::evaluateRecursive

                                          qproperty.cpp
297  0x7ffa12c90c2c
5   QQmlPropertyBindingJS::expressionChanged

                                          qqmlpropertybinding.cpp
191  0x7ffa13fc1084
6   QQmlJavaScriptExpressionGuard_callback

                                          qqmljavascriptexpression.cpp
585  0x7ffa13ef0dcd
7   QQmlNotifier::emitNotify

                                          qqmlnotifier.cpp
105  0x7ffa13f5132a
8   QQmlData::signalEmitted

                                          qqmlengine.cpp
387  0x7ffa13e84c2f
9   doActivate<0>

                                          qobject.cpp
3815 0x7ffa12c7c7e0
10  QMetaObject::activate

                                          qobject.cpp
3993 0x7ffa12c64ac1
11  QQmlVMEMetaObject::activate

                                          qqmlvmemetaobject.cpp
1297 0x7ffa140cd866
12  QQmlVMEMetaObject::writeVarProperty

                                          qqmlvmemetaobject.cpp
1112 0x7ffa140cd0f9
13  QQmlVMEMetaObject::setVMEProperty

                                          qqmlvmemetaobject.cpp
1215 0x7ffa140c9135
14  QV4::QObjectWrapper::setProperty

                                          qv4qobjectwrapper.cpp
580  0x7ffa13ccb93c
15  QV4::QObjectWrapper::setQmlProperty

                                          qv4qobjectwrapper.cpp
475  0x7ffa13cca868
16  QV4::QQmlContextWrapper::virtualPut

                                          qv4qmlcontext.cpp
438  0x7ffa13cc2676
17  QV4::Object::put

                                          qv4object_p.h
318  0x7ffa1396bbad
18  QV4::ExecutionContext::setProperty

                                          qv4context.cpp
318  0x7ffa13b7bd95
19  QV4::Runtime::StoreNameSloppy::call

                                          qv4runtime.cpp
1004 0x7ffa13d3bc69
20  QV4::Moth::VME::interpret

                                          qv4vme_moth.cpp
694  0x7ffa13da7b42
... <More>



Any hints on how to troubleshoot further?


More information about the Interest mailing list