Open martinfri opened 5 months ago
Thanks for the report. Yeah the problem is in the allocate_message
, it does not take into account nested messages with strings. I created PR https://github.com/v-kiniv/rws/pull/28 with a fix, please let me know if it's working for you.
It doesn't cover the case where nested message with string is an array(foo_msgs/Stream[] stream
), I'll address it in a separate PR when I come up with a solution for that.
Perfect, I have tested the PR, and it does indeed fix the issue. Ah, the cast to auto sub_members = static_cast<const MessageMembers *>(member->members_->data);
did the trick!
Regarding the array case, would probably be nice to have, but currently i have no such case.
Great, thanks for testing the PR, I'll merge it then. As for the issue, I'm leaving it open till array case is fixed.
It seems like I got a similar issue to #12 which i try to wrap my head around. My custom service looks as followed
a topic type called Stream with the following content
The service using the topic set Stream
Crashes here
Could it be the allocate_message call, when it got one member which contain members with strings?