dbus_g_proxy_* makes assertion in multi threaded environment

최우성 woo-sung.choi at samsung.com
Wed Apr 1 16:37:11 PDT 2009


Hello.

I am using dbus_g_proxy_* on my embedded environment.
I use the multi threaded application and dbus is called on each thread.
The problem is, sometimes I get an assertion on dbus_g_proxy_call or dbus_g_proxy_new_for_name.

dbus_g_proxy_call's case, I do not know the exact location, I am debugging it now,
dbus_g_proxy_new_for_name's case, it is on

static DBusGProxy*
dbus_g_proxy_new (DBusGConnection *connection,
                  const char      *name,
                  const char      *path_name,
                  const char      *interface_name)
{
  DBusGProxy *proxy;

  g_assert (connection != NULL); //<-- here
  
  proxy = g_object_new (DBUS_TYPE_G_PROXY, 
                        "name", name, 
                        "path", path_name, 
                        "interface", interface_name, 
                        "connection", connection, NULL);

  return proxy;
}

I just use the dbus call conventionally, get connection, make proxy, use proxy, unref proxy and leave connection on every thread, but this happend.
I use the dbus 1.2.3 and dbus glib 0.7.4

Do I have to modify sequence or add someting on my code?
Or is there any patch for this symptom?

Thanks in advance,

Woosung.


More information about the dbus mailing list