Open3D函数中的特征密集存储分割故障



我需要使用Open3D库在PointCloud上进行一些操作,但这会给我带来Segmentation Fault,调试器也不会提供太多有关该问题的信息。这很奇怪,因为同样的代码在Windows上也能工作,但在Ubuntu上却出现了这样的错误。

GDB回溯输出:

#0  0x00005555555f5c77 in open3d::geometry::Geometry3D::ComputeMinBound(std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&) const (this=0x7fffffffd250, points=...) at /home/rufus/Open3D/cpp/open3d/geometry/Geometry3D.cpp:50
#1  0x000055555561d951 in open3d::geometry::PointCloud::GetMinBound() const (this=<optimized out>) at /home/rufus/Open3D/cpp/open3d/geometry/PointCloud.cpp:52
#2  0x0000555555622dcd in open3d::geometry::PointCloud::VoxelDownSample(double) const (this=0x7fffffffd250, voxel_size=0.01) at /home/rufus/Open3D/cpp/open3d/geometry/PointCloud.cpp:312
#3  0x000055555557a690 in colorCloudRegistrationOptimization(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const>, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const>, Eigen::Matrix<double, 4, 4, 0, 4, 4> const&) ()
#4  0x000055555557d569 in main ()

Valgrind输出:

==7030== Process terminating with default action of signal 11 (SIGSEGV)
==7030==  Access not within mapped region at address 0x10
==7030==    at 0x1A9C47: DenseStorage (DenseStorage.h:194)
==7030==    by 0x1A9C47: PlainObjectBase (PlainObjectBase.h:520)
==7030==    by 0x1A9C47: Matrix (Matrix.h:413)
==7030==    by 0x1A9C47: open3d::geometry::Geometry3D::ComputeMinBound(std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&) const (Geometry3D.cpp:50)
==7030==    by 0x1D1920: open3d::geometry::PointCloud::GetMinBound() const (PointCloud.cpp:52)
==7030==    by 0x1D6D9C: open3d::geometry::PointCloud::VoxelDownSample(double) const (PointCloud.cpp:312)
==7030==    by 0x12E68F: colorCloudRegistrationOptimization(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const>, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const>, Eigen::Matrix<double, 4, 4, 0, 4, 4> const&) (in /home/rufus/HoloportationLinuxPart/san_holo/build/san_holo

我试着用EIGEN_DONT_ALIGN_STATICALLY编译它,但结果是一样的。

由于Valgrind报告的地址非常低0x10,我认为您使用的是指向对象或未初始化对象的NULL指针。

最新更新