<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>521247</bug_id>
          
          <creation_ts>2026-06-09 10:41:36 +0000</creation_ts>
          <short_desc>Icons-Only Task Manager widget stops working if a &quot;metadata.desktop&quot; file exists in the home directory</short_desc>
          <delta_ts>2026-06-11 15:48:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Task Manager and Icons-Only Task Manager widgets</component>
          <version>6.6.4</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Boris Carvajal">boris2.9</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>cwo.kde</cc>
    
    <cc>nate</cc>
    
    <cc>qydwhotmail</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/libplasma/-/commit/2092376b96815f41ee76181f3a17d57c8048e32e</cf_commitlink>
          <cf_versionfixedin>6.7.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2521713</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Carvajal">boris2.9</who>
    <bug_when>2026-06-09 10:41:36 +0000</bug_when>
    <thetext>DESCRIPTION
Icons-Only Task Manager widget stops working if a &quot;metadata.desktop&quot; file exists in the home directory.
File content doesn&apos;t matter.

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

OBSERVED RESULT
On KDE Neon, plasmashell enters in a crash loop because this assert:
ASSERT: &quot;path == QStringLiteral(&quot;/&quot;) || QDir(path).canonicalPath() + QLatin1Char(&apos;/&apos;) == path&quot; 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 &quot;org.kde.plasma.icontasks&quot; QList(&quot;Error loading Applet: package org.kde.plasma.icontasks does not exist.&quot;, &quot;Could not find requested component: org.kde.plasma.icontasks&quot;)

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521716</commentid>
    <comment_count>1</comment_count>
    <who name="cwo">cwo.kde</who>
    <bug_when>2026-06-09 11:20:45 +0000</bug_when>
    <thetext>Can reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521720</commentid>
    <comment_count>2</comment_count>
    <who name="cwo">cwo.kde</who>
    <bug_when>2026-06-09 11:28:11 +0000</bug_when>
    <thetext>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&apos;s just an empty file). If that&apos;s not there, it grumbles a bit but continues with the original metadata file. If it&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521722</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-06-09 11:43:09 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1518</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521758</commentid>
    <comment_count>4</comment_count>
    <who name="cwo">cwo.kde</who>
    <bug_when>2026-06-09 12:45:12 +0000</bug_when>
    <thetext>Git commit 9f1a50e18ef6c0c0f5113e1583d9b1097485dcbf by Christoph Wolk.
Committed on 09/06/2026 at 11:40.
Pushed by tfella into branch &apos;master&apos;.

plasma/packagestructure: don&apos;t require mainscript

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

Instead, don&apos;t require a mainscript for KPackages. It&apos;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&apos;s not
there - the widget obviously won&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2521763</commentid>
    <comment_count>5</comment_count>
    <who name="Tobias Fella">tobias.fella</who>
    <bug_when>2026-06-09 12:55:38 +0000</bug_when>
    <thetext>Git commit 2092376b96815f41ee76181f3a17d57c8048e32e by Tobias Fella, on behalf of Christoph Wolk.
Committed on 09/06/2026 at 12:46.
Pushed by tfella into branch &apos;Plasma/6.7&apos;.

plasma/packagestructure: don&apos;t require mainscript

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

Instead, don&apos;t require a mainscript for KPackages. It&apos;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&apos;s not
there - the widget obviously won&apos;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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>