Bug 508849

Summary: Spectacle crashed in ViewerWindow::~ViewerWindow
Product: [Applications] Spectacle Reporter: postix <postix>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED FIXED    
Severity: crash CC: kde, kde, nate
Priority: HI    
Version First Reported In: 6.4.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=414772
Latest Commit: Version Fixed In: 6.5.0
Sentry Crash Report:

Description postix 2025-08-28 12:53:05 UTC
SUMMARY

Spectacle crashed once, when I tried to screenshot issue https://bugs.kde.org/show_bug.cgi?id=414772#c3


```
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f33f869de53 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007f33f86427b6 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f33fce2e390 in KCrash::defaultCrashHandler (sig=6) at /usr/src/debug/kcrash-6.17.0/src/kcrash.cpp:605
#4  0x00007f33f8642910 in <signal handler called> () at /lib64/libc.so.6
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007f33f869de53 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#7  0x00007f33f86427b6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007f33f862934b in __GI_abort () at abort.c:73
#9  0x00007f33f8ef41dc in qAbort () at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qassert.cpp:46
#10 qt_message_fatal<QString&> (context=<optimized out>, message=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qlogging.cpp:2149
#11 qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *)
    (msgType=msgType@entry=QtFatalMsg, context=..., msg=msg@entry=0x7f33f9ae8ba0 "Object %p destroyed while one of its QML signal handlers is in progress.\nMost likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested e"..., ap=ap@entry=0x7fffe0b0cee8) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qlogging.cpp:381
#12 0x00007f33f8ef50bb in QMessageLogger::fatal
    (this=this@entry=0x7fffe0b0d1b0, msg=msg@entry=0x7f33f9ae8ba0 "Object %p destroyed while one of its QML signal handlers is in progress.\nMost likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested e"...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qlogging.cpp:883
#13 0x00007f33f9711291 in QQmlData::destroyed (this=<optimized out>, object=0x55ca9e767860) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlengine.cpp:1399
#14 0x00007f33f901bba7 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1046
#15 0x00007f33f31c280f in QQmlPrivate::QQmlElement<QQuickAction>::~QQmlElement (this=0x55ca9e767860, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#16 QQmlPrivate::QQmlElement<QQuickAction>::~QQmlElement (this=0x55ca9e767860, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#17 0x00007f33f9013fea in QObjectPrivate::deleteChildren (this=this@entry=0x55ca9e645120) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:2223
#18 0x00007f33f901c188 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1140
#19 0x00007f33f31bfe61 in QQuickButton::~QQuickButton (this=0x55ca9e73a030, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquickbutton_p.h:24
#20 QQuickToolButton::~QQuickToolButton (this=0x55ca9e73a030, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquicktoolbutton_p.h:24
#21 QQmlPrivate::QQmlElement<QQuickToolButton>::~QQmlElement (this=0x55ca9e73a030, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#22 QQmlPrivate::QQmlElement<QQuickToolButton>::~QQmlElement (this=0x55ca9e73a030, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#23 0x00007f33f9013fea in QObjectPrivate::deleteChildren (this=this@entry=0x55ca9e7d8670) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:2223
#24 0x00007f33f901c188 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1140
#25 0x00007f33fb0b1f31 in QQuickGrid::~QQuickGrid (this=0x55ca9e18de80, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickpositioners_p.h:251
#26 QQmlPrivate::QQmlElement<QQuickGrid>::~QQmlElement (this=0x55ca9e18de80, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#27 QQmlPrivate::QQmlElement<QQuickGrid>::~QQmlElement (this=0x55ca9e18de80, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#28 0x00007f33f9013fea in QObjectPrivate::deleteChildren (this=this@entry=0x55ca9e4f3c30) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:2223
#29 0x00007f33f901c188 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1140
#30 0x00007f33f31c1011 in QQuickToolBar::~QQuickToolBar (this=0x7f33e000bdf0, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquicktoolbar_p.h:24
#31 QQmlPrivate::QQmlElement<QQuickToolBar>::~QQmlElement (this=0x7f33e000bdf0, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#32 QQmlPrivate::QQmlElement<QQuickToolBar>::~QQmlElement (this=0x7f33e000bdf0, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#33 0x00007f33f9013fea in QObjectPrivate::deleteChildren (this=this@entry=0x55ca9e90c4a0) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:2223
#34 0x00007f33f901c188 in QObject::~QObject (this=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1140
#35 0x00007f33f31c1d19 in QQmlPrivate::QQmlElement<QQuickPage>::~QQmlElement (this=0x7f33e000c530, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#36 QQmlPrivate::QQmlElement<QQuickPage>::~QQmlElement (this=0x7f33e000c530, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlprivate.h:104
#37 0x00007f33faf05a99 in QQuickView::~QQuickView (this=0x55ca9e403be0, this=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickview.cpp:212
#38 0x000055ca7faf5406 in ViewerWindow::~ViewerWindow (this=0x55ca9e403be0, this=<optimized out>) at /usr/src/debug/spectacle-6.4.4/src/Gui/ViewerWindow.cpp:74
#39 ViewerWindow::~ViewerWindow (this=0x55ca9e403be0, this=<optimized out>) at /usr/src/debug/spectacle-6.4.4/src/Gui/ViewerWindow.cpp:74
#40 0x00007f33f901cd3c in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1416
#41 0x00007f33fb5e37a8 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55ca9e403be0, e=0x55ca9e86b930) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#42 0x00007f33f8fc8928 in QCoreApplication::notifyInternal2 (receiver=0x55ca9e403be0, event=0x55ca9e86b930) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#43 0x00007f33f8fc896d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1546
#44 0x00007f33f8fcacc7 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55ca9e031970) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1879
#45 0x00007f33f92818a7 in postEventSourceDispatch (s=s@entry=0x55ca9e0403f0) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#46 0x00007f33f53090b6 in g_main_dispatch (context=0x7f33e4000f70) at ../glib/gmain.c:3398
#47 g_main_context_dispatch_unlocked (context=context@entry=0x7f33e4000f70) at ../glib/gmain.c:4249
#48 0x00007f33f530aee8 in g_main_context_iterate_unlocked (context=context@entry=0x7f33e4000f70, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314
#49 0x00007f33f530b72c in g_main_context_iteration (context=0x7f33e4000f70, may_block=1) at ../glib/gmain.c:4379
#50 0x00007f33f927f978 in QEventDispatcherGlib::processEvents (this=0x55ca9dfb4bb0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#51 0x00007f33f8fd6003 in QEventLoop::exec (this=this@entry=0x7fffe0b0dae0, flags=..., flags@entry=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77
#52 0x00007f33fb86e216 in QDialog::exec (this=0x55ca9e7fc550) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/dialogs/qdialog.cpp:575
#53 0x00007f33fb86e122 in QDialog::exec (this=this@entry=0x7fffe0b0dd70) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/dialogs/qdialog.cpp:571
#54 0x000055ca7fab67c9 in ExportManager::exportImage (this=0x55ca7fcda2e0 <ExportManager::instance()::instance>, actions=..., url=...) at /usr/src/debug/spectacle-6.4.4/src/ExportManager.cpp:649
#55 0x000055ca7faeda0c in SpectacleWindow::saveAs (this=<optimized out>) at /usr/src/debug/spectacle-6.4.4/src/Gui/SpectacleWindow.cpp:246
#56 0x000055ca7faf3c37 in SpectacleWindow::qt_metacall (this=0x55ca9e403be0, _c=<optimized out>, _id=4, _a=0x7fffe0b0e250) at /usr/src/debug/spectacle-6.4.4/build/src/spectacle_autogen/include/moc_SpectacleWindow.cpp:211
#57 0x000055ca7faf7d05 in ViewerWindow::qt_metacall (this=0x55ca9e403be0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffe0b0e250) at /usr/src/debug/spectacle-6.4.4/build/src/spectacle_autogen/include/moc_ViewerWindow.cpp:102
#58 0x00007f33f9961783 in QQmlObjectOrGadget::metacall (this=0x7fffe0b0e4e0, type=QMetaObject::InvokeMetaMethod, index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlobjectorgadget.cpp:14
#59 0x00007f33f983df52 in QV4::CallMethod (object=..., index=89, returnType=..., argCount=0, argTypes=0x0, engine=0x55ca9e0a0290, callArgs=<optimized out>, callType=QMetaObject::InvokeMetaMethod)
    at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4qobjectwrapper.cpp:1722
#60 QV4::QObjectMethod::callPrecise (object=..., data=<optimized out>, engine=<optimized out>, callArgs=<optimized out>, callType=QMetaObject::InvokeMetaMethod) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4qobjectwrapper.cpp:2082
#61 0x00007f33f9847a51 in operator() (__closure=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4qobjectwrapper.cpp:3078
#62 operator()<QV4::QObjectMethod::callInternal(const QV4::Value*, const QV4::Value*, int) const::<lambda()> > (__closure=<synthetic pointer>, call=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4qobjectwrapper.cpp:3055
#63 QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=<optimized out>, argv=0x7f33cc2eb510, argc=0) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4qobjectwrapper.cpp:3078
#64 0x00007f33f989b452 in QV4::Moth::VME::interpret (frame=0x8cc8, frame@entry=0x7fffe0b0e930, engine=0x55ca9e0a0290, code=0x7f33cc2eb548 "\340\353\341\3033\177") at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4vme_moth.cpp:798
#65 0x00007f33f989e600 in QV4::Moth::VME::exec (frame=<optimized out>, engine=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4vme_moth.cpp:487
#66 0x00007f33f97f2e90 in QV4::doCall (self=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=argc@entry=1, context=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4function.cpp:52
#67 0x00007f33f97f8849 in QV4::Function::call (this=this@entry=0x55ca9e632bc0, thisObject=<optimized out>, argv=argv@entry=0x7f33cc2eb500, argc=argc@entry=1, context=context@entry=0x7f33c30d78c8)
    at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4function.cpp:77
#68 0x00007f33f97f8b49 in operator() (__closure=<synthetic pointer>, thisObject=<optimized out>, argv=0x7f33cc2eb500, argc=1) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4function.cpp:28
#69 QV4::convertAndCall<QV4::Function::call(QObject*, void**, const QMetaType*, int, QV4::ExecutionContext*)::<lambda(const QV4::Value*, const QV4::Value*, int)> >
    (engine=<optimized out>, thisObject=0x55ca9e767860, a=0x7fffe0b10710, types=0x7fffe0b0ec28, argc=1, call=...) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4jscall_p.h:199
#70 QV4::Function::call (this=0x55ca9e632bc0, thisObject=0x55ca9e767860, a=0x7fffe0b10710, types=0x7fffe0b0ec28, argc=1, context=0x7f33c30d78c8) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/jsruntime/qv4function.cpp:25
#71 0x00007f33f992da58 in QQmlJavaScriptExpression::evaluate (this=<optimized out>, a=<optimized out>, types=<optimized out>, argc=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmljavascriptexpression.cpp:270
#72 0x00007f33f98cd19d in QQmlBoundSignalExpression::evaluate (this=<optimized out>, a=a@entry=0x7fffe0b10710) at /usr/include/qt6/QtCore/qvarlengtharray.h:90
#73 0x00007f33f98d35e3 in QQmlBoundSignal_callback (e=0x55ca9e765720, a=0x7fffe0b10710) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/ftw/qqmlrefcount_p.h:73
#74 QQmlBoundSignal_callback (e=0x55ca9e765720, a=0x7fffe0b10710) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlboundsignal.cpp:294
#75 0x00007f33f994d057 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x7fffe0b10710) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/qml/qml/qqmlnotifier.cpp:70
#76 0x00007f33f902f7b0 in doActivate<false> (sender=0x55ca9e767860, signal_index=11, argv=0x7fffe0b10710) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:4036
#77 0x00007f33f3105f46 in QMetaObject::activate<void, QObject*> (sender=0x55ca9e767860, mo=0x7f33f32987e0 <QQuickAction::staticMetaObject>, local_signal_index=8, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs.h:306
#78 QQuickAction::triggered (this=this@entry=0x55ca9e767860, _t1=<optimized out>, _t1@entry=0x55ca9e73a030) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/build/src/quicktemplates/QuickTemplates2_autogen/include/moc_qquickaction_p.cpp:307
#79 0x00007f33f310c7c8 in QQuickActionPrivate::trigger (this=0x55ca9e5ac3b0, source=0x55ca9e73a030, doToggle=false) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquickaction.cpp:531
#80 0x00007f33f310cab3 in QQuickAbstractButtonPrivate::trigger (this=0x55ca9e645120, doubleClick=false) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquickabstractbutton.cpp:378
#81 0x00007f33f310e1fa in QQuickAbstractButtonPrivate::handleRelease (this=this@entry=0x55ca9e645120, point=..., timestamp=timestamp@entry=5146037) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquickabstractbutton.cpp:190
#82 0x00007f33f312a78b in QQuickControl::mouseReleaseEvent (this=<optimized out>, event=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quicktemplates/qquickcontrol.cpp:2067
#83 0x00007f33fae5bef4 in QQuickItemPrivate::deliverPointerEvent (this=this@entry=0x55ca9e645120, event=event@entry=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickitem.cpp:5666
#84 0x00007f33fae6035b in QQuickItem::event (this=0x55ca9e73a030, ev=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickitem.cpp:9146
#85 0x00007f33fb5e37a8 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55ca9e73a030, e=0x7fffe0b11340) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#86 0x00007f33f8fc8928 in QCoreApplication::notifyInternal2 (receiver=0x55ca9e73a030, event=0x7fffe0b11340) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#87 0x00007f33f8fc896d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1546
#88 0x00007f33fb01055d in QQuickDeliveryAgentPrivate::deliverMatchingPointsToItem (this=this@entry=0x55ca9e4fbd60, item=item@entry=0x55ca9e73a030, isGrabber=isGrabber@entry=true, pointerEvent=pointerEvent@entry=0x7fffe0b11340, handlersOnly=handlersOnly@entry=false)
    at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/util/qquickdeliveryagent.cpp:2444
#89 0x00007f33fb010ba0 in QQuickDeliveryAgentPrivate::deliverUpdatedPoints (this=this@entry=0x55ca9e4fbd60, event=event@entry=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/util/qquickdeliveryagent.cpp:2222
#90 0x00007f33fb01366b in QQuickDeliveryAgentPrivate::deliverPointerEvent (this=this@entry=0x55ca9e4fbd60, event=event@entry=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/util/qquickdeliveryagent.cpp:2035
#91 0x00007f33fb013d84 in QQuickDeliveryAgentPrivate::handleMouseEvent (this=0x55ca9e4fbd60, event=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/util/qquickdeliveryagent.cpp:1788
#92 0x00007f33fb009393 in QQuickDeliveryAgent::event (this=<optimized out>, ev=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/util/qquickdeliveryagent.cpp:822
#93 0x00007f33faf11831 in QQuickWindow::event (this=<optimized out>, event=0x7fffe0b11340) at /usr/src/debug/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickwindow.cpp:1548
#94 0x00007f33fb5e37a8 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55ca9e403be0, e=0x7fffe0b11340) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#95 0x00007f33f8fc8928 in QCoreApplication::notifyInternal2 (receiver=0x55ca9e403be0, event=0x7fffe0b11340) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#96 0x00007f33f8fc897d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1560
#97 0x00007f33fa42d918 in QGuiApplicationPrivate::processMouseEvent (e=0x7f33dc007030) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qguiapplication.cpp:2476
#98 0x00007f33fa49cecb in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qwindowsysteminterface.cpp:1113
#99 0x00007f33fa49d067 in QWindowSystemInterface::flushWindowSystemEvents (flags=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qwindowsysteminterface.cpp:1082
#100 0x00007f33f901ce34 in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1431
#101 0x00007f33fb5e37a8 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55ca9e044990, e=0x7f33dc0042c0) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303
#102 0x00007f33f8fc8928 in QCoreApplication::notifyInternal2 (receiver=0x55ca9e044990, event=0x7f33dc0042c0) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106
#103 0x00007f33f8fc896d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1546
#104 0x00007f33f8fcacc7 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55ca9e031970) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1879
#105 0x00007f33f92818a7 in postEventSourceDispatch (s=s@entry=0x55ca9e0403f0) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#106 0x00007f33f53090b6 in g_main_dispatch (context=0x7f33e4000f70) at ../glib/gmain.c:3398
#107 g_main_context_dispatch_unlocked (context=context@entry=0x7f33e4000f70) at ../glib/gmain.c:4249
#108 0x00007f33f530aee8 in g_main_context_iterate_unlocked (context=context@entry=0x7f33e4000f70, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4314
#109 0x00007f33f530b72c in g_main_context_iteration (context=0x7f33e4000f70, may_block=1) at ../glib/gmain.c:4379
#110 0x00007f33f927f978 in QEventDispatcherGlib::processEvents (this=0x55ca9dfb4bb0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#111 0x00007f33f8fd6003 in QEventLoop::exec (this=0x7fffe0b11930, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77
#112 0x00007f33f8fcd143 in QCoreApplication::exec () at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1449
#113 0x00007f33fa421110 in QGuiApplication::exec () at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/gui/kernel/qguiapplication.cpp:1986
#114 0x00007f33fb5dfad9 in QApplication::exec () at /usr/src/debug/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:2570
#115 0x000055ca7fa7ff2c in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/spectacle-6.4.4/src/Main.cpp:140
``` 


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250826
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.3-1-default (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 580 Series
Comment 1 David Edmundson 2025-08-29 08:57:21 UTC
Do you happen to recall what you clicked on?
Comment 2 postix 2025-08-29 09:11:01 UTC
(In reply to David Edmundson from comment #1)
> Do you happen to recall what you clicked on?

I can only roughly sketch the workflow:

1) Took Rectangular screenshot
2) Likely edited it, I am not sure if I left the edit mode
3) Hit the Save At ... button and saved the screenshot
4) Not sure if I had deliberately closed Spectacle by clicking on the X in its titlebar

