Bug 521124 - System settings allows you to delete the activity you're currently using, leading to a black empty desktop and then to a SIGSEGV
Summary: System settings allows you to delete the activity you're currently using, lea...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.6.91
Platform: Arch Linux Linux
: HI crash
Target Milestone: 1.0
Assignee: Angel Parra
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2026-06-06 06:38 UTC by Angel Parra
Modified: 2026-06-11 16:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.0
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/403317/events/9c0c2739462a4103a9476fbcd2b2e6df/


Attachments
New crash information added by DrKonqi (182.25 KB, text/plain)
2026-06-06 06:38 UTC, Angel Parra
Details
The Delete icon is active for your current activity... and it works. (1.37 MB, image/png)
2026-06-06 06:43 UTC, Angel Parra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Angel Parra 2026-06-06 06:38:44 UTC
Application: plasmashell (6.6.91)

ApplicationNotResponding [ANR]: false
Qt Version: 6.11.1
Frameworks Version: 6.26.0
Operating System: Linux 7.0.10-zen1-1-zen x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 6.6.91 [CoredumpBackend]

-- Information about the crash:
The Activities kcm does nothing to stop you from accidentally deleting the activity you're currently using.

Steps to reproduce:

1. Create an activity
2. Switch to it
3. Go to Settings > Activities

You'll see that the trash icon for the current active activity is bright red, waiting for you to delete it.

4. Press the Trash button of the activity you just created and Apply.

Now the desktop icons will be gone and the background will turn black- or actually, transparent-.

5. Switch back to the Default activity with Ctrl + Q and click it. Then you'll have this segfault.

Spectacle actually captures the black background of the desktop as transparent rather than black. Will attach pictures next message.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  0x00007fc4bd63892b in QObject::disconnectImpl(QObject const*, void**, QObject const*, void**, QMetaObject const*) () from /usr/lib/libQt6Core.so.6
#6  0x000055868c3e9361 in QObject::disconnect<void (Plasma::Containment::*)(int), void (DesktopView::*)(int)> (sender=<optimized out>, signal=(void (Plasma::Containment::*)(Plasma::Containment * const, int)) 0x7fc4c0b6e220, receiver=0x5586a60c4f40, slot=(void (DesktopView::*)(DesktopView * const, int)) 0x55868c3e7190 <DesktopView::slotScreenChanged(int)>) at /usr/include/qt6/QtCore/qobject.h:318
#7  DesktopView::slotContainmentChanged (this=0x5586a60c4f40) at /home/notangel/Documentos/programacion/Proyectos/stray/plasma-workspace/shell/desktopview.cpp:532
[...]
#9  0x00007fc4c10d1234 in PlasmaQuick::ContainmentViewPrivate::setContainment (this=0x5586a628c180, cont=0x5586a60acd50) at /usr/src/debug/libplasma/libplasma-6.6.91/src/plasmaquick/containmentview.cpp:85
#10 0x00007fc4c10d18ed in PlasmaQuick::ContainmentView::setContainment (this=<optimized out>, cont=<optimized out>) at /usr/src/debug/libplasma/libplasma-6.6.91/src/plasmaquick/containmentview.cpp:262
#11 0x000055868c4227ec in ShellCorona::currentActivityChanged (this=0x7fffef6f95f0, newActivity=...) at /home/notangel/Documentos/programacion/Proyectos/stray/plasma-workspace/shell/shellcorona.cpp:2122
[...]
#14 KActivities::Consumer::currentActivityChanged (this=<optimized out>, _t1=...) at /usr/src/debug/plasma-activities/build/src/lib/PlasmaActivities_autogen/include/moc_consumer.cpp:178
[...]
#17 KActivities::ActivitiesCache::currentActivityChanged (this=0x5586a6004680, _t1=...) at /usr/src/debug/plasma-activities/build/src/lib/PlasmaActivities_autogen/include/moc_activitiescache_p.cpp:329
#18 KActivities::ActivitiesCache::setCurrentActivity (this=0x5586a6004680, activity=...) at /usr/src/debug/plasma-activities/plasma-activities-6.6.91/src/lib/activitiescache_p.cpp:253
[...]
#21 OrgKdeActivityManagerActivitiesInterface::CurrentActivityChanged (this=<optimized out>, _t1=...) at /usr/src/debug/plasma-activities/build/src/lib/moc_activities_interface.cpp:368
#22 OrgKdeActivityManagerActivitiesInterface::qt_static_metacall (_o=_o@entry=0x7fc4b00059a0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=9, _a=_a@entry=0x7fffef6f8c08) at /usr/src/debug/plasma-activities/build/src/lib/moc_activities_interface.cpp:218
#23 0x00007fc4bfc53762 in OrgKdeActivityManagerActivitiesInterface::qt_metacall (this=0x7fc4b00059a0, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffef6f8c08) at /usr/src/debug/plasma-activities/build/src/lib/moc_activities_interface.cpp:300
#24 0x00007fc4be76be1a in QDBusConnectionPrivate::deliverCall(QObject*, QDBusMessage const&, QList<QMetaType> const&, int) () from /usr/lib/libQt6DBus.so.6
#25 0x00007fc4bd633601 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#26 0x00007fc4bff89d4f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#27 0x00007fc4bd5c3788 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6


