GNOME Bugzilla – Bug 687467
Commit "Implement proper cross-fades for gradients" causes enormous memory leak with some themes
Last modified: 2012-11-06 20:44:09 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
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.
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.
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
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.
Second try. There was another case where we ran into the infloop. I guess I tested the wrong buttons the first time.
Works now, thanks.