我需要使用Open3D库在PointCloud上做一些操作,但是它会给我分段故障,而调试器没有提供关于这个问题的太多信息。这很奇怪,因为相同的代码可以在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编译它,但结果是一样的。
发布于 2020-11-10 21:06:12
由于Valgrind报告的地址是如此之低的0x10,它让我认为您正在使用指向对象或未初始化的对象的空指针。
https://stackoverflow.com/questions/64769266
复制相似问题