Reported using DrKonqi
Comment 1 Angel Parra 2026-06-06 06:38:46 UTC
Created attachment 192933 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Angel Parra 2026-06-06 06:43:23 UTC
Created attachment 192934 [details]
The Delete icon is active for your current activity... and it works.
Comment 3 David Edmundson 2026-06-07 15:23:40 UTC
Deleting an activity you're on is fine, plasma crashing is not.
Comment 4 Angel Parra 2026-06-07 23:35:45 UTC
> Deleting an activity you're on is fine

So what is the actual intended behavior?

If by "fine" you mean that it should switch back to the Default activity in place, then it does not. plasmashell gets left in a dangling state where it's still working on an activity that does not exist (and so the transparent background and the icons gone) and switching to the Default activity does not fix it and can actually make plasmashell crash.
Comment 5 Bug Janitor Service 2026-06-08 03:20:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-activities/-/merge_requests/77
Comment 6 David Edmundson 2026-06-08 05:48:06 UTC
You are right, this is not fine:

After doing the relevant steps.

❯ qdbus org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.ListActivities 
db660919-7eca-41ba-b1cc-c7dd5c98140b

❯ qdbus org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.CurrentActivity 
3e185591-d799-459e-a5e6-b66edbb62acf


I had somewhat misread the original report and thought we were just hiding a client side crash. That crash should still be fixed independently.
There's still something else terribly wrong.

```
void DesktopView::slotContainmentChanged()
{
    if (m_containment) {
        disconnect(m_containment, &Plasma::Con.... <-- crash is here with a dangling but not null m_containment.
```
We should never have anything dangling. I'll chase that.
Comment 7 Bug Janitor Service 2026-06-08 08:04:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kactivitymanagerd/-/merge_requests/116
Comment 8 Angel Parra 2026-06-08 10:13:49 UTC
Git commit 63c89b8cd14f65502a2b7e1645b6002438cb190b by Angel Parra.
Committed on 08/06/2026 at 08:01.
Pushed by davidedmundson into branch 'master'.

Activities: Jump to next activity if it's the current before removing one

If the activity to be deleted is the currently active, jump to the next accessible activity before performing the removal and avoid leaving plasmashell in a dangling state.

M  +6    -0    src/service/Activities.cpp

https://invent.kde.org/plasma/kactivitymanagerd/-/commit/63c89b8cd14f65502a2b7e1645b6002438cb190b
Comment 9 Bug Janitor Service 2026-06-08 10:17:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6695
Comment 10 Bug Janitor Service 2026-06-08 14:29:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6700
Comment 11 David Edmundson 2026-06-09 13:38:20 UTC
Git commit 6f74deb172580963b04a95ccfffeee546cc770c2 by David Edmundson.
Committed on 08/06/2026 at 10:14.
Pushed by tfella into branch 'Plasma/6.7'.

Activities: Jump to next activity if it's the current before removing one

If the activity to be deleted is the currently active, jump to the next accessible activity before performing the removal and avoid leaving plasmashell in a dangling state.


(cherry picked from commit 63c89b8cd14f65502a2b7e1645b6002438cb190b)

Co-authored-by: Angel Parra <lito.15@proton.me>

M  +6    -0    src/service/Activities.cpp

https://invent.kde.org/plasma/kactivitymanagerd/-/commit/6f74deb172580963b04a95ccfffeee546cc770c2