After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769310 - Throws loads of warnings on startup
Throws loads of warnings on startup
Product: gnome-control-center
Classification: Core
Component: Keyboard
git master
Other Linux
: Normal normal
: ---
Assigned To: Rui Matos
Control-Center Maintainers
Depends on:
Reported: 2016-07-29 17:17 UTC by Bastien Nocera
Modified: 2016-07-29 17:33 UTC
See Also:
GNOME target: ---
GNOME version: ---

keyboard: make sure to retrieve the correct type from variants (2.61 KB, patch)
2016-07-29 17:26 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Bastien Nocera 2016-07-29 17:17:32 UTC
(gnome-control-center:24178): GLib-CRITICAL **: g_variant_get_string: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_STRING) || g_variant_is_of_type (value, G_VARIANT_TYPE_OBJECT_PATH) || g_variant_is_of_type (value, G_VARIANT_TYPE_SIGNATURE)' failed

  • #0 _g_log_abort
    at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c line 396
  • #1 g_logv
    at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c line 1188
  • #2 g_log
    at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c line 1226
  • #3 g_return_if_fail_warning
  • #4 g_variant_get_string
    at /home/hadess/Projects/jhbuild/glib/glib/gvariant.c line 1462
  • #5 cc_keyboard_item_is_value_default
    at cc-keyboard-item.c line 588

Comment 1 Georges Basile Stavracas Neto 2016-07-29 17:26:27 UTC
Created attachment 332364 [details] [review]
keyboard: make sure to retrieve the correct type from variants

When comparing the keyboard shortcut's default and current
values, we double-check what kind of variant the default
value is, but don't check that for the user value.

This ends up throwing lots of variant-related warnings, as
the user value may not be a plain string.

Fix that by checking the variant types both for the user and
the default value of the shortcut's settings.
Comment 2 Bastien Nocera 2016-07-29 17:33:29 UTC
Moved the "*" one pixel to the right ;)

Attachment 332364 [details] pushed as 00f1b53 - keyboard: make sure to retrieve the correct type from variants