Red Hat Bugzilla – Bug 222260
gtk2 leaks memory on expose
Last modified: 2007-11-30 17:11:53 EST
Fedora gtk2-2.10.4-10 seems to leak memory on redraws (eg. modify_bg or expose),
at least for GtkButtons. This is not present in gtk2-2.10.4-6, I have not tested
any versions in between.
I have prepared a testcase that exposes a button every 50ms (or changes a button
background colour, which is how I first noticed the problem).
I could not track down what changed between -6 and -10 to cause this leak to
appear. It definitely exists on both i386 and amd64.
I'm wondering if this is related to bug 220903, but the valgrind log doesn't
have full leak checking.
Created attachment 145319 [details]
testcase to demonstrate leak, compile with gcc -g -o gtk_rc_style_test `pkg-config --cflags --libs gtk+-2.0` gtk_rc_style_test.c
Created attachment 145320 [details]
valgrind log from one of my tests
gtk2-2.10.4-10.fc6.i386 has several leaks that are fixed in 2.10.7 upstream and
in rawhide, according to the changelog. I noticed a leak when setting a
statusbar's text a few million times (used over 500 MB memory), and that
replacing the statusbar with a label did the same. This was in Python, so I
wrote a trivial GTK program in C, which leaked the same way. Linking that
program against a libgtk built from rawhide fixes that leak.
RFE gtk2 2.10.7 as in rawhide?
No, 2.10.7 has other issues. I'll do a 2.10.8 early next week, that will
hopefully find its way into fc6-updates
OK. That's why I didn't make the request as a separate RFE. I certainly didn't
test anything else with 2.10.7.
*** Bug 220903 has been marked as a duplicate of this bug. ***
2.10.8 is in FC-6 updates now and should resolve this issue.