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 409043 - GValue cannot be used with dynamic types
GValue cannot be used with dynamic types
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gobject
2.12.x
Other All
: Normal normal
: ---
Assigned To: Tim Janik
gtkdev
Depends on:
Blocks: 407711
 
 
Reported: 2007-02-17 19:48 UTC by Daniel Elstner
Modified: 2018-05-24 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (2.98 KB, text/plain)
2007-02-17 19:50 UTC, Daniel Elstner
Details

Description Daniel Elstner 2007-02-17 19:48:05 UTC
It is not possible to use GValue with types that are registered dynamically via the GTypePlugin interface.  g_value_init() fails with the following messages:

(test-value-plugin:30681): GLib-GObject-WARNING **: can't peek value table for type `CustomBoxed' which is not currently referenced

(test-value-plugin:30681): GLib-GObject-WARNING **: gvalue.c:96: cannot initialize GValue with type `CustomBoxed', this type has no GTypeValueTable implementation

The documentation mentions that a dynamic type can be referenced with either g_type_class_ref() or g_type_create_instance().  Unfortunately, neither of these functions can be used with boxed types.
Comment 1 Daniel Elstner 2007-02-17 19:50:55 UTC
Created attachment 82749 [details]
Test case

The attached test case dynamically registers a custom boxed type in order to demonstrate the bug.
Comment 2 Matthias Clasen 2008-11-29 03:16:08 UTC
I think you are right. GType never calls complete_type_info for unclassed dynamic types. At least I don't see how and when. Tim, any advice on how to fix this ?
Comment 3 Murray Cumming 2010-03-26 09:58:07 UTC
Any ideas?
Comment 4 GNOME Infrastructure Team 2018-05-24 10:58:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/82.