Skip to content
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

moveit_visual_tools::MoveItVisualTools::publishTrajectoryPath unchecked read of possibly null pointer #94

Open
werner291 opened this issue Jul 20, 2021 · 2 comments

Comments

@werner291
Copy link

Hello,

see the line: https://github.com/ros-planning/moveit_visual_tools/blob/c166f8ee6412023b4183fc091abe6acbcdba2448/src/moveit_visual_tools.cpp#L1254

That line can segfault, because the robot_model_ may be a null pointer. This is possibly due to me using MoveIt without a source of "current" robot state information, I just want to plan hypothetical paths.

Looks like that method is missing a loadSharedRobotState();.

Calling that method from user code beforehand makes causes the segfault to disappear.

@v4hn
Copy link
Contributor

v4hn commented Jul 20, 2021 via email

werner291 added a commit to werner291/moveit_visual_tools that referenced this issue Jul 20, 2021
@werner291
Copy link
Author

werner291 commented Jul 20, 2021

Pull request opened. I fixed it in user code, but adding that line to the source should fix it as well.

v4hn added a commit that referenced this issue Aug 28, 2021
* Fixed possible nullpointer segfault

Fix for #94

* safeguard more uses

The last one forces a valid RobotState through the method API,
so we can get the RobotModel from there without loading anything else.

Co-authored-by: v4hn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants