GNOME Bugzilla – Bug 669376
gtk leaks references in GtkTreeView / GtTreeModelSort which cause segfault in bluefish
Last modified: 2012-02-07 10:07:52 UTC
In Bluefish we get a lot of bugreports from users on Ubuntu 11.10 that have a segfault and all backtraces have something weird: a GtkTreeModelSort is calling it's sort function after the model has been unreffed by bluefish already. This behaviour cannot be reproduced on Fedora 16 which also has Gtk-3.2 so I don't know if this is an upstream problem at all, or if the difference is that Ubuntu has different accessibility options by default (the problem is related to accessibility it seems). Checking with libgobject-list (from http://people.gnome.org/~mortenw/gobject-list.c) reveals that on Ubuntu there is a GtkTreeModelSort leaking, that is not leaking on Fedora 16. After a gdb breakpoint g_object_ref and g_object_unref with a condition object == 0x123123123 (the pointer of the GtkTreeModelSort) and doing a backtrace for each break, I found which function does not clean it's reference count: Breakpoint 2, g_object_ref (object=0xaebbb0) at gobject-list.c:642 642 GObject *obj = G_OBJECT (object);
+ Trace 229602
I don't know what causes this leak. It might be Ubuntu specific patches on gtk, the gtk theme that Ubuntu is using, or accesibility settings that default to a different value on Ubuntu (both on Ubuntu and Fedora I did not change any accessibility option from the default setting). I filed it in launchpad at https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/926889
This might be magically fixed by http://git.gnome.org/browse/gtk+/commit/?id=512ac214c68d7806bfab05f5311007169892d914 which appears in GTK 3.2.3. And your trace indicates Ubuntu using 3.2.0. I suppose F16 uses the most recent version?
Fedora 16 has libgtk-3.so.0.200.3 does that indicate GTK 3.2.3 ?
Yeah. Gtk version is libgtk-$MAJOR.so.0.($MINOR * 100).$MICRO for stable versions and libgtk-$MAJOR.so.0.($MINOR * 100 + $MICRO).0 for unstable versions.
closing the bug, I cannot reproduce it on git master anymore.