GNOME Bugzilla – Bug 773979
GdkGLContext does not chain finalize handler
Last modified: 2016-11-10 19:34:50 UTC
Created attachment 339172 [details] [review] GdkGLContext chain finalize handler Running this program: #include <gtk/gtk.h> int main (int argc, char *argv[]) { if (gtk_init_check (&argc, &argv)) { GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL); GtkWidget *area = gtk_gl_area_new (); gtk_gl_area_set_required_version (GTK_GL_AREA (area), 3, 2); gtk_container_add (GTK_CONTAINER (win), area); gtk_widget_show_all (win); gtk_widget_destroy (win); } return 0; } after setting GOBJECT_DEBUG=objects results in: ** GLib-GObject:ERROR:gobject.c:3195:g_object_unref: assertion failed: (g_hash_table_lookup (debug_objects_ht, object) == NULL) inspecting gobject.c, a comment says it is a trap for objects not chaining finalize handlers and effectively chaining in GdkGLContext finalize handler fixes the issue. https://git.gnome.org/browse/gtk+/tree/gdk/gdkglcontext.c?h=gtk-3-22&id=a1115c05be1a8bc6e3e299e72accbbee12bd77a7#n151 git describe says: 3.22.2-23-g04db216
Review of attachment 339172 [details] [review]: Nicely spotted.