[java] dbus disconnecting / threaded use of dbus

Will Thompson will.thompson at collabora.co.uk
Tue Sep 4 09:51:20 PDT 2012

On 04/09/12 12:40, Colby M White wrote:
> I am attempting to use the java bindings for dbus and am encountering a
> disconnecting problem. When I send a signal, the connection is
> disconnected with out given me much of a reason as to why. Part of the
> issue is it doesn't happen all the time, just when it feels like it.
> That's making it hard to reproduce.
> So my main question: What are the possible reasons that a connection
> would decide to disconnect (other then hitting the
> DBusConnection.disconnect() method, which I confirmed is never being
> called in my code)? If I knew what could cause a disconnection, then it
> would narrow my search.

Sending malformed messages, such as with a path which doesn't obey 
or a string which isn't valid UTF-8.

>                  Topic.DataChanged signal=new
> Topic.DataChanged("/"+getId(), /*some other stuff*/);

> [org.freedesktop.dbus.AbstractConnection$_sender.run()] Got message:
> DataChanged(0,7) { Path=>..., Interface=>dbus.topics.Topic,

You've cut out what the path actually is. What does getId() return? Does 
prefixing it with '/' always give you a valid object path?


More information about the dbus mailing list