<?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>394436</bug_id>
          
          <creation_ts>2018-05-19 08:54:46 +0000</creation_ts>
          <short_desc>Serious memory leak when realigning folderview widget icons.</short_desc>
          <delta_ts>2018-05-28 07:18:14 +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>Desktop icons &amp; Folder View widget</component>
          <version>5.12.5</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>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Antonio Orefice">kokoko3k</reporter>
          <assigned_to name="Eike Hein">hein</assigned_to>
          <cc>kde</cc>
    
    <cc>nate</cc>
    
    <cc>plasma-bugs-null</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1753554</commentid>
    <comment_count>0</comment_count>
    <who name="Antonio Orefice">kokoko3k</who>
    <bug_when>2018-05-19 08:54:46 +0000</bug_when>
    <thetext>Have a folderview  installed on the desktop, the following will exhaust all of my  system memory very quickly.
Nothing special, it just pick any folderview you have on the desktop, realign the icons, and moves them back, you won&apos;t see anything moving on the desktop, it is too fast, i guess, but still,my memory usage grows indefinitely.

Be careful!


#!/bin/bash
while true ; do
  qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript &quot;$(cat ./folderview.re-align.js)&quot;
  date
  grep VmRSS &lt; /proc/`pidof plasmashell`/status | awk &apos;{print $2}&apos;
done

...where ./folderview.re-align.js is the following:
 for (i=0;i&lt;activityIds.length;i++) {{
     desktop=desktopById(activityIds[i])
     print (&quot;Attività &quot; +i)
     for (Wid=0;Wid&lt;desktop.widgetIds.length;Wid++) {{
         WidgetID=desktop.widgetIds[Wid]
         MyWidget=desktop.widgetById(WidgetID)
         if ( MyWidget.type == &quot;org.kde.plasma.folder&quot;) {
             old=MyWidget.readConfig(&quot;alignment&quot;,0)
             if (old == 0) {
                MyWidget.writeConfig(&quot;alignment&quot;,1)
                MyWidget.reloadConfig()
                } else {
                MyWidget.writeConfig(&quot;alignment&quot;,0)
                MyWidget.reloadConfig()
             }
             MyWidget.writeConfig(&quot;alignment&quot;,old)
             MyWidget.reloadConfig()
         }
         
     }}
}}


My output:
koko@slimer# ./run.sh 
Sat May 19 10:51:43 CEST 2018
331440
Sat May 19 10:51:44 CEST 2018
348576
Sat May 19 10:51:44 CEST 2018
350652
Sat May 19 10:51:45 CEST 2018
346244
Sat May 19 10:51:46 CEST 2018
350256
[..]
Sat May 19 10:54:09 CEST 2018
923880
Sat May 19 10:54:10 CEST 2018
926256
^C</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755226</commentid>
    <comment_count>1</comment_count>
    <who name="Antonio Orefice">kokoko3k</who>
    <bug_when>2018-05-28 07:18:14 +0000</bug_when>
    <thetext>I tested on another system with qt 5.11 and this seems to be fixed.
Marking as solved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>