Welcome to CRUX bug tracking.

FS#1049 - glib: gsettings segfaults

Attached to Project: CRUX
Opened by Kristian Lehmann (kris) - Thursday, 28 August 2014, 20:23 GMT
Last edited by Fredrik Rinnestam (frinnst) - Thursday, 02 October 2014, 21:49 GMT
Task Type Bug Report
Category ports → core/opt
Status Closed
Assigned To Fredrik Rinnestam (frinnst)
Operating System CRUX
Severity Medium
Priority Normal
Reported Version 3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


.post-install needed (+README?):

glib-compile-schemas /usr/share/glib-2.0/schemas

This task depends upon

Closed by  Fredrik Rinnestam (frinnst)
Thursday, 02 October 2014, 21:49 GMT
Reason for closing:  Implemented
Comment by Juergen Daubert (jue) - Friday, 29 August 2014, 06:37 GMT Comment by Juergen Daubert (jue) - Friday, 29 August 2014, 06:41 GMT
The suggested post-install doesn't work, but the following fixes the issue:

08:31 < teK___> so frinnst put an empty file /usr/share/glib-2.0/schemas/gschemas.compiled in your port :-)
Comment by Fredrik Rinnestam (frinnst) - Sunday, 31 August 2014, 18:01 GMT
Right, so this is a bit of a mess. I've not found a good way to solve this without breaking running & working setups.

just installing an empty /usr/share/glib-2.0/schemas/gschemas.compiled will break gtk3 applications that has schemas installed from other ports.
So that's not a good option. You must also have schemas installed for glib-compile-schemas to succeed so we cant just do a post-install for glib.

So the options are (as far as I can tell):
1) Leave as-is, accept that "gsettings --help" will segfault on a vanilla system. Add a README that explains why and that glib sucks.
2) Install an empty gschemas.compiled file with glib and accept that applications will start to crash until glib-compile-schemas has been run again.

Comment by Danny Rawlins (Romster) - Monday, 01 September 2014, 09:48 GMT
install glib compile the schemas and then add that to the source just like we do with gtk 2 imodules and gdkpix-buf loaders, then in gtk3 add the post-install to regenerate gschemas.compiled
Comment by Kristian Lehmann (kris) - Monday, 01 September 2014, 19:52 GMT
glib-compile-schemas does not work without schemas so it is unable to generate a schema before gtk3 or another package ist installed.

Attached a patch warning the user about missing schemas and end without segfault.
Comment by Kristian Lehmann (kris) - Thursday, 04 September 2014, 19:49 GMT
Behaviour is wrong, every glib program is closed, even though it does not use schemas.
Comment by Kristian Lehmann (kris) - Thursday, 04 September 2014, 21:24 GMT
Patching gsettings-tool to check global schema_source for NULL
Adding error calls to prevent segfaults when schema_sources == NULL in glib