Bug 514795 - plasmashell can crash or fail to restore desktop non-deterministically due to serialized layout state in plasma-org.kde.plasma.desktop-appletsrc
Summary: plasmashell can crash or fail to restore desktop non-deterministically due to...
Status: NEEDSINFO BACKTRACE
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.5.5
Platform: CachyOS Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-18 14:28 UTC by KlutzyKookaburra
Modified: 2026-01-26 16:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Replace plasma-org.kde.plasma.desktop-appletsrc with this things start failing on both reboots and logins (10.58 KB, text/plain)
2026-01-18 14:28 UTC, KlutzyKookaburra
Details
plasmashell SIGSEGV with attached layout config and backtrace (64.70 KB, text/plain)
2026-01-21 20:08 UTC, KlutzyKookaburra
Details
Full backtrace captured with debug symbols enabled while reproducing the crash. (71.65 KB, text/plain)
2026-01-26 16:08 UTC, KlutzyKookaburra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description KlutzyKookaburra 2026-01-18 14:28:27 UTC
Created attachment 188646 [details]
Replace plasma-org.kde.plasma.desktop-appletsrc with this things start failing on both reboots and logins

STEPS TO REPRODUCE

Replace ~/.config/plasma-org.kde.plasma.desktop-appletsrc with the attached file (buggy_config).

Log out and log back in, or reboot.

Repeat logout/login if the issue does not trigger immediately.

OBSERVED RESULT

At login or after logout/login, the desktop may fail to restore correctly (black background, missing panels), or plasmashell may crash or enter a restart loop.

The same configuration may sometimes work and sometimes fail without any changes.

Logout/login triggers the issue more reliably than a full reboot.

Restarting plasmashell manually may sometimes succeed and sometimes fail.

EXPECTED RESULT

plasmashell should never crash or fail to restore the desktop due to malformed, stale, or edge-case user layout state. Invalid or inconsistent layout data should be handled defensively.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: CachyOS (Arch-based Linux)
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.5.5
Qt Version: 6.10.1
Session type: Wayland

ADDITIONAL INFORMATION

Deleting or renaming ~/.config/plasma-org.kde.plasma.desktop-appletsrc always restores a working desktop immediately.

Rebuilding the layout manually, even recreating the same widgets and settings, results in a stable system.

The issue is not tied to a specific widget. The same widgets work correctly after layout regeneration.

The problem appears related to layout/state restoration, such as containments, screen bindings, applet ordering, or restore sequencing, not widget logic, drivers, or hardware.

The failure is non-deterministic and race-condition-like. The same config may succeed or fail depending on startup timing.

Kernel, Mesa, Qt, and Plasma package changes do not affect the behavior as long as the same appletsrc file is used.

Snapshots and system rollbacks do not resolve the issue unless the appletsrc file itself is removed or regenerated.

Attached is a plasma-org.kde.plasma.desktop-appletsrc file (buggy_config) that reproduces the issue non-deterministically.
Comment 1 KlutzyKookaburra 2026-01-18 14:30:15 UTC
This appears to be a robustness issue in plasmashell layout restoration. 
The failure is timing-dependent and tied to serialized state (containments, screen bindings, applet ordering). 
Rebuilding the layout regenerates safe IDs and avoids the crash, suggesting missing validation or ordering guarantees during restore. 
plasmashell should not crash even if layout state is stale or inconsistent.
Comment 2 David Redondo 2026-01-19 10:51:34 UTC
Of course plasmashell should not be in a situation where it generates buggy layout data and not crash when encountering corrupted data. 
It's very helpful that you attached such a config that makes plasmashell crash.  But stating the above is like writing in a crash report "plasmashell should not crash".
Unfortunately I cannot make my plasmashell crash with your attached file. Please attach a backtrace to the bug report so we can figure out what goes wrong in that case. Please see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?
Thanks!
Comment 3 KlutzyKookaburra 2026-01-21 20:08:34 UTC
Created attachment 188765 [details]
plasmashell SIGSEGV with attached layout config and backtrace

plasmashell crashes reproducibly (SIGSEGV) when using the attached layout config (buggy_config).
Also crashes when running:

plasmashell --replace

Crash location (main thread)

Top frames:

QCoreApplicationPrivate::lockThreadPostEventList
QCoreApplication::postEvent
QQuickWindowPrivate::renderSceneGraph


Crash occurs during Qt Quick scene graph rendering / event dispatch.

Additional technical context

Multiple threads are active in:

libgallium (Mesa)

libvulkan_radeon.so

libQt6WebEngineCore.so

This suggests the crash happens in interaction between Plasma layout handling, Qt Quick rendering, and the graphics/WebEngine stack.

Backtrace

Full backtrace attached (plasmashell_bt.txt), captured via coredumpctl with debuginfod enabled.
Comment 4 David Redondo 2026-01-22 08:18:58 UTC
The backtrace  doesnt suggest anything related to layout code and does not have very many symbols. Can you install qt debug symbols and generate a backtrace again? Thank you!
Comment 5 KlutzyKookaburra 2026-01-26 16:08:27 UTC
Created attachment 188918 [details]
Full backtrace captured with debug symbols enabled while reproducing the crash.

I reproduced the crash with the attached layout config and captured a full backtrace with debug symbols enabled.

Crash happens in QSGRenderThread during startup of plasmashell with this layout.

Top frames:

QCoreApplicationPrivate::lockThreadPostEventList(QObject*)
QCoreApplication::postEvent(QObject*, QEvent*, int)
QQuickWindowPrivate::renderSceneGraph()