correspondence_grouping segfault at Feature::compute

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

correspondence_grouping segfault at Feature::compute

peter9606
Hi, Experts,

I was trying to go through "3D Object Recognition based on Correspondence Grouping" sample from http://pointclouds.org/documentation/tutorials/correspondence_grouping.php but met segment fault. What I did is just download sample code, sample pcd files, make and run.

My environment:
Ubuntu 16.04
PCL: commit : 6fb1b65d3099a915255b070269b1ac78ed384921
libeigen3-dev: 3.3~beta1-2

Here is my back trace:
(gdb) set args milk.pcd milk_cartoon_all_small_clorox.pcd
(gdb) run
Starting program: /home/peter/study/pcl/rec/correspondence_grouping milk.pcd milk_cartoon_all_small_clorox.pcd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Failed to find match for field 'rgba'.
[New Thread 0x7fffd7979700 (LWP 7688)]
[New Thread 0x7fffd7178700 (LWP 7689)]
[New Thread 0x7fffd6977700 (LWP 7690)]
[New Thread 0x7fffd6176700 (LWP 7691)]
[New Thread 0x7fffd5975700 (LWP 7692)]
[New Thread 0x7fffd5174700 (LWP 7693)]
[New Thread 0x7fffd4973700 (LWP 7694)]
Model total points: 13704; Selected Keypoints: 739
Scene total points: 307200; Selected Keypoints: 3747

Thread 1 "correspondence_" received signal SIGSEGV, Segmentation fault.
0x00007ffff7887966 in void Eigen::internal::pstore<float, float __vector>(float*, float __vector const&) () from /usr/local/lib/libpcl_common.so.1.8
(gdb) bt
#0  0x00007ffff7887966 in void Eigen::internal::pstore<float, float __vector>(float*, float __vector const&) () from /usr/local/lib/libpcl_common.so.1.8
#1  0x00007ffff788f639 in void Eigen::internal::assign_op<float>::assignPacket<32, float __vector>(float*, float __vector const&) const ()
   from /usr/local/lib/libpcl_common.so.1.8
#2  0x00007ffff6583739 in void Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::interen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::assign_op<float>, 0>::assignPacket<32or>(long) () from /usr/local/lib/libpcl_filters.so.1.8
#3  0x00007ffff6580468 in Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::ass 3, 0>::run(Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator<EigeEigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::assign_op<float>, 0>&) () from /usr/local/lib/libpcl_fil
#4  0x00007ffff657c88c in void Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::CwiseNullaryOp<Eigen::internt_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.8
#5  0x00007ffff6579585 in Eigen::internal::Assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, E, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float>, Eigen::internal::Dense2Dense, float>::run(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOpscalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.
#6  0x00007ffff6576265 in void Eigen::internal::call_assignment_no_alias<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_coEigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalat>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.8
#7  0x00007ffff65a5432 in void Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_optrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constan::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eig<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator_traits<Eigen::CwiseNullaryOp<Eigen::internal::sfloat>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >::Shape>::value, void*>::type) () from /usr/local/lib/libpcl_filters.so.1.8
#8  0x00007ffff65a3cf5 in void Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_optrix<float, -1, 1, 0, -1, 1> > >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float,  const&) () from /usr/local/lib/libpcl_filters.so.1.8
#9  0x00007ffff65a31f5 in Eigen::Matrix<float, -1, 1, 0, -1, 1>& Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::_set<Eigen::CwiseNullaryOp<Eiger_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >(Eigen::DenseBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix-1, 1> > > const&) () from /usr/local/lib/libpcl_filters.so.1.8
#10 0x00007ffff65a2309 in Eigen::Matrix<float, -1, 1, 0, -1, 1>& Eigen::Matrix<float, -1, 1, 0, -1, 1>::operator=<Eigen::CwiseNullaryOp<Eigen::internal::scalar_, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >(Eigen::DenseBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1
    () from /usr/local/lib/libpcl_filters.so.1.8
