From: Roy S. (RBEI/ECG1) <Roy...@in...> - 2012-01-06 04:58:20
|
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. -Roy Samuel. |
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/> |
From: Roy S. (RBEI/ECG1) <Roy...@in...> - 2012-01-09 05:28:03
|
Hi Andreas, Thank you for your response. :) As for your question : "Does this only happen with std::map or also with other types?" I've found that simple return types, that are of primitive types, like boolean, string, etc. work just fine. However, for maps, vectors it throws assertion errors. I have posted a bug on sf.net, as per your suggestion. (https://sourceforge.net/tracker/?func=detail&aid=3471247&group_id=236997&atid=1101682) I've marked it as a high priority bug, as it causes termination of process. Best Regards, Roy -----Original Message----- From: Andreas Volz [mailto:li...@br...] Sent: Saturday, January 07, 2012 4:25 AM To: dbu...@li... Subject: Re: [dbus-cplusplus-devel] Assertion error with MessageIter - arguments to dbus_message_iter_open_container() were incorrect 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/> ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ dbus-cplusplus-devel mailing list dbu...@li... https://lists.sourceforge.net/lists/listinfo/dbus-cplusplus-devel |