GNOME Bugzilla – Bug 765576
gtk+ leaks and hangs
Last modified: 2016-04-26 09:37:26 UTC
Cause https://git.gnome.org/browse/gtk+/commit/?id=55537cccbd8129ed9fd3d00e8af07c05719516ac ------- #include <gtk/gtk.h> /* gcc -Wall `pkg-config --cflags --libs gtk+-3.0` a.c */ int main(int argc, char *argv[]) { GtkWidget *window; gdk_init (&argc, &argv); gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show_all (window); gtk_main(); return 0; } ----- Before trying the above I recommend "sudo swapoff -a", or your machine will swap immediately. The cause is calling gdk_init() before gtk_init() and somehow results in gresource.c:lazy_register_resources() looping forever.
Created attachment 326728 [details] [review] gdk: Ensure resources registration happens once Like GTK does it.
Review of attachment 326728 [details] [review]: This fix make things work again. ::: gdk/gdk.c @@ +273,3 @@ +register_resources (void) +{ + _gdk_register_resources (); s/_gdk_register_resources/_gdk_register_resource/
Thanks for the review, and for catching the typo. Attachment 326728 [details] pushed as 0e14456 - gdk: Ensure resources registration happens once