-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should generate_service_topics(..) return an error if len(topic_name) > RMW_UXRCE_TOPIC_NAME_MAX_LENGTH? #253
Comments
For context: I ran into this with a node name of This resulted in the hidden services getting their names truncated. This is not obvious, as those services are not (directly) created by application code, but are part of the hidden ROS API. An error from the initialisation code could help debugging significantly. |
Does rmw_microxrcedds/rmw_microxrcedds_c/src/utils.c Lines 319 to 334 in b0f9724
? Edit: should that be |
Hi @gavanderhoorn, good catch. Let us know if #254 solves this. |
I've not had a chance to test the (already merged) fix in #254. I believe you've addressed my immediate issue though, so you could perhaps close this issue. |
Thanks again. |
Ok, I'm closing. Thanks for the report @gavanderhoorn ! |
As per subject really.
I just ran into a situation where service 'topic' names were being truncated to 60 chars, which did not result in any warnings or errors, other than on the Agent side which complained with:
I notice
generate_service_topics(..)
does passbuffer_size
tosnprintf(..)
:rmw_microxrcedds/rmw_microxrcedds_c/src/utils.c
Lines 123 to 138 in b0f9724
but it doesn't check the return value of
snprintf(..)
, which could help detect the topic name was truncated (from here):For services specifically,
buffer_size
is set toRMW_UXRCE_TOPIC_NAME_MAX_LENGTH
:rmw_microxrcedds/rmw_microxrcedds_c/src/rmw_service.c
Lines 127 to 129 in a17896c
so it's known what the maximum is and it could be checked.
The text was updated successfully, but these errors were encountered: