My favorites | Sign in
lcm
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 38: Error decoding messages with vector<double> of length zero with cpp bindings.
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2011


Sign in to add a comment
 
Reported by iamte...@gmail.com, Oct 7, 2011
What steps will reproduce the problem?

1. In the example code, change send_message.cpp (or send_message.c) to send a vector of length 0 instead of length 15 for "ranges"; recompile.
2. Run the c++ listener program; send the message from both the c++ and c send_message.  Both cause a failure when trying to decode the message (in the inner lcm handler/decoder, nor in the actually listener.cpp parsing).
3. Just for comparison, run the c listener program, and send the message from both the c++ and c send_message programs.  Both successfully decode and print out the contents with a "ranges" vector of zero length.

What is the expected output? What do you see instead?
I expect to see printed output of a decoded message, such as that displayed by the c bindings, when listening with c++ bindings.  Instead, the error message "error -1 decoding example_t!!!" is displayed.

What version of the product are you using? On what operating system?
svn revision 616; Linux -- Ubuntu 10.04 (lucid)

Please provide any additional information below.

This does not seem to be a problem in my experience for vectors of strings; I haven't looked into vectors of bools or integers.  Although not thoroughly tested, any double vector of length >= 1 seems to work, whereas length 0 has not failed in causing a decode error for me.

Oct 7, 2011
Project Member #1 ashu...@gmail.com
Thanks for the bug report, I've committed a fix.  Please update to the latest svn revision and let me know if the problem is still there.
Oct 7, 2011
#2 iamte...@gmail.com
Works perfectly for me.  Thanks again for the amazing fast bug fixes!  You guys are great!
Oct 14, 2011
Project Member #3 ashu...@gmail.com
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting