xfconf-query is not usable when I try to get value of array property: > xfconf-query -c xfce4-panel -p /plugins/plugin-6/names-hidden > GLib-GObject-WARNING **: gtype.c:4265: type id '0' is invalid > GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced > GLib-GObject-WARNING **: gvalue.c:188: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation > GLib-GObject-CRITICAL **: g_value_copy: assertion 'G_IS_VALUE (src_value)' failed I print only warnings and criticals without any result. You can see the same output when you start some apps e.g. xfce4-notifyd-config > GLib-GObject-WARNING **: gtype.c:4265: type id '0' is invalid > GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced > GLib-GObject-WARNING **: gvalue.c:188: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation > GLib-GObject-CRITICAL **: g_value_copy: assertion 'G_IS_VALUE (src_value)' failed > xfconf-WARNING **: Unexpected value type (null) This bug appeared after upgrading to xfconf 4.13. xfconf 4.13.3 is affected.
Could you please test xfconf 4.13.4 just released. From me I cannot reproduce the error with that version.
The bug still exists in 4.13.4. It's not simple to reproduce it. For example, I have the following config for notifyd (xfce4-notifyd.xml) <?xml version="1.0" encoding="UTF-8"?> <channel name="xfce4-notifyd" version="1.0"> <property name="applications" type="empty"> <property name="muted_applications" type="array"> </property> </property> </channel> Now when I start xfce4-notifyd-config I get the messages above. I gathered backtraces for all messages: (xfce4-notifyd-config:3450): GLib-GObject-WARNING **: gtype.c:4265: type id '0' is invalid > g_type_value_table_peek (type=type@entry=0) at gtype.c:4265 > g_value_init (value=0x7fffffffe480, g_type=0) at gvalue.c:183 > xfconf_cache_lookup_locked (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:776 > xfconf_cache_lookup (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:819 > xfconf_channel_get_internal (property="/applications/muted_applications", value=0x7fffffffe480) at xfconf-channel.c:452 > IA__xfconf_channel_get_arrayv (property="/applications/muted_applications") at xfconf-channel.c:1498 (xfce4-notifyd-config:3450): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced > g_type_value_table_peek (type=type@entry=0) at gtype.c:4267 > g_value_init (value=0x7fffffffe480, g_type=0) at gvalue.c:183 > xfconf_cache_lookup_locked (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:776 > xfconf_cache_lookup (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:819 > xfconf_channel_get_internal (property="/applications/muted_applications", value=0x7fffffffe480) at xfconf-channel.c:452 > IA__xfconf_channel_get_arrayv (property="/applications/muted_applications") at xfconf-channel.c:1498 (xfce4-notifyd-config:3450): GLib-GObject-WARNING **: gvalue.c:188: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation > g_value_init (value=0x7fffffffe480, g_type=0) at gvalue.c:183 > xfconf_cache_lookup_locked (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:776 > xfconf_cache_lookup (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:819 > xfconf_channel_get_internal (property="/applications/muted_applications", value=0x7fffffffe480) at xfconf-channel.c:452 > IA__xfconf_channel_get_arrayv (property="/applications/muted_applications") at xfconf-channel.c:1498 (xfce4-notifyd-config:3450): GLib-GObject-CRITICAL **: g_value_copy: assertion 'G_IS_VALUE (src_value)' failed > xfconf_cache_lookup_locked (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:791 > xfconf_cache_lookup (property="/applications/muted_applications", value=0x7fffffffe480, error=0x0) at xfconf-cache.c:819 > xfconf_channel_get_internal (property="/applications/muted_applications", value=0x7fffffffe480) at xfconf-channel.c:452 > IA__xfconf_channel_get_arrayv (property="/applications/muted_applications") at xfconf-channel.c:1498 (xfce4-notifyd-config:3450): xfconf-WARNING **: Unexpected value type (null) > IA__xfconf_channel_get_arrayv (property="/applications/muted_applications") at xfconf-channel.c:1504
Created attachment 7526 Initialize GValue for empty arrays It seems that for empty "av" xfconf doesn't initialize GValue so its type remains 0. I'm attaching the patch which add initialization without array size checking but I'm not sure this solution is good.
Ali Abdallah referenced this bugreport in commit f4d3a6ab0201157084bd1a8ced2b5bd545e9590c Initialize GValue for empty arrays (Bug #13780) https://git.xfce.org/xfce/xfconf/commit?id=f4d3a6ab0201157084bd1a8ced2b5bd545e9590c