dbus-glib-1 bug in dbus_g_proxy_call

Cody Lodrige cody at lodrige.com
Fri Jul 20 01:26:47 PDT 2007

Hello All-

I have just found a rather odd bug in the function dbus_g_proxy_call. 
When an invalid method name is called on a proxy, it returns FALSE and
sets the GError* variable accordingly. But if you call an invalid method
name on a proxy that has a space in it, you get this:

process 3676: arguments to dbus_message_new_method_call() were
incorrect, assertion "_dbus_check_is_valid_member (method)" failed in
file dbus-message.c line 1077.
This is normally a bug in some application using the D-Bus library.

** ERROR **: Out of memory
Aborted (core dumped)

Which was generated from this function call:

call_result = dbus_g_proxy_call(proxy, "Defau ltAdapter", &error,
        G_TYPE_INVALID, G_TYPE_STRING, &adapter_path, G_TYPE_INVALID);

Notice the space.

Yet this returns an error as expected:

call_result = dbus_g_proxy_call(proxy, "DefaultAdapterIDONTEXIST",
&error, G_TYPE_INVALID, G_TYPE_STRING, &adapter_path, G_TYPE_INVALID);

Like so:

** (./dbus_test:3805): WARNING **: Failed to call DBUS service: Method
"DefaultAdapterIDONTEXIST" with signature "" on interface
"org.bluez.Manager" doesn't exist

I could post the test code if that would be helpful..



More information about the dbus mailing list