Bug 472401

Summary: Spectacle crashed in SelectedActionWrapper::setEditAction() when I presed PrintScreen after successfully copying to the clipboard a previous screenshot
Product: [Applications] Spectacle Reporter: Dan Dascalescu <ddascalescu+kde>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: geekxx10, kde, nate, nicolas.fella
Priority: NOR Keywords: drkonqi
Version: 23.04.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dan Dascalescu 2023-07-19 15:24:25 UTC
Application: spectacle (23.04.2)

Qt Version: 5.15.10
Frameworks Version: 5.107.0
Operating System: Linux 6.3.12-200.fc38.x86_64 x86_64
Windowing System: Wayland
Distribution: Fedora Linux 38 (KDE Plasma)
DrKonqi: 5.27.6 [KCrashBackend]

-- Information about the crash:
Took a rectangular screenshot, annotated it, copyed it to the clipboard, pasted it in a browser.

Then I presed PrintScreen again to capture a new screenshot, and Spectacle just crashed.

Maybe it's time to rewrite things in Rust?

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Spectacle (spectacle), signal: Segmentation fault

[KCrash Handler]
#4  0x0000560ae2a1762d in SelectedActionWrapper::setEditAction(EditAction*) ()
#5  0x0000560ae2a1f3ee in AnnotationDocument::clearAnnotations() ()
#6  0x0000560ae2a05bbd in QtPrivate::QFunctorSlotObject<SpectacleCore::SpectacleCore(QObject*)::{lambda(QImage const&)#1}, 1, QtPrivate::List<QImage const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .lto_priv.0] ()
#7  0x00007f48c82e8461 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5
#8  0x0000560ae2a2ee3a in QtPrivate::QFunctorSlotObject<PlatformKWinWayland2::trackSource(ScreenShotSource2*)::{lambda(QImage const&)#1}, 1, QtPrivate::List<QImage const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .lto_priv.0] ()
#9  0x00007f48c82e8461 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5
#10 0x0000560ae2a2f226 in QtPrivate::QFunctorSlotObject<ScreenShotSource2::handleMetaDataReceived(QMap<QString, QVariant> const&)::{lambda()#8}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) [clone .lto_priv.0] ()
#11 0x00007f48c82e8461 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5
#12 0x00007f48c80ffa25 in QFutureWatcherBase::event(QEvent*) () from /lib64/libQt5Core.so.5
#13 0x00007f48c9baeb75 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#14 0x00007f48c82b4188 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#15 0x00007f48c82b7635 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#16 0x00007f48c8306c3f in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#17 0x00007f48c5f1348c in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#18 0x00007f48c5f71638 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#19 0x00007f48c5f10b13 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#20 0x00007f48c8306729 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#21 0x00007f48c82b2b4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#22 0x00007f48c82baddb in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#23 0x0000560ae29df952 in main ()
[Inferior 1 (process 71139) detached]

The reporter indicates this bug may be a duplicate of or related to bug 426320, bug 430007, bug 439450, bug 439525, bug 462645, bug 464465, bug 465049, bug 465370, bug 467595, bug 467966, bug 468694, bug 468989, bug 469336, bug 469897, bug 469919, bug 469952, bug 470009, bug 470027, bug 470217, bug 471129, bug 471346, bug 471830, bug 472313.

Reported using DrKonqi
Comment 1 Nate Graham 2023-09-11 19:40:50 UTC
Can you try again with Spectacle 23.08 which was just released?

> Maybe it's time to rewrite things in Rust?
Spectacle's front-end was just rewritten in QML and it took over a year. Rewriting the backend in Rust would take equally as long, and also lose us the ability to re-use the same QML UI, so that would have to be re-done from scratch too. In addition the app would no longer have access to any of the nice Qt and KDE libraries that it currently uses, so all of that stuff would have to be ported to other 3rd-party Rust libraries. I'd estimate that the project would take at least 3 engineer-years of effort, and that's if the engineers involved were already experienced at porting KDE code to rust. And that's for one app. Hopefully this should illustrate how "rewrite it in rust" is in general not a practical option for existing codebases.
Comment 2 Nate Graham 2023-09-20 19:16:35 UTC
*** Bug 474719 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2023-10-05 03:46:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2023-10-20 03:45:23 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 5 Nicolas Fella 2023-12-22 23:13:28 UTC

*** This bug has been marked as a duplicate of bug 469919 ***