Segmentation fault when running narf_keypoint_extraction tutorial
Your Environment
- Operating System and version: Ubuntu 19.10
- Compiler: gcc version 9.2.1 20191008
- PCL Version: 1.10.0 and master (460082995448729deaa311a529700e6f2212e15e)
Context
When trying to follow the PCL NARF keypoint extraction tutorial the program crashed with Segmentation Fault in RangeImageBorderExtractor::updatedScoreAccordingToNeighborValues
Expected Behavior
I expected to see a view of the keypoints
Current Behavior
Segmentation fault (core dumped)
Code to Reproduce
The bug is reproducable in the PCL 1.10.0 version by compiling and running the https://github.com/PointCloudLibrary/pcl/blob/abe501a386de3f292cdcfaf8b2ce4c6e3715413e/doc/tutorials/content/sources/narf_keypoint_extraction/narf_keypoint_extraction.cpp as described in the tutorial
Possible Solution
Seems like this is a regression bug introduced in commit 35fb6248187d922870a05d330151204e31751c2d , see https://github.com/PointCloudLibrary/pcl/commit/35fb6248187d922870a05d330151204e31751c2d#diff-ad7e3593cd97ae77c3f13c4689ceadadL157
When changing from
if (border_scores_left_.empty())
to
if (!border_scores_left_.empty())
The tutorial demo worked ok.
Oops my bad. Will push a fix soon