SUMMARY Hello, I've recently updated the com.github.Rosalie241.RMG flatpak's version to the latest released version, however it fails to launch and crashes deep within Qt: https://github.com/flathub/com.github.Rosalie241.RMG/pull/98 ``` (gdb) bt #0 0x00007ffff6011baf in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::get (this=<optimized out>) at /run/build-runtime/qt6-qtbase/src/corelib/tools/qscopedpointer.h:112 #1 qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > (ptr=...) at /run/build-runtime/qt6-qtbase/src/corelib/global/qtclasshelpermacros.h:137 #2 QObject::d_func (this=<optimized out>) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject.h:110 #3 QObjectPrivate::get (o=<optimized out>) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject_p.h:151 #4 doActivate<false> (sender=0x0, signal_index=9, argv=0x7fffffffc170) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject.cpp:4037 #5 0x00007ffff60085b7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff73dd760, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffc170) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobject.cpp:4217 #6 0x00007ffff6bf1584 in QMetaObject::activate<void, QScreen*> (sender=<optimized out>, mo=0x7ffff73dd760, local_signal_index=1, ret=0x0) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qobjectdefs.h:306 #7 QGuiApplication::screenAdded (this=<optimized out>, _t1=<optimized out>, _t1@entry=0x55555574cc20) at /run/build-runtime/qt6-qtbase/src/gui/Gui_autogen/include/moc_qguiapplication.cpp:300 #8 0x00007ffff6c753bd in QWindowSystemInterface::handleScreenAdded (platformScreen=platformScreen@entry=0x55555570e310, isPrimary=<optimized out>) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qwindowsysteminterface.cpp:730 #9 0x00007ffff45e3fc1 in QXcbConnection::initializeScreens (this=this@entry=0x55555571ffd0, initialized=initialized@entry=false) at /run/build-runtime/qt6-qtbase/src/plugins/platforms/xcb/qxcbconnection_screens.cpp:313 #10 0x00007ffff45d9401 in QXcbConnection::QXcbConnection (this=0x55555571ffd0, nativeInterface=<optimized out>, canGrabServer=false, defaultVisualId=<optimized out>, displayName=<optimized out>) at /run/build-runtime/qt6-qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:71 #11 0x00007ffff4601c60 in QXcbIntegration::QXcbIntegration (this=this@entry=0x555555718e20, parameters=..., argc=@0x7fffffffccac: 1, argv=argv@entry=0x7fffffffd608) at /run/build-runtime/qt6-qtbase/src/corelib/tools/qscopedpointer.h:105 #12 0x00007ffff7faa519 in QXcbIntegrationPlugin::create (this=<optimized out>, system=..., parameters=..., argc=@0x7fffffffccac: 1, argv=0x7fffffffd608) at /run/build-runtime/qt6-qtbase/src/plugins/platforms/xcb/qxcbmain.cpp:22 #13 0x00007ffff6bf7b11 in init_platform (pluginNamesWithArguments=..., platformPluginPath=..., platformThemeName=..., argc=@0x7fffffffccac: 1, argv=argv@entry=0x7fffffffd608) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qguiapplication.cpp:1309 #14 0x00007ffff6bfb368 in QGuiApplicationPrivate::createPlatformIntegration (this=0x555555707f50) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qguiapplication.cpp:1591 #15 0x00007ffff6bfbf00 in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qguiapplication.cpp:1610 --Type <RET> for more, q to quit, c to continue without paging-- #16 0x00007ffff5faf875 in QCoreApplicationPrivate::init (this=this@entry=0x555555707f50) at /run/build-runtime/qt6-qtbase/src/corelib/kernel/qcoreapplication.cpp:866 #17 0x00007ffff6bff29d in QGuiApplicationPrivate::init (this=0x555555707f50) at /run/build-runtime/qt6-qtbase/src/gui/kernel/qguiapplication.cpp:1638 #18 0x00007ffff77a7925 in QApplicationPrivate::init (this=0x555555707f50) at /run/build-runtime/qt6-qtbase/src/widgets/kernel/qapplication.cpp:476 #19 0x00007ffff77a7a0d in QApplication::QApplication (this=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /run/build-runtime/qt6-qtbase/src/widgets/kernel/qapplication.cpp:464 #20 0x000055555559f04d in main (argc=<optimized out>, argv=0x7fffffffd608) at /run/build/RMG/Source/RMG/main.cpp:182 ``` I've tried reverting the version change but that crashes in the same way: https://github.com/flathub/com.github.Rosalie241.RMG/pull/99 I've also tried downgrading the runtime version to 6.8 but that *also* has the same issue: https://github.com/flathub/com.github.Rosalie241.RMG/pull/100 STEPS TO REPRODUCE 1. Try to compile a Qt app 2. it fails to launch
interestingly changing to -DCMAKE_BUILD_TYPE=Debug in your app seems to make it work, which potentially means the problem is in your app and not the runtime?
(In reply to Albert Astals Cid from comment #1) > interestingly changing to -DCMAKE_BUILD_TYPE=Debug in your app seems to make > it work, which potentially means the problem is in your app and not the > runtime? Thank you for looking into it, that pointed me in the right direction, disabling LTO fixes the crash. I apologize for the noise and greatly appreciate your help, I had no idea LTO could cause such a strange crash seemingly in the Qt libraries but TIL!