Closed CaptainXX closed 2 years ago
Please try compiling the latest PCL master branch and check if the problem still exists (remember to first delete the currently installed PCL and also recompile your own code)
It's solved in master branch! Sorry for not testing it.
Hope there will be a new release, because most of people may not clone and build from master branch.
@mvieth Thanks a lot for your reply!
You're welcome. Yes, we will consider doing a release in the upcoming months
Describe the bug
Api
RangImage::createFromPointCloud
will cause segmentation fault when there is a zero point (x, y, z = 0, 0, 0) in the pointcloud. The Library is built from the newest release source code.Context
I was trying to generate and visualize the range view image from pointcloud with the pcl tutorial code. It was ok when using the generated pointcloud, but when I was trying to run it with a pcd file from DAIR-V2X-I Dataset, a segmentaion fault happened.
Then I tried to run it with gdb, the stack showed
pcl::RangeImage::getImagePoint
caused this segmentation fault.And I found that the segementation fault always happened at getting the last point. It showed to be a row with (x, y, z, intensity) = (0, 0, 0, 0). Then I deleted it, and the program worked again.
Expected behavior
A RangImage object can be successfully initialized from pointcloud.
Current Behavior
Segmentation fault in situation described above.
To Reproduce
Simply add a full zero row in the data field of the pcd file. I tested a few of files, and all of them cloud reproduce this problem.
A segmentation fault generator pcd file like this:
Run it with the tutorial code:
Your Environment (please complete the following information):
Possible Solution
I found the patch in #5149, but it did not work.