crash while doing a proxy call of a dead process

Simon McVittie simon.mcvittie at collabora.co.uk
Sun Dec 2 07:44:01 PST 2007


On Sun, 02 Dec 2007 at 03:19:01 -0800, viklaus wrote:
> if a message is
> sent to one of theses processes which doesn't exist anymore, the process
> sender of the message is killed while calling the method with the function
> dbus_g_proxy_call in the dead process's client library . That's because the
> server of the dead process is dead too.

When you say "is killed", are you sure you don't mean "fails an
assertion and aborts"?

> is there a way to know if a server is still working before doing this call ?
> or to know if a proxy object exists before doing a call ?

You're not allowed to call just about any API on a dbus-glib DBusGProxy
after it has emitted the "destroy" signal. If you do, it'll fail an assertion
and abort the calling process. To fix this, use g_signal_connect to listen for
the "destroy" signal, and when it's emitted, stop using the proxy.

Hope this helps,
    Simon


More information about the dbus mailing list