Bug 394436 - Serious memory leak when realigning folderview widget icons.
Summary: Serious memory leak when realigning folderview widget icons.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.12.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-19 08:54 UTC by Antonio Orefice
Modified: 2018-05-28 07:18 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Orefice 2018-05-19 08:54:46 UTC
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'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 "$(cat ./folderview.re-align.js)"
  date
  grep VmRSS < /proc/`pidof plasmashell`/status | awk '{print $2}'
done

...where ./folderview.re-align.js is the following:
 for (i=0;i<activityIds.length;i++) {{
     desktop=desktopById(activityIds[i])
     print ("Attività " +i)
     for (Wid=0;Wid<desktop.widgetIds.length;Wid++) {{
         WidgetID=desktop.widgetIds[Wid]
         MyWidget=desktop.widgetById(WidgetID)
         if ( MyWidget.type == "org.kde.plasma.folder") {
             old=MyWidget.readConfig("alignment",0)
             if (old == 0) {
                MyWidget.writeConfig("alignment",1)
                MyWidget.reloadConfig()
                } else {
                MyWidget.writeConfig("alignment",0)
                MyWidget.reloadConfig()
             }
             MyWidget.writeConfig("alignment",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
Comment 1 Antonio Orefice 2018-05-28 07:18:14 UTC
I tested on another system with qt 5.11 and this seems to be fixed.
Marking as solved.