Application crashes with Qt 5.14/5.13 but runs correclty with 5.5
-
Hi, I have an issue with my project when I compile it with Qt 5.13.x or 5.14.x versions, it crashes immediatly after startup without a clear stack trace.
If I compile the code with Qt 5.5, it runs correclty without any issues. I don't have any warning about deprecated code or anything, the code itself is well tested and mantained, I was testing the upgrade to a newer Qt version.I'm compiling on a ZBook 15 G5 on Ubuntu 22.04 (X11 with Nvidia Quadro P2000 GPU), plenty of RAM and performance available.
The stack trace is the following:
1 QObject::objectName() const 0x7ffff40bf110 2 QQmlEngineDebugServiceImpl::valueContents(QVariant) const 0x7fffcf40f42d 3 QQmlEngineDebugServiceImpl::propertyChanged(int, int, QMetaProperty const&, QVariant const&) 0x7fffcf411ea0 4 void doActivate<false>(QObject *, int, void * *) 0x7ffff40ca5f0 5 QQmlWatchProxy::notifyValueChanged() 0x7fffcf4147e3 6 QQmlWatcher::addPropertyWatch(int, QObject *, unsigned int, QMetaProperty const&) 0x7fffcf414f79 7 QQmlWatcher::addWatch(int, unsigned int) 0x7fffcf4150ef 8 QQmlEngineDebugServiceImpl::processMessage(QByteArray const&) 0x7fffcf411454 9 QObject::event(QEvent *) 0x7ffff40c2c13 10 QCoreApplication::notifyInternal2(QObject *, QEvent *) 0x7ffff4093c48 11 QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *) 0x7ffff40971da 12 postEventSourceDispatch(_GSource *, int ( *)(void *), void *) 0x7ffff40ed0a3 13 g_main_context_dispatch 0x7fffef31bd1b 14 ?? 0x7fffef3706f8 15 g_main_context_iteration 0x7fffef3193c3 16 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff40ec73c 17 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff4092662 18 QCoreApplication::exec() 0x7ffff409b590 19 main main.cpp 56 0x55555555c318
EDIT I've found a totally different stack trace with the same crash at startup, this seems more "related" to Gstreamer and QML
1 ?? 0x7fff5cde458f 2 ?? 0x7fff5cdd8ec5 3 ?? 0x7fff5cdbe19b 4 ?? 0x7fff5d095a6c 5 ?? 0x7fff5cf860c9 6 vaPutImage 0x7fffa569b4b0 7 ?? 0x7fffa498ab23 8 ?? 0x7fffa494a1a9 9 ?? 0x7fffa4958e70 10 ?? 0x7fffc07b1056 11 gst_element_change_state 0x7fffc0070649 12 ?? 0x7fffc0070d55 13 QGstreamerVideoOverlay::QGstreamerVideoOverlay(QObject *, QByteArray const&) 0x7fff5dc30864 14 QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *, QByteArray const&) 0x7fff5dc3d410 15 QGstreamerPlayerService::QGstreamerPlayerService(QObject *) 0x7fff5e004bb1 16 QGstreamerPlayerServicePlugin::create(QString const&) 0x7fff5e00e6df 17 QPluginServiceProvider::requestService(QByteArray const&, QMediaServiceProviderHint const&) 0x7ffff1458401 18 QMediaPlayer::QMediaPlayer(QObject *, QFlags<QMediaPlayer::Flag>) 0x7ffff149b212 19 QDeclarativeAudio::classBegin() 0x7fff5f81faea 20 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3eef8c8 21 QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const *, QV4::CompiledData::Binding const *) 0x7ffff3ef1fe6 22 QQmlObjectCreator::setupBindings(bool) 0x7ffff3ef2543 23 QQmlObjectCreator::populateInstance(int, QObject *, QObject *, QQmlPropertyData const *) 0x7ffff3eeed5d 24 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3eefd7d 25 QQmlObjectCreator::create(int, QObject *, QQmlInstantiationInterrupt *, int) 0x7ffff3ef2f56 26 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3ef0189 27 QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const *, QV4::CompiledData::Binding const *) 0x7ffff3ef1fe6 28 QQmlObjectCreator::setupBindings(bool) 0x7ffff3ef2543 29 QQmlObjectCreator::populateInstance(int, QObject *, QObject *, QQmlPropertyData const *) 0x7ffff3eeed5d 30 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3eefd7d 31 QQmlObjectCreator::create(int, QObject *, QQmlInstantiationInterrupt *, int) 0x7ffff3ef2f56 32 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3ef0189 33 QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const *, QV4::CompiledData::Binding const *) 0x7ffff3ef1fe6 34 QQmlObjectCreator::setupBindings(bool) 0x7ffff3ef2543 35 QQmlObjectCreator::populateInstance(int, QObject *, QObject *, QQmlPropertyData const *) 0x7ffff3eeed5d 36 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3eefd7d 37 QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const *, QV4::CompiledData::Binding const *) 0x7ffff3ef1fe6 38 QQmlObjectCreator::setupBindings(bool) 0x7ffff3ef2543 39 QQmlObjectCreator::populateInstance(int, QObject *, QObject *, QQmlPropertyData const *) 0x7ffff3eeed5d 40 QQmlObjectCreator::createInstance(int, QObject *, bool) 0x7ffff3eefd7d 41 QQmlObjectCreator::create(int, QObject *, QQmlInstantiationInterrupt *, int) 0x7ffff3ef2f56 42 QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt&) 0x7ffff3e7ade6 43 QQmlEnginePrivate::incubate(QQmlIncubator&, QQmlContextData *) 0x7ffff3e7b904 44 QQmlComponent::create(QQmlIncubator&, QQmlContext *, QQmlContext *) 0x7ffff3e749ad 45 QQuickLoaderPrivate::_q_sourceLoaded() 0x7ffff1ab9ff9 46 QQuickLoader::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x7ffff1abaff9 47 void doActivate<false>(QObject *, int, void * *) 0x7ffff36d5ddf 48 QQmlComponent::statusChanged(QQmlComponent::Status) 0x7ffff3e73abe 49 QQmlComponentPrivate::typeDataReady(QQmlTypeData *) 0x7ffff3e75f6a 50 QQmlTypeData::completed() 0x7ffff3e50051 51 QQmlTypeLoaderThread::callCompletedMain(QQmlDataBlob *) 0x7ffff3e5a1fd 52 QQmlThreadPrivate::mainEvent() 0x7ffff3f1ac6c 53 QQmlThreadPrivate::MainObject::event(QEvent *) 0x7ffff3f1b3fe 54 QCoreApplication::notifyInternal2(QObject *, QEvent *) 0x7ffff369d808 55 QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *) 0x7ffff36a0882 56 postEventSourceDispatch(_GSource *, int ( *)(void *), void *) 0x7ffff36f9b33 57 g_main_context_dispatch 0x7fffee91bd1b 58 ?? 0x7fffee9706f8 59 g_main_context_iteration 0x7fffee9193c3 60 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff36f91cc 61 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff369c21a 62 QCoreApplication::exec() 0x7ffff36a51d3 63 main main.cpp 83 0x55555556755a
I can't find the root cause of this, I've tried to swith to Wayland to see if it's anything related to the graphics but it doesn't matter.
Did you have had some experience with this issues?
Thanks! -
@DavideG said in Application crashes with Qt 5.14/5.13 but runs correclty with 5.5:
QQmlEngineDebugServiceImpl
It looks like it chokes in the part that implements the QML/JS debugger and profiler infrastructure. If you don't need it, you can try launchign your app without -qmljsdebugger command line argument. If you launch your app from Qt Creator, you achieve this by disabling the 'QML debugging and profiling' in the build settings.
-
Hi and welcome to devnet,
If memory serves well, these versions of Qt are using different versions of GStreamer. Did you check that ?
-
Do you have only one version of GStreamer installed ?
-
Strange... can you check with 5.15 ?
-
What do I need to check? I've already compiled with both 5.14 and 5.15 version, same results.
Do you think it could be helpful to see the env variable set in Build/Run env ? -
@DavideG said in Application crashes with Qt 5.14/5.13 but runs correclty with 5.5:
QQmlEngineDebugServiceImpl
It looks like it chokes in the part that implements the QML/JS debugger and profiler infrastructure. If you don't need it, you can try launchign your app without -qmljsdebugger command line argument. If you launch your app from Qt Creator, you achieve this by disabling the 'QML debugging and profiling' in the build settings.
-
It worked! By disabling the QML debugger the project runs correclty! Many many thanks :) I'll put the thread as "solved" but now I'm wondering what am I missing to let QML Debugger runs correclty
Can you point me to some sort of support page to check the packages needed on my system?
Thanks again! -
@DavideG said in Application crashes with Qt 5.14/5.13 but runs correclty with 5.5:
Can you point me to some sort of support page to check the packages needed on my system?
There's no external dependencies for the QML engine. What you might have hit, however, is a bug in Qt itself. You can report it; but before this, you should a) check whether it is still reproducible with Qt 5.15 or Qt 6.2/6.3.