GNOME Bugzilla – Bug 724847
Segmentation fault on "gsettings list-recursively"
Last modified: 2016-07-04 14:36:37 UTC
Created attachment 269868 [details] GDB backtrace After doing a "dpkg-reconfigure --force -a" on my system I have noticed that "gsettings list-recursively" is crashing. In the attachments is a GDB backtrace with debug symbols.
Confirming: gsettings list-recursively will indeed segfault if no valid schema sources are found.
I'm also wondering which package on "dpkg-reconfigure --force -a" caused the schema to disappear as I'm noticing a weird behavior of my system. Some applications are already complaining about the missing schema and my cache doesn't build up anymore which results in missing icons and an empty startmenu. Maybe I can figure it out on reinstalling every package and making some intersections if this problem is reproducible. But I have encountered a really serious bug.
This just happened to me with glib 2.44.1 and 2.46.2. gsettings list crashes when there are no glib schema files installed. gsettingsschema.c:g_settings_schema_source_new_from_directory() returns NULL if gschemas.compiled is not present/no schemas are installed in the glib-2.0/schemas directory. Which results in settingsschema.c:g_settings_schema_source_ref() to try look at a element in a NULL pointer. Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 235731
Created attachment 322262 [details] [review] [PATCH] gsettings: Don't crash when no schemas are installed Still doesn't behave well ("gsettings help" causes an error), but at least there's no segfault anymore.
Review of attachment 322262 [details] [review]: looks good to me