GNOME Bugzilla – Bug 755432
gtkapplication: segfault when destroying window
Last modified: 2015-09-23 22:42:47 UTC
Just spotted a segfault when destroying a GtkWindow after calling g_application_quit() : Process terminating with default action of signal 11 (SIGSEGV) Access not within mapped region at address 0x0 at 0x5158770: gtk_application_impl_window_removed (gtkapplicationimpl.c:97) by 0x5155AEF: gtk_application_window_removed (gtkapplication.c:723) by 0xAA5DD32: g_cclosure_marshal_VOID__OBJECTv (gmarshal.c:2102) by 0xAA5B083: _g_closure_invoke_va (gclosure.c:864) by 0xAA75260: g_signal_emit_valist (gsignal.c:3272) by 0xAA758B1: g_signal_emit (gsignal.c:3419) by 0x53D7580: gtk_window_release_application (gtkwindow.c:3447) by 0x53E4BCB: gtk_window_destroy (gtkwindow.c:5690)
Created attachment 311896 [details] [review] gtk: gtkapplication: fix segfault When destroying a window associated with a GtkApplication after calling g_application_quit() you might get the following segfault : Process terminating with default action of signal 11 (SIGSEGV) Access not within mapped region at address 0x0 at 0x5158770: gtk_application_impl_window_removed (gtkapplicationimpl.c:97) by 0x5155AEF: gtk_application_window_removed (gtkapplication.c:723) by 0xAA5DD32: g_cclosure_marshal_VOID__OBJECTv (gmarshal.c:2102) by 0xAA5B083: _g_closure_invoke_va (gclosure.c:864) by 0xAA75260: g_signal_emit_valist (gsignal.c:3272) by 0xAA758B1: g_signal_emit (gsignal.c:3419) by 0x53D7580: gtk_window_release_application (gtkwindow.c:3447) by 0x53E4BCB: gtk_window_destroy (gtkwindow.c:5690) This patch stops listening to window events once the GtkApplication is shutdown.
Pushed a different fix