Bug 521247 - Icons-Only Task Manager widget stops working if a "metadata.desktop" file exists in the home directory
Summary: Icons-Only Task Manager widget stops working if a "metadata.desktop" file exi...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (other bugs)
Version First Reported In: 6.6.4
Platform: Other Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-09 10:41 UTC by Boris Carvajal
Modified: 2026-06-11 15:48 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Carvajal 2026-06-09 10:41:36 UTC
DESCRIPTION
Icons-Only Task Manager widget stops working if a "metadata.desktop" file exists in the home directory.
File content doesn't matter.

STEPS TO REPRODUCE
1.  add "Icons-Only Task Manager" widget to main panel if it's not already there
2.  touch ~/metadata.desktop && plasmashell --replace

OBSERVED RESULT
On KDE Neon, plasmashell enters in a crash loop because this assert:
ASSERT: "path == QStringLiteral("/") || QDir(path).canonicalPath() + QLatin1Char('/') == path" in file /workspace/build/src/kpackage/package.cpp, line 274

On my Gentoo system (and also CachyOS live image on QEMU):

Icons-Only Task Manager shows an error applet, plasma output:
error when loading applet "org.kde.plasma.icontasks" QList("Error loading Applet: package org.kde.plasma.icontasks does not exist.", "Could not find requested component: org.kde.plasma.icontasks")

SOFTWARE/OS VERSIONS
Gentoo x86_64, plasma 6.6.5, Qt 6.10.3, wayland
QEMU:
cachyos-desktop-linux-260426.iso (plasma 6.6.4)
neon-unstable-20260607-1151.iso
Comment 1 cwo 2026-06-09 11:20:45 UTC
Can reproduce.
Comment 2 cwo 2026-06-09 11:28:11 UTC
The problem is that icontasks has invalid metadata - as a kpackage plasmoid, it should have a main.qml. We load this from a kplugin now though, which no longer has a main.qml file in the package (nor its rootpath).

With this metadata file being invalid, it tries the one it finds in ~/ first (which is even worse match in this case, as it's just an empty file). If that's not there, it grumbles a bit but continues with the original metadata file. If it's there, it takes that, and fails completely. Looking in ~/ at all for a metadata file seems to be very questionable, but taking that over the much better one is worse.
Comment 3 Bug Janitor Service 2026-06-09 11:43:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1518
Comment 4 cwo 2026-06-09 12:45:12 UTC
Git commit 9f1a50e18ef6c0c0f5113e1583d9b1097485dcbf by Christoph Wolk.
Committed on 09/06/2026 at 11:40.
Pushed by tfella into branch 'master'.

plasma/packagestructure: don't require mainscript

Plasma KPackages require a main.qml mainscript file. Kpackages with a
rootpath to a KPlugin plasmoid don't have such a file, so their metadata
is invalid. If there's no other candidate, all this does is create a
misleading runtime error, but everything works normally. If there's
another candidate, it will prefer that over the KPackage's metadata file
even if it fails worse. This can leave widgets completely broken.

Instead, don't require a mainscript for KPackages. It's not actually
required because in some circumstances it works perfectly fine without.
And in the cases where it is required (KPackage with no rootPath to a
KPlugin plasmoid), nothing terribly bad seems to happen if it's not
there - the widget obviously won't work, but we get an error message and
everything else is fine.

M  +0    -1    src/plasma/packagestructure/packages.cpp

https://invent.kde.org/plasma/libplasma/-/commit/9f1a50e18ef6c0c0f5113e1583d9b1097485dcbf
Comment 5 Tobias Fella 2026-06-09 12:55:38 UTC
Git commit 2092376b96815f41ee76181f3a17d57c8048e32e by Tobias Fella, on behalf of Christoph Wolk.
Committed on 09/06/2026 at 12:46.
Pushed by tfella into branch 'Plasma/6.7'.

plasma/packagestructure: don't require mainscript

Plasma KPackages require a main.qml mainscript file. Kpackages with a
rootpath to a KPlugin plasmoid don't have such a file, so their metadata
is invalid. If there's no other candidate, all this does is create a
misleading runtime error, but everything works normally. If there's
another candidate, it will prefer that over the KPackage's metadata file
even if it fails worse. This can leave widgets completely broken.

Instead, don't require a mainscript for KPackages. It's not actually
required because in some circumstances it works perfectly fine without.
And in the cases where it is required (KPackage with no rootPath to a
KPlugin plasmoid), nothing terribly bad seems to happen if it's not
there - the widget obviously won't work, but we get an error message and
everything else is fine.
(cherry picked from commit 9f1a50e18ef6c0c0f5113e1583d9b1097485dcbf)

M  +0    -1    src/plasma/packagestructure/packages.cpp

https://invent.kde.org/plasma/libplasma/-/commit/2092376b96815f41ee76181f3a17d57c8048e32e