Bug 459584

Summary: Invoking switch users from overview effect crashes KWin in KWin::QuickSceneView::~QuickSceneView
Product: [Plasma] kwin Reporter: Natalie Clarius <natalie_clarius>
Component: effects-overviewAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: nate
Priority: NOR    
Version First Reported In: 5.25.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace

Description Natalie Clarius 2022-09-24 00:46:15 UTC
Created attachment 152379 [details]
Backtrace

SUMMARY
***
Trying to switch user accounts from the desktop sessions runner plugin in overview effect crashes KWin.
With the Alt+F2 KRunner window the problem does not occur.
***

STEPS TO REPRODUCE
1. Overview effect
2. Search for "switch users"
3. Run the desktop sessions result

OBSERVED RESULT
Nothing happens, when leaving the effect KWin has crashed

EXPECTED RESULT
Login screen

ADDITIONAL INFORMATION
Journal says:
> kwin_x11[14129]: 
> Object 0x55794ccb4ba0 destroyed while one of its QML signal handlers is in progress.
>  Most likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested event loop.
>  This behavior is NOT supported!
> file:///usr/lib/qt/qml/org/kde/milou/ResultsView.qml:113: function() { [native code] }

I attached the backtrace (I think? - never done this sort of thing before.)

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-1 (64-bit)
Graphics Platform: X11
Comment 1 Natalie Clarius 2022-09-24 00:49:05 UTC
n.b. The backtrace is from the source-built session but I can reproduce it on stable too.
Comment 2 Nate Graham 2022-09-26 18:49:54 UTC
Pasting the lrelevant part of the backtrace inline for searchability:

#29 0x00007fa6e0aac58e in std::unique_ptr<QQuickItem, std::default_delete<QQuickItem> >::~unique_ptr()
    (this=0x55794c550468, __in_chrg=<optimized out>) at /usr/include/c++/12.2.0/bits/unique_ptr.h:396
        __ptr = @0x55794c550468: 0x55794c65c570
#30 0x00007fa6e0aafc58 in KWin::QuickSceneView::~QuickSceneView()
    (this=0x55794c550440, __in_chrg=<optimized out>)
    at /home/natalie/kde/src/kwin/src/libkwineffects/kwinquickeffect.cpp:60
#31 0x00007fa6e0aafc80 in KWin::QuickSceneView::~QuickSceneView()
    (this=0x55794c550440, __in_chrg=<optimized out>)
    at /home/natalie/kde/src/kwin/src/libkwineffects/kwinquickeffect.cpp:60
#32 0x00007fa6e0ab554c in qDeleteAll<QHash<KWin::EffectScreen*, KWin::QuickSceneView*>::const_iterator>(QHash<KWin::EffectScreen*, KWin::QuickSceneView*>::const_iterator, QHash<KWin::EffectScreen*, KWin::QuickSceneView*>::const_iterator) (begin=..., end=...) at /usr/include/qt/QtCore/qalgorithms.h:320
#33 0x00007fa6e0ab4984 in qDeleteAll<QHash<KWin::EffectScreen*, KWin::QuickSceneView*> >(QHash<KWin::EffectScreen*, KWin::QuickSceneView*> const&) (c=...) at /usr/include/qt/QtCore/qalgorithms.h:328
#34 0x00007fa6e0ab218a in KWin::QuickSceneEffect::stopInternal() (this=0x55794b2b0b00)
    at /home/natalie/kde/src/kwin/src/libkwineffects/kwinquickeffect.cpp:437
#35 0x00007fa6e0ab05c7 in KWin::QuickSceneEffect::setRunning(bool)
    (this=0x55794b2b0b00, running=false)
    at /home/natalie/kde/src/kwin/src/libkwineffects/kwinquickeffect.cpp:177
#36 0x00005579497a3351 in KWin::OverviewEffect::realDeactivate() (this=0x55794b2b0b00)
    at /home/natalie/kde/src/kwin/src/effects/overview/overvieweffect.cpp:291
#37 0x00005579497a4606 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::OverviewEffect::*)()>::call(void (KWin::OverviewEffect::*)(), KWin::OverviewEffect*, void**)
    (f=(void (KWin::OverviewEffect::*)(class KWin::OverviewEffect * const)) 0x5579497a3334 <KWin::OverviewEffect::realDeactivate()>, o=0x55794b2b0b00, arg=0x7ffd5a20bf00)
    at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#38 0x00005579497a449b in QtPrivate::FunctionPointer<void (KWin::OverviewEffect::*)()>::call<QtPrivate::List<>, void>(void (KWin::OverviewEffect::*)(), KWin::OverviewEffect*, void**)
    (f=(void (KWin::OverviewEffect::*)(class KWin::OverviewEffect * const)) 0x5579497a3334 <KWin::OverviewEffect::realDeactivate()>, o=0x55794b2b0b00, arg=0x7ffd5a20bf00)
    at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#39 0x00005579497a43fb in QtPrivate::QSlotObject<void (KWin::OverviewEffect::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x55794b333b80, r=0x55794b2b0b00, a=0x7ffd5a20bf00, ret=0x0)
    at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
Comment 3 David Edmundson 2024-05-29 10:32:26 UTC
This bug is a crash report that is over a year old without any activity, as our software is always changing, the information in this ticket is unlikely to still be useful.

If this issue is still reproducible in a newer version of kwin (5.27.5 or 6.0) please reopen this ticket with a bumped version number or it will be closed in 30 days.
Comment 4 Bug Janitor Service 2024-06-13 03:47:00 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 5 Bug Janitor Service 2024-06-28 03:47:54 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!