#11 0x00007ffff65a3380 in Eigen::DenseBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::setConstant(float const&) () from /usr/local/lib/libpcl_filters.so.1.8
#12 0x00007ffff2c8284a in Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::setZero(long) () from /usr/local/lib/libpcl_features.so.1.8
#13 0x00007ffff3953e75 in pcl::SHOTEstimationOMP<pcl::PointXYZRGBA, pcl::Normal, pcl::SHOT352, pcl::ReferenceFrame>::computeFeature(pcl::PointCloud<pcl::SHOT352n.18] () from /usr/local/lib/libpcl_features.so.1.8
#14 0x00007fffea78ecbf in GOMP_parallel () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#15 0x00007ffff3b6f832 in pcl::SHOTEstimationOMP<pcl::PointXYZRGBA, pcl::Normal, pcl::SHOT352, pcl::ReferenceFrame>::computeFeature(pcl::PointCloud<pcl::SHOT352
   from /usr/local/lib/libpcl_features.so.1.8
#16 0x000000000050568d in pcl::Feature<pcl::PointXYZRGBA, pcl::SHOT352>::compute (this=0x7fffffffd390, output=...)
    at /usr/local/include/pcl-1.8/pcl/features/impl/feature.hpp:220
#17 0x00000000004f9f31 in main (argc=3, argv=0x7fffffffd8e8) at /home/peter/study/pcl/rec/correspondence_grouping.cpp:251
(gdb)


Thanks,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

peter9606
When running the follow up global-hypothesis-verification sample, a related segment fault happened. Detail back trace is as following:

(gdb) set args milk.pcd milk_cartoon_all_small_clorox.pcd
(gdb)
(gdb) run
Starting program: /home/peter/study/pcl/very/global_hypothesis_verification milk.pcd milk_cartoon_all_small_clorox.pcd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Failed to find match for field 'rgba'.
[New Thread 0x7fffd7979700 (LWP 8848)]
[New Thread 0x7fffd7178700 (LWP 8849)]
[New Thread 0x7fffd6977700 (LWP 8850)]
[New Thread 0x7fffd6176700 (LWP 8851)]
[New Thread 0x7fffd5975700 (LWP 8852)]
[New Thread 0x7fffd5174700 (LWP 8853)]
[New Thread 0x7fffd4973700 (LWP 8854)]
Model total points: 13704; Selected Keypoints: 206
Scene total points: 307200; Selected Keypoints: 7756

Thread 1 "global_hypothes" received signal SIGSEGV, Segmentation fault.
0x00007ffff7887966 in void Eigen::internal::pstore<float, float __vector>(float*, float __vector const&) () from /usr/local/lib/libpcl_common.so.1.8
(gdb) bt
#0  0x00007ffff7887966 in void Eigen::internal::pstore<float, float __vector>(float*, float __vector const&) () from /usr/local/lib/libpcl_common.so.1.8
#1  0x00007ffff788f639 in void Eigen::internal::assign_op<float>::assignPacket<32, float __vector>(float*, float __vector const&) const ()
   from /usr/local/lib/libpcl_common.so.1.8
#2  0x00007ffff6583739 in void Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::assign_op<float>, 0>::assignPacket<32, 32, float __vector>(long) () from /usr/local/lib/libpcl_filters.so.1.8
#3  0x00007ffff6580468 in Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::assign_op<float>, 0>, 3, 0>::run(Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >, Eigen::internal::assign_op<float>, 0>&) () from /usr/local/lib/libpcl_filters.so.1.8
#4  0x00007ffff657c88c in void Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.8
#5  0x00007ffff6579585 in Eigen::internal::Assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float>, Eigen::internal::Dense2Dense, float>::run(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.8
#6  0x00007ffff6576265 in void Eigen::internal::call_assignment_no_alias<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&) () from /usr/local/lib/libpcl_filters.so.1.8
#7  0x00007ffff65a5432 in void Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::assign_op<float> >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&, Eigen::internal::assign_op<float> const&, Eigen::internal::enable_if<!Eigen::internal::evaluator_assume_aliasing<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >, Eigen::internal::evaluator_traits<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >::Shape>::value, void*>::type) () from /usr/local/lib/libpcl_filters.so.1.8
#8  0x00007ffff65a3cf5 in void Eigen::internal::call_assignment<Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >(Eigen::Matrix<float, -1, 1, 0, -1, 1>&, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > const&) () from /usr/local/lib/libpcl_filters.so.1.8
#9  0x00007ffff65a31f5 in Eigen::Matrix<float, -1, 1, 0, -1, 1>& Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::_set<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >(Eigen::DenseBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > > const&) () from /usr/local/lib/libpcl_filters.so.1.8
#10 0x00007ffff65a2309 in Eigen::Matrix<float, -1, 1, 0, -1, 1>& Eigen::Matrix<float, -1, 1, 0, -1, 1>::operator=<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > >(Eigen::DenseBase<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<float>, Eigen::Matrix<float, -1, 1, 0, -1, 1> > > const&)
    () from /usr/local/lib/libpcl_filters.so.1.8
