BuddiesOfBudgie / magpie

Magpie is a softish fork of Mutter for use with Budgie Desktop.
GNU General Public License v2.0
19 stars 5 forks source link

[Bug] Crash with gsettings-desktop-schemas >= 45.alpha #9

Closed bobby285271 closed 1 year ago

bobby285271 commented 1 year ago

Description

With https://github.com/GNOME/gsettings-desktop-schemas/commit/9726c5e92dbb65d410033d478e94ce900438884c a toggle-shaded key is removed, this cause a crash here

https://github.com/BuddiesOfBudgie/magpie/blob/0b81a53752dcf17a0b2b8cfe4c106f03edd2fe0e/src/core/keybindings.c#L4115-L4121

Magpie version

0.9.2

Operating System

NixOS unstable

Steps to reproduce the issue

(For NixOS users who have powerful enough machine to build webkitgtk) Build Budgie VM on this checkout.

Actual result

Sorry magpie's debug symbol is missing here, but this should be enough to show the issue:

#0  g_log_structured_array (log_level=<optimized out>, fields=0x7ffe9729f340, 
    n_fields=4) at ../glib/gmessages.c:555
#1  0x00007fe6c7cfc10e in g_log_default_handler (
    log_domain=log_domain@entry=0x7fe6c7f97b74 "GLib-GIO", 
    log_level=log_level@entry=6, 
    message=message@entry=0xe47540 "Settings schema 'org.gnome.desktop.wm.keybindings' does not contain a key named 'toggle-shaded'", 
    unused_data=unused_data@entry=0x0) at ../glib/gmessages.c:3284
#2  0x00007fe6c7cfc378 in g_logv (log_domain=0x7fe6c7f97b74 "GLib-GIO", 
    log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, 
    args=args@entry=0x7ffe9729f490) at ../glib/gmessages.c:1391
#3  0x00007fe6c7cfc62f in g_log (
    log_domain=log_domain@entry=0x7fe6c7f97b74 "GLib-GIO", 
    log_level=log_level@entry=G_LOG_LEVEL_ERROR, 
    format=format@entry=0x7fe6c7fbc548 "Settings schema '%s' does not contain a key named '%s'") at ../glib/gmessages.c:1460
#4  0x00007fe6c7f3bf09 in g_settings_schema_get_value (key=<optimized out>, 
    schema=<optimized out>) at ../gio/gsettingsschema.c:1013
#5  g_settings_schema_get_value (schema=0xe44b80, 
    key=0x7fe6c7c06428 "toggle-shaded") at ../gio/gsettingsschema.c:999
#6  0x00007fe6c7f3c563 in g_settings_schema_key_init (
    key=key@entry=0x7ffe9729f600, schema=0xe44b80, 
    name=name@entry=0x7fe6c7c06428 "toggle-shaded")
    at ../gio/gsettingsschema.c:1293
#7  0x00007fe6c7f40553 in g_settings_get_value (settings=0xe46da0, 
    key=0x7fe6c7c06428 "toggle-shaded") at ../gio/gsettings.c:1224
#8  0x00007fe6c7f416eb in g_settings_get_strv (settings=<optimized out>, 
    key=<optimized out>) at ../gio/gsettings.c:2204
#9  0x00007fe6c7b6d837 in meta_prefs_add_keybinding ()
   from /nix/store/cbpsv9jfphdkp63al39mx3giljwb7biv-magpie-0.9.2/lib/libmagpie-0.so.0
#10 0x00007fe6c7b5c6ac in add_keybinding_internal.constprop ()
   from /nix/store/cbpsv9jfphdkp63al39mx3giljwb7biv-magpie-0.9.2/lib/libmagpie-0.so.0
#11 0x00007fe6c7b6053a in meta_display_init_keys ()
   from /nix/store/cbpsv9jfphdkp63al39mx3giljwb7biv-magpie-0.9.2/lib/libmagpie-0.so.0
#12 0x00007fe6c7b5584d in meta_display_new ()
   from /nix/store/cbpsv9jfphdkp63al39mx3giljwb7biv-magpie-0.9.2/lib/libmagpie-0.so.0
#13 0x00007fe6c7b63860 in meta_context_start ()
   from /nix/store/cbpsv9jfphdkp63al39mx3giljwb7biv-magpie-0.9.2/lib/libmagpie-0.so.0
#14 0x000000000040abda in main ()

Expected result

No crash.

Additional information

This patch is already enough for me to start the desktop according to my testing.

For mutter this is dropped in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2884.

fossfreedom commented 1 year ago

Excellent research - much appreciated. We'll similarly need to remove and tidy as per your mutter linked merge request asap.

fossfreedom commented 1 year ago

@bobby285271 please git format-patch -1 4177c466375462ca8ed8fdb60913df4422f19144

Let me know how you get on. Thx

bobby285271 commented 1 year ago

Built and briefly tested the patch, runs fine for me so far. Thanks for the fix