From: Andreas V. <li...@br...> - 2009-04-23 19:30:14
|
Am Tue, 10 Mar 2009 14:40:18 +0000 schrieb Markus Kohler: > Hello Paolo and Andreas, > > besides two other bugs, I found a new one recently and tried to track > it down. I am not sure whether it is a bug in D-Bus-C++ or (more > likely) in libdbus. It looks like a deadlock. Constellation is the > following: > > Given: > - application APP that implements the adaptor for interface A, the > proxy for interface B (with methods and signals) and uses class C > (standard C++ class) > - B has, let's say, a method Create and a signal Created, i.e. in B's > adaptor Create will call this-> Created to emit the signal > - adaptor class of interface A uses method Create from interface B's > proxy and method M from class C > - class C implements interface B's proxy (to get notified about > changes), i.e. implements callback function Created for interface B > - class C's method M calls another methods of interface B's proxy > (not Create) > > This constellation makes application APP hang. Because of the > "circular" arrangement it may be a deadlock but I could not find out > more at this moment in time. > > If I disable in adaptor of interface B "this->Created" call > everything works fine. > > Right now I think of separating the interface of B into two > interfaces one with signals and one with methods which may help. This is what I do for my application. > Do you have a Bugtracker up where you collect this type of > information? I looked at your official DBus page > http://freedesktop.org/wiki/Software/dbus-c%2B%2B which points to > Bugzilla. However there I could not find any activity on dbus-c++ > (only dbus c-lib). Use this one: http://sourceforge.net/tracker/?group_id=236997&atid=1101682 But please mark the "Group" which branch it is. > Best regards, > Markus > > ps. the echo example of the newest d-bus-c++ that I pulled from git > still does not work: if you compile and use the echo-client it > behaves random in the way that it outputs sometimes all Hello echos, > sometimes only the onces from the first thread and so on. I believe > it has to do with Bug 857 at > http://bugs.freedesktop.org/attachment.cgi?id=22759&action=edit where > it says: "We're not currently threadsafe, and the documentation > should really reflect that. Even better would be to fix it of > course." I also played around with the echo example and had various threading problems. As long as you use the own main loop dispatcher you'll get those problem. You should use the glib or ecore integration to get it working. I've some ideas to get the Dbus-C++ main loop working also with threads. But you're right the echo example is broken currently. Don't use it currently or change it to use glib and provide a patch. regards Andreas |