recently I filed this bug for banshee: http://bugzilla.gnome.org/show_bug.cgi?id=327595 This one was closed with a comment that there could be a problem with dbus and mono. I've done some debugging and it seems, that this could be true ;-) in dbus-0.60/mono/Connection.cs: internal static Connection Wrap(IntPtr rawConnection) { if (slot > -1) { // Maybe we already have a Connection object associated with // this rawConnection then return it IntPtr rawThis = dbus_connection_get_data (rawConnection, slot); if (rawThis != IntPtr.Zero) { return (DBus.Connection) ((GCHandle)rawThis).Target; } } It seems, that as long dbus_connection_get_data returns a value != NULL, it is assumed that there is still a Target associated to the GCHandle object. But the GCHandle's Target is associated as Weak target: rawThis = GCHandle.Alloc (this, GCHandleType.WeakTrackResurrection); I'm not very familiar with mono, but as far as I read this means, that it is possible that the Target of the GCHandle can be freed by the garbage collector (otherwise GCHanldeType.Normal should be used). This means, that even if there is still a GCHandle, it is possible that the target is already cleaned up. In this case, a null value is returned which results later in an exception. I've tested two possibilities to solve the problem: 1. associate the target as GCHandleType.Normal 2. only assume that there is already an DBus.Connection if the GCHandle's Target has the type DBus.Connection: ... if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Connection)) { ... Both of them work. It would be good if somebody could have a look at this issue. Thank you very much!
joe, what is your take on this bug?
Hi, Sorry for the bug spam, but please can anybody have a look to this bug? Because it is more ore less a race condition the behaviour can be sometimes strange and lead to even more strange bugs. It would be good, to solve this problem in the near future to avoid other bugs with this problem as source... Thank you very much in advance.
Hi, I just want to ask if there are any news about this problem. It seems, that in the meantime also other people suffer from this bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187452 Please can a dbus-developer have a look at this problem? Please see my description for a rough analysis of the cause of the problem. Thank you very much in advance. Btw, it is a little bit disappointing for contributers if they try to help and not only report bugs but also try to solve them and even though the reports are more or less ignored. :-(
Closing bug. The dbus-mono bindings have been unmaintained for a long time and are no longer supported.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.