GNOME Bugzilla – Bug 640192
Error creating a Gio.Settings object through py gobject introspection
Last modified: 2011-01-28 01:29:52 UTC
I'm doing like this: from gi.repository.Gio import Settings as GSettings g_settings = GSettings() ... and I get a wonderful 'Segmentation Fault' but, if i do like this: g_settings = GSettings(scheme = 'yeah!') No problem and i can work with g_settings scheme like a charm! Regards!
Relevant traceback which explains why this is filed in glib/gsettings and not in pygobject/introspection:
+ Trace 225632
In C-speak: g_object_new(G_TYPE_SETTINGS, NULL); Should be enough to create the crash, while g_object_new(G_TYPE_SETTINGS, "scheme", "foobar", NULL); Should be enough to avoid it.
Well, yes, gsettings with NULL schemas don't work. I guess adding a if (settings->priv->schema_name == NULL) g_error (...) before g_settings_schema_new() would make it clearer that it's a programmer's error.