dbus-java: dbus-monitor quits when sending messages addressed to bus?

Matthew Johnson dbus at matthew.ath.cx
Sat May 3 02:25:40 PDT 2008


On Fri May 02 18:34, Ed Wei wrote:
> Hi Matthew,
> 
> I've noticed that when I send commands to the bus like AddMatch or
> Request name from java, dbus-monitor always disconnects.  I am just
> using the low level API to construct a MethodCall and queue it.

I really have no idea. If the message were malformed at all then you
should be disconnected from the bus by dbus-daemon. I can only think
it's a bug in dbus-monitor. 

I'm CCing the dbus list in the hope that one of them may be able to
help.

Matt
> 
> I can tell that the command does succeed, but it has the undesirable
> side-effect of disconnecting a dbus-monitor.
> 
> Any ideas why?  I have output from DBUS_VERBOSE=1 on the dbus-monitor.  It
> says:
> "Initial peek at header says we don't have a whole message yet, or data
> broken with invalid code 17"
> 
> Thanks!
> 
> 
> Ed
> 
> Output from dbus-monitor:
> 189: 0x0:  iteration flags = read timeout = -1 read_watch = 0x804c4f0
> write_watch = 0x804c4c8 fd = 3
> 5189: 0x0: unlock socket_do_iteration pre poll
> 5189: 0x0:   UNLOCK: _dbus_connection_unlock
> 5189: 0x0: lock socket_do_iteration post poll
> 5189: 0x0:   LOCK: _dbus_connection_lock
> 5189: 0x0: in iteration, need_read=1 need_write=0
> 5189: 0x0: do_reading: fd = 3
> 5189: 0x0: check_read_watch: fd = 3
> 5189: 0x0:   setting read watch enabled = 1
> 5189: 0x0:   UNLOCK: protected_change_watch
> 5189: 0x0:   LOCK: protected_change_watch
> 5189: 0x0:  read 392 bytes
> 5189: 0x0: have 392 bytes, need body 44 + header 160 = 204
> 5189: 0x0: validating body from pos 0 len 392 sig 'yyyyuua(yv)'
> 5189: 0x0: p = 0x804d8a9 end = 0x804d998 claimed_len 3
> 5189: 0x0: initially caching field 1
> 5189: 0x0: initially caching field 2
> 5189: 0x0: initially caching field 3
> 5189: 0x0: initially caching field 7
> 5189: 0x0: initially caching field 8
> 5189: 0x0: validating body from pos 160 len 44 sig 'sss'
> 5189: 0x0: Loaded message 0x804cb68
> 5189: 0x0: *Initial peek at header says we don't have a whole message yet,
> or data broken with invalid code 17*
> 5189: 0x0: queueing received message 0x804cb68
> 5189: 0x0: Message 0x804cb68 (4 /org/freedesktop/DBus org.freedesktop.DBus
> NameOwnerChanged 'sss' reply to 0) added to incoming queue 0x804c820, 1
> incoming
> 5189: 0x0: Corrupted message stream, disconnecting
> 5189: 0x0: _dbus_transport_disconnect start
> 5189: 0x0: socket_disconnect
--
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080503/dfe3fdba/attachment.pgp 


More information about the dbus mailing list