Skip to content

simple action server bug #4121

@iceuw

Description

@iceuw

Bug report

I guess there is some wrong with this line of code in https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L577

The argument std::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>> handle should change to std::shared_ptr<rclcpp_action::ServerGoalHandle<ActionT>>& handle. Otherwise, the function terminate won't free the 'handle' correctly.

And if you send a wrong goal to a running action server as a pending goal, the code will terminate the pending goal with not free it. And then this function is_cancel_requested in https://github.com/ros-planning/navigation2/blob/main/nav2_util/include/nav2_util/simple_action_server.hpp#L449 will always return false cause the pending handle is not a nullptr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions