Problem with mono since 0.23.1
Daniel Drake
dsd at gentoo.org
Tue Feb 15 15:24:07 PST 2005
Hi,
When I upgraded to dbus 0.23.1, I started seeing these messages from mono apps
that use dbus (I have only tried beagle though..)
6506: arguments to dbus_connection_remove_filter() were incorrect, assertion
"connection != NULL" failed in file dbus-connection.c line 3334.
This is normally a bug in some application using the D-BUS library.
6506: arguments to dbus_connection_send() were incorrect, assertion
"connection != NULL" failed in file dbus-connection.c line 1737.
They appear at the end of dbus mono applications. For example beagle-query,
even when beagled isn't running:
# beagle-query something
Could not query. The Beagle daemon is probably not running, or maybe you
don't have D-BUS set up properly.
11802: arguments to dbus_connection_remove_filter() were incorrect, assertion
"connection != NULL" failed in file dbus-connection.c line 3334.
This is normally a bug in some application using the D-BUS library.
11802: arguments to dbus_connection_send() were incorrect, assertion
"connection != NULL" failed in file dbus-connection.c line 1737.
This is normally a bug in some application using the D-BUS library.
#
Trying to track these down has proved difficult. I'm fairly certain that these
calls originate from the finalizer of the Service class (mono/Service.cs).
However, I can't confirm this, because as soon as I add some debug output
(Console.WriteLine) into the Service finalizer, the finalizer never gets
called, so the odd messages mysteriously do not appear (i also added debug
output into the constructor as you can see):
# beagle-query something
Constructing internal Service org.freedesktop.DBus
Could not query. The Beagle daemon is probably not running, or maybe you
don't have D-BUS set up properly.
#
This leads me to believe that the new Service finalizer which was added in
0.23.1 doesn't work, but it's not a problem for most people because their
garbage collector doesn't finalize it. My system seems to act a little
different in this respect.
I've slimmed down the beagle-query application into a single file which causes
the errors to appear every time it is run (even when beagle is not running),
with the default mono/Service.cs file (if I add the extra debug stuff as
described above, the errors do not appear...)
I know it could be simplified even further, but it seems so delicate. For
example, if I remove the event handler setup on line 80, it then runs as
expected (raises exception) without the evil dbus messages. This sample app is
attached, compiles with:
mcs $(pkg-config dbus-sharp --cflags --libs) Query.cs
I'm somewhat doubtful that other people who don't already see this will be
able to reproduce this with this sample app, but I'm pretty much out of ideas
on this -- it doesn't help that any attempt at debugging stops the messages
from appearing! Hopefully this will provide some insight at least. Let me know
if there is anything else I can try.
System-wise, I am running mono 1.1.3 (NPTL) on Linux 2.6.11-rc4 on an Athlon
XP2600+. The above was based on the latest beagle from cvs.
Daniel
More information about the dbus
mailing list