GNOME Bugzilla – Bug 736591
Crash when saving metadata during application shutdown
Last modified: 2014-12-14 14:30:53 UTC
The crash is simple to reproduce if gedit-metadata-manager is used (on Windows for example): - open one file with gedit - select something and copy it to the clipboard (Ctrl+C) - close gedit - crash The crash is because gedit_metadata_manager_set() is called after gedit_metadata_manager_shutdown(). If the GVFS metadata are used, I think it doesn't crash, but the metadata is not saved since it calls the async GIO function and the main loop is already closed. So it should be fixed too. Program terminated with signal 11, Segmentation fault. 369 if (!gedit_metadata_manager->values_loaded) (gdb) p gedit_metadata_manager $1 = (GeditMetadataManager *) 0x0 (gdb) bt
+ Trace 234087
Created attachment 286093 [details] [review] app: shutdown metadata-manager after GTK+ This avoids a crash when GTK+ still holds a reference to a GeditDocument for the clipboard.
Indeed, the metadata is not saved with GVFS. Not sure how to fix that, maybe have a function gedit_app_is_shutting_down(), so we can call the sync GIO function only when the app is shutting down.
This bug is now fully fixed: https://git.gnome.org/browse/gedit/commit/?id=2d1e253aa577b9b5b2e0acc2ddc240b0b10e3996