-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.
Description
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
mainbranch).
Describe the issue
The method Feature::SelectByIndex seg faults for any input if the argument invert is set to true.
output is incorrectly assumed to be the same as indices.size()
output->Resize(data_.rows(), indices.size());
and this leads to buffer overruns during copy.
The correct size should be count of true values in the mask (note : indices may not be unique). Alternatively we may use push_back without setting any prior size.
Steps to reproduce the bug
core::Device device = GetParam();
open3d::geometry::PointCloud pcd_legacy;
data::BunnyMesh bunny;
open3d::io::ReadPointCloud(bunny.GetPath(), pcd_legacy);
pcd_legacy.EstimateNormals();
// Convert to float64 to avoid precision loss.
const auto pcd = t::geometry::PointCloud::FromLegacy(pcd_legacy,
core::Float64, device);
const auto fpfh = pipelines::registration::ComputeFPFHFeature(
pcd_legacy, geometry::KDTreeSearchParamHybrid(0.01, 100));
const auto fpfh_t =
t::pipelines::registration::ComputeFPFHFeature(pcd, 100, 0.01);
const auto selected_fpfh =
fpfh->SelectByIndex({53, 194, 839, 2543, 6391, 29483}, true);Error message
Seg fault
Expected behavior
No response
Open3D, Python and System information
- Operating system: Ubuntu 20.04 / macOS 10.15 / Windows 10 64-bit
- Python version: Python 3.8 / output from `import sys; print(sys.version)`
- Open3D version: output from python: `print(open3d.__version__)`
- System architecture: x86 / arm64 / apple-silicon / jetson / rpi
- Is this a remote workstation?: yes or no
- How did you install Open3D?: pip / conda / build from source
- Compiler version (if built from source): gcc 7.5 / clang 7.0Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugNot a build issue, this is likely a bug.Not a build issue, this is likely a bug.