【发布时间】:2015-03-19 00:19:41
【问题描述】:
我在运行 Ubuntu 13.04 的 ARM 处理器上运行移动最小二乘代码时遇到运行时问题, 从github手动编译最新的pcl 1.7.2。
在第 266 行崩溃了一个双重释放错误 surface/include/pcl/surface/impl/mls.hpp
其他相关包:
LibBoost 版本 1.49.0.1
FLANN 版本 1.7.1-4
特征 3.1.2-1
相同的代码在普通 PC(64 位 Ubuntu 12.04)上正常运行。
我从以下位置抓取并修改了代码: http://pointclouds.org/documentation/tutorials/resampling.php
这是我最终运行的基本代码:
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/surface/mls.h>
using namespace pcl;
using namespace pcl::io;
// ######################################################################
int main(int argc, char **argv)
{
// Load input file into a PointCloud<T> with an appropriate type
PointCloud<PointXYZ>::Ptr cloud (new PointCloud<PointXYZ> ());
pcl::io::loadPCDFile (argv[1], *cloud);
// Create a KD-Tree
pcl::search::KdTree<PointXYZ>::Ptr
tree (new pcl::search::KdTree<PointXYZ>);
// Output has the PointNormal type
// in order to store the normals calculated by MLS
PointCloud<PointNormal> mls_points;
// Init object (second point type is for the normals, even if unused)
pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal> mls;
mls.setComputeNormals (true);
// Set parameters
mls.setInputCloud (cloud);
mls.setPolynomialFit (true);
mls.setSearchMethod (tree);
mls.setSearchRadius (0.03);
// Reconstruct CRASH IN LINE BELOW
mls.process (mls_points);
return EXIT_SUCCESS;
}
下面是 gdb 跟踪。代码在 mls.process 行中崩溃:
randall@odroid:~/pcl_project/build$ gdb --args ../bin/a.out ~/Downloads/pcl-master1.7.2/test/bun0.pcd
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/randall/pcl_project/bin/a.out ...done.
(gdb) run
Starting program: /home/randall/pcl_project/bin/a.out /home/randall/Downloads/pcl-master1.7.2/test/bun0.pcd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Program received signal SIGILL, Illegal instruction.
0xaee3e328 in ?? () from /lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) c
Continuing.
Cannot access memory at address 0x0
*** Error in `/home/randall/pcl_project/bin/a.out': double free or corruption (out): 0x002f1900 ***
Program received signal SIGABRT, Aborted.
__libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
44 ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.
(gdb) bt
#0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
#1 0xb2d8b5fe in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2 0xb2d8de1a in __GI_abort () at abort.c:90
#3 0xb2db19ec in __libc_message (do_abort=2, fmt=0xb2e307c0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#4 0xb2db8752 in malloc_printerr (action=3, str=0xb2e30938 "double free or corruption (out)", ptr=<optimized out>) at malloc.c:4923
#5 0xb2db9192 in _int_free (av=<optimized out>, p=0x2f18f8, have_lock=0) at malloc.c:3779
#6 0xb36b61e2 in aligned_free (ptr=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:227
#7 conditional_aligned_free<true> (ptr=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:299
#8 conditional_aligned_delete_auto<double, true> (ptr=<optimized out>, size=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:425
#9 ~DenseStorage (this=0xbeffe148, __in_chrg=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:200
#10 ~PlainObjectBase (this=0xbeffe148, __in_chrg=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:72
#11 ~Matrix (this=0xbeffe148, __in_chrg=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/Matrix.h:127
#12 ~LLT (this=0xbeffe148, __in_chrg=<optimized out>) at /usr/include/eigen3/Eigen/src/Cholesky/LLT.h:50
#13 pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal>::computeMLSPointNormal (this=this@entry=0xbeffe5e0, index=0, nn_indices=..., nn_sqr_dists=...,
projected_points=..., projected_points_normals=..., corresponding_input_indices=..., mls_result=...)
at /home/randall/Downloads/pcl-master1.7.2/surface/include/pcl/surface/impl/mls.hpp:266
#14 0xb36b6d78 in pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal>::performProcessing (this=0xbeffe5e0, output=...)
at /home/randall/Downloads/pcl-master1.7.2/surface/include/pcl/surface/impl/mls.hpp:489
#15 0xb36860d2 in pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal>::process (this=0xbeffe5e0, output=...)
at /home/randall/Downloads/pcl-master1.7.2/surface/include/pcl/surface/impl/mls.hpp:133
#16 0x001d28c4 in main (argc=2, argv=0xbefff1a4) at /home/randall/pcl_project/src/main.C:67
提前谢谢你。
【问题讨论】:
-
您找到“SIGABRT, libc-do-syscall.S: No such file or directory”的解决方案了吗?我在 ARM 架构上运行我的代码并获得相同的 SIGABRT。如果您找到任何解决方案,请分享。
标签: c++ ubuntu arm point-cloud-library