-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
AVX2 makes PCL crash #5806
Comments
@Vakarian15 can you try find the configure log file from VCPKG build of PCL - maybe we can see something in the log, whether PCL was build with AVX support or not. |
@larshg Thank you for your swift response. Here is the configure log |
That was the cmake cache and yes, the variable you refer to, is that it should test for AVX(2), but I can't find any "HAVE_AVX" or the like. I was requesting the configuration output when running cmake. Its example from the azure pipline, but hopefully you can find similiar :-) |
I can find |
Here are the files |
Ahh, vcpkg have a patch for SSE https://github.com/microsoft/vcpkg/blob/master/ports/pcl/fix-check-sse.patch But not for AVX and they don't parse default CXX settings, so it will never check for AVX instructions. |
I see, thanks for your time! |
I made a patch for AVX |
And you have enabled AVX in your project as well as copied new dlls etc? |
Yes, I even copied the whole vcpkg\installed\x64-windows\bin folder. |
I was able to get AVX2 to work by using only custom point types with |
I find it funny that there are two connected issues so close together. I think #5805 is the problem. PCL is using |
Hi, thank you for your suggestions, but I tested and I see no reason to assume that
Same as Lars, I think the problem is likely that vcpkg built PCL without AVX/AVX2, so the precompiled classes use a "vanilla" malloc instead of Eigen's custom aligned malloc. When the user code is compiled with AVX/AVX2, Eigen's aligned_free is used (not a "vanilla" free). The mismatch between the "vanilla" malloc and Eigen's aligned_free causes the problem. When using |
As another data point, I encountered this bug on Linux with installing PCL binaries from apt, so it isn't just vcpkg. I haven't tried using the built-in |
Describe the bug
I am trying to downsample a
pcl::PointXYZRGBNormal
PointCloud using aVoxelGrid
filter.AVX2 makes my program crash, I tried it with 1.12.0 and 1.13.1, both of them have the same problem.
To Reproduce
If I disable AVX2, it works. If I replace
pcl::PointCloud<pcl::PointXYZRGBNormal>
withpcl::PCLPointCloud2
, it works. So I'm not sure it is a problem ofpcl::PointXYZRGBNormal
orpcl::VoxelGrid
.Here is the sample project including the dataset: PCLTest.zip
Screenshots/Code snippets
Stack track
Your Environment (please complete the following information):
Additional context
In 1.13.1, both
pcl::PointXYZRGBNormal
andpcl::VoxelGrid
havePCL_MAKE_ALIGNED_OPERATOR_NEW
macro. So I have no idea what the problem is. Thanks in advance.The text was updated successfully, but these errors were encountered: