Bug 185205

Summary: systemsettings eats memory and crashes sometimes
Product: [Applications] systemsettings Reporter: Dmitry <korvin>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, finex
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitry 2009-02-22 08:45:06 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Gentoo Packages

KDE4's system settings application is now eating up memory. After upgrade, I was seeking through config pages, one by one (just wanted to know what changed so far) and then noticed that amound of memory used by app increases after I select a new page. Seems that closed page is not freed.

When I opened-closed around 15 pages (one of them was display settings) It crashed, and screen was turned off, so I was sitting in the darkness =)  After switching to framebuffer console (Ctrl+Alt+F1) and then back it went back to normal.
Comment 1 Dario Andres 2009-02-22 19:09:34 UTC
It's better to use one report per bug.

I think the crash when clicking display is already reported, but your situation may be different. If you can reproduce the crash at will, may you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports ? If you get a backtrace you can report it as another bug.

Let's focus this report in the memory usage issue.
Can you describe your steps and the memory usage after each step?

Thanks :)
Comment 2 Dmitry 2009-02-26 10:28:15 UTC
Well there IS memory great leak =)

> Let's focus this report in the memory usage issue.
> Can you describe your steps and the memory usage after each step?

Of course. Just open the application and then open items one by one. I mean open, then push the "Back" button, then open next icon and so on.

This is a memory usage stats (in KB):
5900 - opened the application

7196 - opened first icon (look&feel I guess)
7216(!!) - closed look&feel

7896 - opened "window behaviour"
7896 - closed  (no change)

11180 - opened "desktop"
11180 - closed "desktop"

11292 - opened "system notifications"

11196 - PIM data opened
12200 - closed.

Even if you will open and close the same entry -- memory usage will constantly increase
Comment 3 Dario Andres 2009-02-26 11:11:26 UTC
When you open a Module, and then you closed, the memory isn't released, as the module isn't destroyed.(You will noticed this, as if you first enter some module, it may take time to load, however, on a 2° load it will be inmediatly loaded/shown.) I suppose this is an intended *caching*.
However, loading the same module over and over again shouldn't increase memory usage. I'm gonna check this later.
Thanks
Comment 4 Pino Toscano 2009-03-15 12:59:25 UTC
This most probably was due to a known leak in the localization functions in KDE 4.2.0, and should be fixed with KDE 4.2.1.
Dmitry, can you confirm?
Comment 5 Dmitry 2009-03-15 14:56:12 UTC
(In reply to comment #4)
> This most probably was due to a known leak in the localization functions in KDE
> 4.2.0, and should be fixed with KDE 4.2.1.
> Dmitry, can you confirm?

Yes, seems that it is fixed now. Moreover, other apps such as system activity and kinfo center also stopped eating memory. So, I think it is the case.