c++ - Open3D 函数中的特征密集存储分段错误
问题描述
我需要使用 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 编译它,但结果是一样的。
解决方案
由于 Valgrind 报告的地址是如此低的 0x10,它让我认为您正在使用指向对象或未初始化对象的 NULL 指针。
推荐阅读
- android - Android 导航返回标题屏幕
- reactjs - 使用 React 路由器的 Azure 静态应用程序路由配置
- kubernetes - 如何在 AKS 的 K8S 集群中强制执行 MustRunAsNonRoot 策略
- c# - 如果我想每次都更改 Referer 标头,就不能使用 GetStringAsync() 吗?
- javascript - 使用 useContext 显示错误:未定义不是对象
- php - Laravel Livewire,如何将选项标签的值发送到wire:model =“ category”?
- python-3.8 - Mypy 和海象算子
- azure-sql-database - 如何在本地服务器上(自动)备份 azure sql 数据库?
- java - 编组/取消编组时 JAXB 翻译元素名称
- python-2.7 - urllib2 中的 CERTIFICATE_VERIFY_FAILED 但不是请求,在 Python 2.7.18