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

[initCompute] Failed to allocate XXXXX indices. #6196

Open
wangzhenlin123 opened this issue Dec 10, 2024 · 7 comments
Open

[initCompute] Failed to allocate XXXXX indices. #6196

wangzhenlin123 opened this issue Dec 10, 2024 · 7 comments
Labels
kind: bug Type of issue status: triage Labels incomplete

Comments

@wangzhenlin123
Copy link

Describe the bug

` pcl::PassThroughpcl::PointXYZ pass;
pass.setInputCloud(cloud);

// 设置要过滤的坐标轴和范围
pass.setFilterFieldName("z");
pass.setFilterLimits(0.0, 10.0);
pass.filter(*cloud_cut)

执行该段代码时候遇见此问题,参考https://blog.csdn.net/weixin_44338329/article/details/130293396,很多人遇见该问题至今并未解决。我已经测试过很多版本了。
9b7d09e5b398506751f6343797f469d

Your Environment (please complete the following information):

  • OS:win10
  • Compiler: vs2022
  • PCL Version:pcl1.10.1,pcl1.13.1,pcl1.14.1,
@wangzhenlin123 wangzhenlin123 added kind: bug Type of issue status: triage Labels incomplete labels Dec 10, 2024
@wangzhenlin123
Copy link
Author

我采用vs2017,c++11,pcl1.9.1运行都正常,采用高版本c++17和cpl皆出现该问题

@mvieth
Copy link
Member

mvieth commented Dec 10, 2024

@wangzhenlin123 Please post your question and your comment in English. We do not offer support in Chinese.

@wangzhenlin123
Copy link
Author

@wangzhenlin123 Please post your question and your comment in English. We do not offer support in Chinese.
pcl::PassThroughpcl::PointXYZ pass; pass.setInputCloud(cloud); pass.setFilterFieldName("z"); pass.setFilterLimits(0.0, 10.0); pass.filter(*cloud_cut)

hello,I've tested VS2017, C++11, and PCL 1.9.1, and everything runs fine. However, when using higher versions like PCL 1.10.1, PCL 1.13.1, and PCL 1.14.1,c++17, the problem occurs.
image

@mvieth
Copy link
Member

mvieth commented Dec 11, 2024

@wangzhenlin123 The error message comes from here: https://github.com/PointCloudLibrary/pcl/blob/master/common/include/pcl/impl/pcl_base.hpp#L164
3721543846 indices need almost 14 GB of memory (RAM). Did you check if that much was available when you run the program? Is it correct that your point cloud has 3721543846 points (3.7 billion)?

@wangzhenlin123
Copy link
Author

wangzhenlin123 commented Dec 11, 2024

@wangzhenlin123 The error message comes from here: https://github.com/PointCloudLibrary/pcl/blob/master/common/include/pcl/impl/pcl_base.hpp#L164 3721543846 indices need almost 14 GB of memory (RAM). Did you check if that much was available when you run the program? Is it correct that your point cloud has 3721543846 points (3.7 billion)?

Thank you for your reply. In fact, there are only 52928 data points, so there aren't as many as indicated. I'm also puzzled why it shows so many.

@wangzhenlin123
Copy link
Author

@wangzhenlin123 The error message comes from here: https://github.com/PointCloudLibrary/pcl/blob/master/common/include/pcl/impl/pcl_base.hpp#L164 3721543846 indices need almost 14 GB of memory (RAM). Did you check if that much was available when you run the program? Is it correct that your point cloud has 3721543846 points (3.7 billion)?

1733917287531

@mvieth
Copy link
Member

mvieth commented Dec 11, 2024

@wangzhenlin123 Do you use CMake? If not, there are two things that might cause this problem:

  • You build your code in Release configuration, but link the PCL Debug libraries, or the other way around, you build your code in Debug configuration, but link the PCL Release libraries
  • You set incorrect architecture options (SSE, AVX), which lead to wrong alignment of data structures. These have to match the ones used within PCL

CMake automatically handles all of this, which is why we recommend using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Type of issue status: triage Labels incomplete
Projects
None yet
Development

No branches or pull requests

2 participants