If I find some time, I can try to reproduce it and pay more attention to the steps.
Comment 3 Noah Davis 2025-08-29 16:31:29 UTC
Unfortunately, I can't reproduce this with the provided steps. I see there's also some output related to QML, so I wonder if it has to do with some kind of interaction between C++ and QML.
Comment 4 postix 2025-08-29 16:45:24 UTC
> Unfortunately, I can't reproduce this with the provided steps. 

Me neither. Looks like it's either extremely racy or some cosmic ray produced an unfortunate bit flip. Shall we close? I'm not sure, why David has marked it as "confirmed" first though.
Comment 5 David Edmundson 2025-08-29 23:03:37 UTC
Reported should be for things that aren't triaged.
The trace has everything we need.

>Object %p destroyed while one of its QML signal handlers is in progress or the application is running a nested event loop"

src/Gui/SaveAsAction.qml
10:    onTriggered: contextWindow.saveAs()

invokes something from QML

That calls:
    ExportManager::instance()->exportImage(ExportManager::Save | ExportManager::UserAction,
                                           SpectacleCore::instance()->outputUrl());

exportImage goes into multiple paths with KJob::exec
They're just calling listDir and mkPath, so you'd need to be ninja fast to trigger that on a local filesystem.

If you manage to close the window whilst in that KJob::exec you unwind the stack and end up deleting the Button containing the QQuickToolButton which contains the saveAs action (which is what we see in the trace at frame 20 and 16) 
 
