From: Andreas V. <li...@br...> - 2012-01-06 22:55:11
|
Am Fri, 6 Jan 2012 12:38:56 +0800 schrieb Roy Samuel (RBEI/ECG1): > Hi, > > I am using the dbus-c++ binding to create a proxy for connman's > Service API which is exposed on dbus. The method found in connman's > Service interface xml, looks like so: > > <method name="GetProperties"> > <arg type="a{sv}" direction="out"/> > </method> > > The proxy file that was auto-generated using "dbusxx-xml2cpp" utility, > created the method in question like so: > > Line 1: std::map< std::string, ::DBus::Variant > > GetProperties() Line 2: { > Line 3: ::DBus::CallMessage call; > Line 4: call.member("GetProperties"); > Line 5: ::DBus::Message ret = invoke_method (call); > Line 6: ::DBus::MessageIter ri = ret.reader(); > Line 7: std::map< std::string, ::DBus::Variant > > argout; Line 8: ri >> argout; > Line 9: return argout; > Line 10: } > > > It's on Line 8, that I get the warning/error, > on x86 running Ubuntu 11.04 with libdbus-c++-1-0 > package(0~20110310-1ubuntu1): > > process 30342: arguments to dbus_message_iter_open_container() were > incorrect, assertion "(type == DBUS_TYPE_STRUCT && > contained_signature == NULL) || (type == DBUS_TYPE_DICT_ENTRY && > contained_signature == NULL) || (type == DBUS_TYPE_VARIANT && > contained_signature != NULL) || (type == DBUS_TYPE_ARRAY && > contained_signature != NULL)" failed in file dbus-message.c line > 2677. This is normally a bug in some application using the D-Bus > library. process 30342: dbus message iterator looks uninitialized or > corrupted > > ....and lots more..... But the process does not terminate/abort here. > > On meego however, running on an arm based target, > the process TERMINATES after this assertion error! > > The package used in meego on the arm based board is: > libdbus-c++-0.5.1-4.3.armv7hl.rpm > libdbus-c++-devel-0.5.1-4.3.armv7hl.rpm > > Please help in resolving this issue. > Is there another way in which the iterator can insert the DICT value > - (std::map< std::string, ::DBus::Variant > ) without throwing these > assertion errors? > > Any help woule be appreciated. Thank you very much for this report. I really don't use ofter "out" values in methods. So it couldn't say it's working for sure. I'll check this in near future and enhance unit tests for "out" values. Does this only happen with std::map or also with other types? Could you please create an trouble ticket in sf.net project as further reference about this? regards Andreas -- Technical Blog <http://andreasvolz.wordpress.com/> |