Bug 3999

Summary: dbus_g_bus_get must be called before using specialized gtypes
Product: dbus Reporter: Raphael Slinckx <raphael>
Component: GLibAssignee: Rob Taylor <rob.taylor>
Status: RESOLVED DUPLICATE QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: high CC: daniel.carvalho, ross, walters
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Raphael Slinckx 2005-08-06 08:05:32 UTC
1. call dbus_g_type_specialized_init()
2. call type = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE); 
3. call dbus_g_bus_get()

you get at the console 
** (process:19756): CRITICAL **: lookup_or_register_specialized: assertion
`klass != NULL' failed

if you do
3.
1.
2.

it's working fine, i have been told by Colin Walters this is a bug.
Comment 1 Rob Taylor 2006-10-25 13:15:56 UTC
*** Bug 7826 has been marked as a duplicate of this bug. ***
Comment 2 Rob Taylor 2007-02-08 16:08:58 UTC
I'm not entirely sure this is a bug. Something needs to install the default dbus gtypes. Maybe we could expose   _dbus_g_value_types_init () as public api? ideas?
Comment 3 Ross Burton 2007-03-23 13:35:47 UTC
If you use a peer connection its impossible to do this in the reverse order as you'll never call dbus_g_bus_get().  I worked around this by adding the init call to dbus_connection_setup_with_g_main() and dbus_server_setup_with_g_main(), but making the init function public might be a safer solution.
Comment 4 Colin Walters 2008-05-27 21:30:08 UTC
Moving to a dup of 13908 as that has a proposed patch.

*** This bug has been marked as a duplicate of bug 13908 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.