GNOME Bugzilla – Bug 679537
Crash in GtkEntry gtk_entry_get_icon_pixbuf()
Last modified: 2012-07-09 15:25:32 UTC
With the following sequence (which we're doing in some long-standing this-used-to-work unit tests) the following code crashes GTK 3.4.2 gtk_entry_set_icon_pixbuf(entry, GTK_ENTRY_ICON_PRIMARY, NULL); gtk_entry_get_icon_pixbuf(entry); should return NULL, but is crashing with G_IS_OBJECT() failing inside g_object_unref(). I checked out that tag from git and the line in question was 7940 of gtk/gtkentry.c: /* HACK: unfortunately this is transfer none, so we need to return * the icon helper's cache ref directly. */ pixbuf = gtk_entry_ensure_pixbuf (entry, icon_pos); g_object_unref (pixbuf); This code is unchanged in master; the unref is now at line 7949 in gtk/gtkentry.c. With a comment like that, I'm guessing that something to do the the returned pixbuf not being what it should be, but I'm surprised at g_object_unref() CRITICAL'ing. Backtrace follows, not that it really matters. AfC
Relevant line is frame 7.
+ Trace 230478
Cosimo, this is more iconhelper fallout - can you have a look ?
Yeah, my bad. I now pushed a fix to git master for this, thanks for the report.
Beautiful. Matthias, is this the sort of thing that will backport to the 3.4 series, or should we hack our unit test suite to not do this test case for the next few releases? AfC
If it applies in 3.4, we should cherry-pick it, certainly.
Cherry-picked to gtk-3-4 now