! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
gtype.c:4265: type id '0' is invalid…
Status:
RESOLVED: FIXED

Comments

Description Viktor Odintsev editbugs 2017-08-15 01:23:04 CEST
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.
Comment 1 Ali Abdallah editbugs 2017-08-31 14:10:46 CEST
Could you please test xfconf 4.13.4 just released. From me I cannot reproduce the error with that version.
Comment 2 Viktor Odintsev editbugs 2017-09-01 00:35:25 CEST
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
Comment 3 Viktor Odintsev editbugs 2018-01-09 22:52:53 CET
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.
Comment 4 Git Bot editbugs 2018-06-08 06:39:21 CEST
Ali Abdallah referenced this bugreport in commit f4d3a6ab0201157084bd1a8ced2b5bd545e9590c

 Initialize GValue for empty arrays (Bug #13780)

https://git.xfce.org/xfce/xfconf/commit?id=f4d3a6ab0201157084bd1a8ced2b5bd545e9590c

Bug #13780

Reported by:
Viktor Odintsev
Reported on: 2017-08-15
Last modified on: 2018-10-08

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
2 users

Version

Version:
4.13.0

Attachments

Initialize GValue for empty arrays (2.16 KB, patch)
2018-01-09 22:52 CET , Viktor Odintsev
no flags

Additional information