crossbario / autobahn-cpp

WAMP for C++ in Boost/Asio
https://crossbar.io/autobahn
Boost Software License 1.0
251 stars 104 forks source link

deserialization issue when result is a tuple #150

Open markos opened 7 years ago

markos commented 7 years ago

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 commented 7 years ago

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.