#11 0x00007ffff65a3380 in Eigen::DenseBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::setConstant(float const&) () from /usr/local/lib/libpcl_filters.so.1.8
#12 0x00007ffff2c8284a in Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >::setZero(long) () from /usr/local/lib/libpcl_features.so.1.8
#13 0x00007ffff3953e75 in pcl::SHOTEstimationOMP<pcl::PointXYZRGBA, pcl::Normal, pcl::SHOT352, pcl::ReferenceFrame>::computeFeature(pcl::PointCloud<pcl::SHOT352>&) [clone ._omp_fn.18] () from /usr/local/lib/libpcl_features.so.1.8
#14 0x00007fffea78ecbf in GOMP_parallel () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#15 0x00007ffff3b6f832 in pcl::SHOTEstimationOMP<pcl::PointXYZRGBA, pcl::Normal, pcl::SHOT352, pcl::ReferenceFrame>::computeFeature(pcl::PointCloud<pcl::SHOT352>&) ()
   from /usr/local/lib/libpcl_features.so.1.8
#16 0x00000000005f773d in pcl::Feature<pcl::PointXYZRGBA, pcl::SHOT352>::compute (this=0x7fffffffd450, output=...)
    at /usr/local/include/pcl-1.8/pcl/features/impl/feature.hpp:220
#17 0x00000000005e76ab in main (argc=3, argv=0x7fffffffd8d8) at /home/peter/study/pcl/very/global_hypothesis_verification.cpp:284
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

neeravbm
This post has NOT been accepted by the mailing list yet.
In reply to this post by peter9606
I am facing the same issue. It seems to be related to alignment in Eigen. Please let me know if you have found the solution.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

peter9606
absolutely
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

srivatsamahesh
Hi 

So I have the same problem. 
Potential solution is in this link below.  Seems to be some pcl and c++11 compatibility issue. I haven't tried out as yet but just FYI. 


Hope this works. Let me know

Srivatsa

On 10-Apr-2017, at 6:27 AM, peter9606 <[hidden email]> wrote:

absolutely



--
View this message in context: http://www.pcl-users.org/correspondence-grouping-segfault-at-Feature-compute-tp4044171p4044274.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

stanly
This post has NOT been accepted by the mailing list yet.
Had some problem with fpfh features. Did you build pnc yourself? If so, have you done it with release configuration? And as srivatsamahesh suggests, i also added following line to CMakeLists.txt of PCL

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

srivatsamahesh
stanly wrote
Had some problem with fpfh features. Did you build pnc yourself? If so, have you done it with release configuration? And as srivatsamahesh suggests, i also added following line to CMakeLists.txt of PCL

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
So i tried this out. Built pcl1.7.2 from source by following the below instructions
http://pointclouds.org/documentation/tutorials/compiling_pcl_posix.php

according to this issue below, if you compile from source the problem shouldnt occur.. but it still does
https://github.com/lovepark/libo3d3xx/issues/7

did you have any luck?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

stanly
This post has NOT been accepted by the mailing list yet.
I was building trunk (PCL 1.8). Do you need to use 1.7.2?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: correspondence_grouping segfault at Feature::compute

srivatsamahesh
So this issue got resolved just by reinstalling Ubuntu. It seems i may have downloaded/installed/deleted etc libraries that could have screwed up the whole dependencies.

Also, for ROS, instead of catkin_make, im using catkin build now. dont know if that has made any difference.

Loading...