A fast fix we do elsewhere would be running exportImage from a posted event (QTimer::singleShot(this, 0, ...) so that nested event loops aren't from QML space.
Comment 6 Bug Janitor Service 2025-10-09 23:31:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/spectacle/-/merge_requests/480
Comment 7 Noah Davis 2025-10-09 23:33:38 UTC
This had me confused for a while. I don't think the problem is with KIO, it's with the save dialog. Qt docs show the save dialog being used in a plain object variable with exec(), but this seems to be problematic because the crash occurs right where the dialog's exec() call is. I came up with a solution that uses open() and connections to finished(), but I have no way to verify that the issue is fixed.
Comment 8 Noah Davis 2025-10-13 14:14:27 UTC
Git commit 18e5f3a8ccf091a4037d1b9de93ac3fe36d1a819 by Noah Davis.
Committed on 13/10/2025 at 14:05.
Pushed by ndavis into branch 'master'.

Use QDialog::open and QDialog::finished instead of QDialog::exec to open QFileDialog

M  +54   -33   src/ExportManager.cpp

https://invent.kde.org/plasma/spectacle/-/commit/18e5f3a8ccf091a4037d1b9de93ac3fe36d1a819
Comment 9 Noah Davis 2025-10-13 15:49:41 UTC
Git commit 2ef3d91f38e31021587dd27f188a8a1d3c74e7ce by Noah Davis.
Committed on 13/10/2025 at 15:49.
Pushed by ndavis into branch 'Plasma/6.5'.

Use QDialog::open and QDialog::finished instead of QDialog::exec to open QFileDialog


(cherry picked from commit 18e5f3a8ccf091a4037d1b9de93ac3fe36d1a819)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +54   -33   src/ExportManager.cpp

https://invent.kde.org/plasma/spectacle/-/commit/2ef3d91f38e31021587dd27f188a8a1d3c74e7ce