GNOME Bugzilla – Bug 773871
Calendar segfaults on exit
Last modified: 2017-04-17 18:20:40 UTC
GNOME calendar segfaults on exit. Thread 1 "gnome-calendar" received signal SIGSEGV, Segmentation fault. gtk_widget_get_scale_factor (widget=<optimized out>) at /home/sadiq/jhbuild/checkout/gtk+-3/gtk/gtkwidget.c:10877 warning: Source file is more recent than executable. 10877 (gdb) bt full
+ Trace 236814
Created attachment 340508 [details] [review] application: cleanup finalize method Calendar now segfaults due to faling function gtk_style_context_remove_provider_for_screen in application finalize method. As application finalize method is called only when the application closes, there isn't any hard requirement to cleanup every trailings. Operating System shall take care of that. So removing the failing functions so as to not segfault on exit anymore.
*** Bug 773153 has been marked as a duplicate of this bug. ***
*** Bug 776388 has been marked as a duplicate of this bug. ***
Bug #776388 has some more details on this, including valgrind data. Issue still present in 3.22.2.
*** Bug 776620 has been marked as a duplicate of this bug. ***
Still present with the latest version from master / flatpak.
Created attachment 345311 [details] [review] application: don't remove providers from screen when finalizing When finalizing the application, it is possible that the main window had already been destroyed and the Gtk+ CSS machinery to stop working. We currently try to remove the CSS providers from screen when finalizing, which (i) has no effect, and (ii) causes a segfault. Fix that by simply destroying the CSS providers, and not trying to remove them on finalize.
Created attachment 345312 [details] [review] application: don't remove providers from screen when finalizing When finalizing the application, it is possible that the main window had already been destroyed and the Gtk+ CSS machinery to stop working. We currently try to remove the CSS providers from screen when finalizing, which (i) has no effect, and (ii) causes a segfault. Fix that by simply destroying the CSS providers, and not trying to remove them on finalize.
Attachment 345312 [details] pushed as 0ce04c0 - application: don't remove providers from screen when finalizing
Mohammed’s patch was functionally equivalent. :(
Sorry for missing your patch, Sadiq. Yours one is the standing commit now. Attachment 340508 [details] pushed as 1449233 - application: cleanup finalize method