autobahn-cpp icon indicating copy to clipboard operation
autobahn-cpp copied to clipboard

deserialization issue when result is a tuple

Open markos opened this issue 7 years ago • 1 comments

Recently I experienced strange behaviour (bad_cast or out_of_range exceptions, trying to access the result of an RPC call when it is a tuple (in particular I was sending a std::tuple<int,std::string>). Both Python and JS autobahn ports were able to process this, but not with C++. I changed the examples to demonstrate the issue (I used a wss connection), and I attach a patch to the examples for that reason. I will investigate a bit more and I will attempt to fix this and send a pull-request.

Thanks.

result_tuple_fail.zip

markos avatar Jan 26 '17 11:01 markos

Ok, I investigated this a lot more, it seems set_arguments() sets the arguments list alright, but the problem is that the list itself is empty in the future result object itself. Not sure if that's a compiler bug, so going to try a small testcase.

markos avatar Feb 01 '17 15:02 markos