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

Fix segfault with uninitialized JogArm thread #1882

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

henningkayser
Copy link
Member

Starting the main loop in a thread and immediately calling JogCppAPI::getCommandFrameTransform() can result in a segfault if jog_calcs_ has not been created yet. This change checks if jog_calcs_ is not null before testing jog_calcs_->isInitialized() so that early calls to JogCppAPI::getCommandFrameTransform() return false.

@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #1882 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1882      +/-   ##
==========================================
- Coverage   50.28%   50.27%   -0.02%     
==========================================
  Files         313      313              
  Lines       24630    24621       -9     
==========================================
- Hits        12385    12377       -8     
+ Misses      12245    12244       -1
Impacted Files Coverage Δ
...erimental/moveit_jog_arm/src/jog_cpp_interface.cpp 12.04% <0%> (+0.14%) ⬆️
...ccupancy_map_monitor/src/occupancy_map_updater.cpp 4.76% <0%> (-4.33%) ⬇️
...ccupancy_map_monitor/src/occupancy_map_monitor.cpp 29.65% <0%> (-0.96%) ⬇️
moveit_core/planning_scene/src/planning_scene.cpp 45.99% <0%> (-0.15%) ⬇️
...anning_scene_monitor/src/current_state_monitor.cpp 53.09% <0%> (+0.27%) ⬆️
...xperimental/moveit_jog_arm/src/low_pass_filter.cpp 100% <0%> (+4.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfd1f49...5003c4a. Read the comment docs.

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect!

@mamoll mamoll merged commit 7193a4e into moveit:master Feb 18, 2020
@tylerjw tylerjw mentioned this pull request May 8, 2020
20 tasks
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 12, 2020
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 12, 2020
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 20, 2020
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

Successfully merging this pull request may close these issues.

None yet

4 participants