After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687467 - Commit "Implement proper cross-fades for gradients" causes enormous memory leak with some themes
Commit "Implement proper cross-fades for gradients" causes enormous memory le...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.6.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-11-02 16:54 UTC by Thomas Lange
Modified: 2012-11-06 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Old version with Animations enabled (96.90 KB, application/zip)
2012-11-02 16:54 UTC, Thomas Lange
Details

Description Thomas Lange 2012-11-02 16:54:46 UTC
Created attachment 227913 [details]
Old version with Animations enabled

I have noticed that applications leaks memory until they are killed
if the Evolve theme [1] is used.

This happens within some seconds, the applications is unresponsive
and the complete RAM + Swap is used.

The same was also reported in the Arch Linux forum. [2]

satya164, author of the theme, responded there
that he is not suffering from this bug with GTK 3.6.0.
Because of this bug he disabled animations to prevent the memory leaks.
The old version is attached.

By "git bisect" I found out that commit 4f6a55d689b9d77fcaf661d6f107dee54d99f7ef [3] causes this issue.

[1] http://satya164.deviantart.com/art/Evolve-GTK3-Theme-264780816
[2] https://bbs.archlinux.org/viewtopic.php?id=151981
[3] http://git.gnome.org/browse/gtk+/commit/?h=gtk-3-6&id=4f6a55d689b9d77fcaf661d6f107dee54d99f7ef
Comment 1 trusktr 2012-11-06 02:34:29 UTC
I too had this problem. I was using the Delorean theme which was using style transitions. Trying satya164's Evolve theme with transitions disabled fixed the problem.

This is a critical bug as it is causing applications to fill the ram and swap space to 100% within a matter of a few seconds, making the entire desktop unresponsive.

My desktop has also been crashing completely, at random. Let's hope this is also the issue with that and that there isn't some other bug.
Comment 2 Jan de Groot 2012-11-06 08:03:53 UTC
It looks like the memory leak in that commit is in fade_pattern: it creates a cairo pattern using cairo_pattern_create_* functions, but doesn't free the pattern using cairo_pattern_destroy.

Besides that, it doesn't look like it's doing the right thing. The function returns the original pattern, not the result from the operation.
Comment 3 Benjamin Otte (Company) 2012-11-06 17:01:16 UTC
I wish git-bz would attach a link to the patch(es) that fixed things automatically and not confused me just exiting the editor. Anyway:

Fix is in http://git.gnome.org/browse/gtk+/commit/?id=8a0f5159a115896e2d324381605ba6f081a4c7a8
Comment 4 Thomas Lange 2012-11-06 17:45:10 UTC
This is not yet fixed.
I have compiled 3.6.1 with these patches:
  css: Plug a leak in gradient code
  csscomputedvalues: Plug a leak
  css: Fix copy/paste error
  cssimage: Fix huge memleak

Applications still leak memory if a button in the GtkToolbar is hovered.
But there is no more a leak if you just start them.

Tested with the attached theme, patched GTK and file-roller.
Comment 5 Benjamin Otte (Company) 2012-11-06 20:29:25 UTC
Second try. There was another case where we ran into the infloop. I guess I tested the wrong buttons the first time.
Comment 6 Thomas Lange 2012-11-06 20:44:09 UTC
Works now, thanks.