PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.92k stars 4.61k forks source link

[segmentation] SupervoxelClustering extract generates "double free or corruption (out)" in PCL 1.12.X #5457

Closed EngDanielAraujo closed 1 year ago

EngDanielAraujo commented 2 years ago

Describe the bug

When using an extract function from SupervoxelClustering the following error is presented double free or corruption (out)

Context

I'm trying to run the example code Clustering of Pointclouds into Supervoxels for segmenting 3D point clouds in PCD format

Expected behavior

Extract the label map from the supervoxel structure

Current Behavior

When executing the extract method, it returns the error: double free or corruption (out), similarly to the one reported by #2598

Example output:

$ ./supervoxel_clustering ../milk_cartoon_all_small_clorox.pcd --NT
PCL_VERSION: 101201
> Loading point cloud...
> Extracting supervoxels!
double free or corruption (out)

To Reproduce

  1. Download the supervoxel_clustering.cpp exemple, CMakeLists.txt and input point cloud milk_cartoon_all_small_clorox.pcd
  2. Compile the supervoxel_clustering.cpp file
  3. run ./supervoxel_clustering milk_cartoon_all_small_clorox.pcd --NT

Your Environment (please complete the following information):

Additional context

Although in #2598 it was reported that the problem was fixed in version 1.9.0, I am encountering the same problem in newer versions of the library (>=1.12.0).

mvieth commented 2 years ago

So far, I can't reproduce your problem. Can you run the program with valgrind, like this: valgrind ./supervoxel_clustering milk_cartoon_all_small_clorox.pcd --NT

EngDanielAraujo commented 2 years ago

Hi, thanks for replying. Here is the output of running with valgrind:

$ valgrind ./supervoxel_clustering ../milk_cartoon_all_small_clorox.pcd --NT
==14961== Memcheck, a memory error detector
==14961== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==14961== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==14961== Command: ./supervoxel_clustering ../milk_cartoon_all_small_clorox.pcd --NT
==14961== 
PCL_VERSION: 101201
> Loading point cloud...
> Extracting supervoxels!
==14961== Invalid read of size 8
==14961==    at 0x539C92E: handmade_aligned_free (Memory.h:118)
==14961==    by 0x539C92E: aligned_free (Memory.h:206)
==14961==    by 0x539C92E: deallocate (Memory.h:921)
==14961==    by 0x539C92E: deallocate (alloc_traits.h:345)
==14961==    by 0x539C92E: _M_deallocate (stl_vector.h:354)
==14961==    by 0x539C92E: ~_Vector_base (stl_vector.h:335)
==14961==    by 0x539C92E: ~vector (stl_vector.h:683)
==14961==    by 0x539C92E: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::selectInitialSupervoxelSeeds(std::vector<int, std::allocator<int> >&) (supervoxel_clustering.hpp:415)
==14961==    by 0x539D887: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:117)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961==  Address 0x17651078 is 8 bytes before a block of size 16,384 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x122E2D: Eigen::aligned_allocator<pcl::PointXYZRGBA>::allocate(unsigned long, void const*) (Memory.h:916)
==14961==    by 0x12181D: std::allocator_traits<Eigen::aligned_allocator<pcl::PointXYZRGBA> >::allocate(Eigen::aligned_allocator<pcl::PointXYZRGBA>&, unsigned long) (alloc_traits.h:318)
==14961==    by 0x11FC01: std::_Vector_base<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >::_M_allocate(unsigned long) (stl_vector.h:346)
==14961==    by 0x11D312: void std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >::_M_realloc_insert<pcl::PointXYZRGBA const&>(__gnu_cxx::__normal_iterator<pcl::PointXYZRGBA*, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> > >, pcl::PointXYZRGBA const&) (vector.tcc:440)
==14961==    by 0x539C306: push_back (stl_vector.h:1198)
==14961==    by 0x539C306: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:951)
==14961==    by 0x539C2B4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:943)
==14961==    by 0x539C2B4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:943)
==14961==    by 0x539C2B4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:943)
==14961==    by 0x539C2B4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:943)
==14961==    by 0x539C2B4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::getOccupiedVoxelCentersRecursive(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty> const*, pcl::octree::OctreeKey const&, std::vector<pcl::PointXYZRGBA, Eigen::aligned_allocator<pcl::PointXYZRGBA> >&) const (octree_pointcloud.hpp:943)
==14961== 
==14961== Invalid read of size 8
==14961==    at 0x537CF4A: handmade_aligned_free (Memory.h:118)
==14961==    by 0x537CF4A: aligned_free (Memory.h:206)
==14961==    by 0x537CF4A: conditional_aligned_free<true> (Memory.h:259)
==14961==    by 0x537CF4A: operator delete (octree_nodes.h:171)
==14961==    by 0x537CF4A: pcl::octree::OctreeLeafNode<pcl::octree::OctreeContainerPointIndices>::~OctreeLeafNode() (octree_nodes.h:94)
==14961==    by 0x5375622: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:611)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x537D1E3: deleteBranch (octree_base.h:631)
==14961==    by 0x537D1E3: deleteBranchChild (octree_base.h:604)
==14961==    by 0x537D1E3: deleteBranch (octree_base.h:631)
==14961==    by 0x537D1E3: deleteTree (octree_base.hpp:166)
==14961==    by 0x537D1E3: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::~OctreeBase() (octree_base.hpp:62)
==14961==    by 0x539C977: ~OctreePointCloud (octree_pointcloud.h:72)
==14961==    by 0x539C977: ~OctreePointCloudSearch (octree_search.h:57)
==14961==    by 0x539C977: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::selectInitialSupervoxelSeeds(std::vector<int, std::allocator<int> >&) (supervoxel_clustering.hpp:415)
==14961==    by 0x539D887: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:117)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961==  Address 0x175f6948 is 8 bytes before a block of size 40 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x538EF61: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x538EF61: operator new (octree_nodes.h:171)
==14961==    by 0x538EF61: createLeafChild (octree_base.h:656)
==14961==    by 0x538EF61: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::createLeafRecursive(pcl::octree::OctreeKey const&, unsigned int, pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>*, pcl::octree::OctreeLeafNode<pcl::octree::OctreeContainerPointIndices>*&, pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>*&) (octree_base.hpp:315)
==14961==    by 0x539BF90: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty> >::addPointIdx(unsigned int) (octree_pointcloud.hpp:634)
==14961==    by 0x539CB93: addPointsFromInputCloud (octree_pointcloud.hpp:95)
==14961==    by 0x539CB93: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::selectInitialSupervoxelSeeds(std::vector<int, std::allocator<int> >&) (supervoxel_clustering.hpp:372)
==14961==    by 0x539D887: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:117)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x5375622: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:611)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x5375613: deleteBranch (octree_base.h:631)
==14961==    by 0x5375613: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x537D1E3: deleteBranch (octree_base.h:631)
==14961==    by 0x537D1E3: deleteBranchChild (octree_base.h:604)
==14961==    by 0x537D1E3: deleteBranch (octree_base.h:631)
==14961==    by 0x537D1E3: deleteTree (octree_base.hpp:166)
==14961==    by 0x537D1E3: pcl::octree::OctreeBase<pcl::octree::OctreeContainerPointIndices, pcl::octree::OctreeContainerEmpty>::~OctreeBase() (octree_base.hpp:62)
==14961==    by 0x539C977: ~OctreePointCloud (octree_pointcloud.h:72)
==14961==    by 0x539C977: ~OctreePointCloudSearch (octree_search.h:57)
==14961==    by 0x539C977: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::selectInitialSupervoxelSeeds(std::vector<int, std::allocator<int> >&) (supervoxel_clustering.hpp:415)
==14961==    by 0x539D887: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:117)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961==  Address 0x4bba00004bbf is not stack'd, malloc'd or (recently) free'd
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x12B572: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x5393134: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x5393134: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x5393134: reset<pcl::PointCloud<pcl::PointXYZRGBA> > (shared_ptr_base.h:1280)
==14961==    by 0x5393134: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::SupervoxelHelper::getVoxels(std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >&) const (supervoxel_clustering.hpp:890)
==14961==    by 0x539D53E: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::makeSupervoxels(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:333)
==14961==    by 0x539D8BB: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:129)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961==  Address 0x123f7ec0 is 16 bytes inside a block of size 160 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x539D0E9: handmade_aligned_malloc (Memory.h:105)
==14961==    by 0x539D0E9: aligned_malloc (Memory.h:188)
==14961==    by 0x539D0E9: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x539D0E9: operator new (point_cloud.h:900)
==14961==    by 0x539D0E9: Supervoxel (supervoxel_clustering.h:71)
==14961==    by 0x539D0E9: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::makeSupervoxels(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:329)
==14961==    by 0x539D8BB: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:129)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
> Teste
Found 423 supervoxels
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x12B572: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x5395FB4: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x5395FB4: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x5395FB4: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x5395FB4: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:560)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961==  Address 0x16eaff00 is 32 bytes inside a block of size 160 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x539306D: handmade_aligned_malloc (Memory.h:105)
==14961==    by 0x539306D: aligned_malloc (Memory.h:188)
==14961==    by 0x539306D: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x539306D: operator new (point_cloud.h:900)
==14961==    by 0x539306D: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::SupervoxelHelper::getVoxels(std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >&) const (supervoxel_clustering.hpp:890)
==14961==    by 0x5395E7D: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:563)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961== 
==14961== Invalid read of size 8
==14961==    at 0x5377566: handmade_aligned_free (Memory.h:118)
==14961==    by 0x5377566: aligned_free (Memory.h:206)
==14961==    by 0x5377566: deallocate (Memory.h:921)
==14961==    by 0x5377566: deallocate (alloc_traits.h:345)
==14961==    by 0x5377566: _M_deallocate (stl_vector.h:354)
==14961==    by 0x5377566: void std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> >::_M_range_insert<__gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > >(__gnu_cxx::__normal_iterator<pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, std::forward_iterator_tag) [clone .isra.0] (vector.tcc:796)
==14961==    by 0x5395F53: _M_insert_dispatch<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1665)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1383)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (point_cloud.h:769)
==14961==    by 0x5395F53: concatenate (point_cloud.h:239)
==14961==    by 0x5395F53: operator+= (point_cloud.h:216)
==14961==    by 0x5395F53: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:571)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961==  Address 0x16e15ff8 is 8 bytes before a block of size 2,208 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x5377660: allocate (Memory.h:916)
==14961==    by 0x5377660: allocate (alloc_traits.h:318)
==14961==    by 0x5377660: _M_allocate (stl_vector.h:346)
==14961==    by 0x5377660: void std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> >::_M_range_insert<__gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > >(__gnu_cxx::__normal_iterator<pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, std::forward_iterator_tag) [clone .isra.0] (vector.tcc:769)
==14961==    by 0x5395F53: _M_insert_dispatch<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1665)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1383)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (point_cloud.h:769)
==14961==    by 0x5395F53: concatenate (point_cloud.h:239)
==14961==    by 0x5395F53: operator+= (point_cloud.h:216)
==14961==    by 0x5395F53: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:571)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x537756E: handmade_aligned_free (Memory.h:118)
==14961==    by 0x537756E: aligned_free (Memory.h:206)
==14961==    by 0x537756E: deallocate (Memory.h:921)
==14961==    by 0x537756E: deallocate (alloc_traits.h:345)
==14961==    by 0x537756E: _M_deallocate (stl_vector.h:354)
==14961==    by 0x537756E: void std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> >::_M_range_insert<__gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > >(__gnu_cxx::__normal_iterator<pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, std::forward_iterator_tag) [clone .isra.0] (vector.tcc:796)
==14961==    by 0x5395F53: _M_insert_dispatch<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1665)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1383)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (point_cloud.h:769)
==14961==    by 0x5395F53: concatenate (point_cloud.h:239)
==14961==    by 0x5395F53: operator+= (point_cloud.h:216)
==14961==    by 0x5395F53: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:571)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961==  Address 0x7d4400007d9c is not stack'd, malloc'd or (recently) free'd
==14961== 
> Getting supervoxel adjacency
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190B62B: ftc_cache_add (ftccache.c:431)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190BE75: vtkfreetype_FTC_CMapCache_Lookup (ftccmap.c:268)
==14961==    by 0xD255606: vtkFreeTypeTools::GetGlyphIndex(unsigned long, unsigned int, unsigned int*) (vtkFreeTypeTools.cxx:837)
==14961==    by 0xD25DABC: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2294)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961==    by 0x5AFD7DF: vtkTextRenderer::RenderString(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkTextRenderer.h:225)
==14961== 
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190D036: FTC_Manager_Compress (ftcmanag.c:555)
==14961==    by 0x1190B64D: ftc_cache_add (ftccache.c:434)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190BE75: vtkfreetype_FTC_CMapCache_Lookup (ftccmap.c:268)
==14961==    by 0xD255606: vtkFreeTypeTools::GetGlyphIndex(unsigned long, unsigned int, unsigned int*) (vtkFreeTypeTools.cxx:837)
==14961==    by 0xD25DABC: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2294)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961== 
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190B62B: ftc_cache_add (ftccache.c:431)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190A028: vtkfreetype_FTC_ImageCache_LookupScaler (ftcbasic.c:413)
==14961==    by 0xD256398: vtkFreeTypeTools::GetGlyph(FTC_ScalerRec_*, unsigned int, FT_GlyphRec_**, int) (vtkFreeTypeTools.cxx:935)
==14961==    by 0xD25DAEA: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2301)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961==    by 0x5AFD7DF: vtkTextRenderer::RenderString(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkTextRenderer.h:225)
==14961== 
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190D036: FTC_Manager_Compress (ftcmanag.c:555)
==14961==    by 0x1190B64D: ftc_cache_add (ftccache.c:434)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190A028: vtkfreetype_FTC_ImageCache_LookupScaler (ftcbasic.c:413)
==14961==    by 0xD256398: vtkFreeTypeTools::GetGlyph(FTC_ScalerRec_*, unsigned int, FT_GlyphRec_**, int) (vtkFreeTypeTools.cxx:935)
==14961==    by 0xD25DAEA: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2301)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961== 
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190D0AA: FTC_Manager_Compress (ftcmanag.c:572)
==14961==    by 0x1190B64D: ftc_cache_add (ftccache.c:434)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190A028: vtkfreetype_FTC_ImageCache_LookupScaler (ftcbasic.c:413)
==14961==    by 0xD256398: vtkFreeTypeTools::GetGlyph(FTC_ScalerRec_*, unsigned int, FT_GlyphRec_**, int) (vtkFreeTypeTools.cxx:935)
==14961==    by 0xD25DAEA: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2301)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961== 
==14961== Conditional jump or move depends on uninitialised value(s)
==14961==    at 0x1190D0AA: FTC_Manager_Compress (ftcmanag.c:572)
==14961==    by 0x1190B64D: ftc_cache_add (ftccache.c:434)
==14961==    by 0x1190B741: FTC_Cache_NewNode (ftccache.c:470)
==14961==    by 0x1190BE75: vtkfreetype_FTC_CMapCache_Lookup (ftccmap.c:268)
==14961==    by 0xD255606: vtkFreeTypeTools::GetGlyphIndex(unsigned long, unsigned int, unsigned int*) (vtkFreeTypeTools.cxx:837)
==14961==    by 0xD25DABC: vtkFreeTypeTools::GetBitmap(unsigned int, FTC_ScalerRec_*, unsigned int&, FT_BitmapGlyphRec_*&) (vtkFreeTypeTools.cxx:2294)
==14961==    by 0xD25DD4F: vtkFreeTypeTools::GetLineMetrics(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, vtkFreeTypeTools::MetaData&, int&, int*) (vtkFreeTypeTools.cxx:2383)
==14961==    by 0xD259C3B: vtkFreeTypeTools::CalculateBoundingBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vtkFreeTypeTools::MetaData&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vtkFreeTypeTools.cxx:1352)
==14961==    by 0xD259989: vtkFreeTypeTools::CalculateBoundingBox(vtkStdString const&, vtkFreeTypeTools::MetaData&) (vtkFreeTypeTools.cxx:1324)
==14961==    by 0xD25808A: vtkFreeTypeTools::RenderStringInternal(vtkTextProperty*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:1197)
==14961==    by 0xD2528BF: vtkFreeTypeTools::RenderString(vtkTextProperty*, vtkStdString const&, int, vtkImageData*, int*) (vtkFreeTypeTools.cxx:550)
==14961==    by 0xD269373: vtkMathTextFreeTypeTextRenderer::RenderStringInternal(vtkTextProperty*, vtkStdString const&, vtkImageData*, int*, int, int) (vtkMathTextFreeTypeTextRenderer.cxx:216)
==14961== 
Clipping plane [near,far] 4.02949, 7.67671
Focal point [x,y,z] 0.045847, 0.324889, -1.28296
Position [x,y,z] 0.045847, 0.324889, 4.35518
View up [x,y,z] 0, 1, 0
Camera view angle [degrees] 30
Window size [x,y] 1846, 540
Window position [x,y] 10, 45
==14961== Invalid read of size 8
==14961==    at 0x52FEE77: handmade_aligned_free (Memory.h:118)
==14961==    by 0x52FEE77: aligned_free (Memory.h:206)
==14961==    by 0x52FEE77: deallocate (Memory.h:921)
==14961==    by 0x52FEE77: deallocate (alloc_traits.h:345)
==14961==    by 0x52FEE77: _M_deallocate (stl_vector.h:354)
==14961==    by 0x52FEE77: ~_Vector_base (stl_vector.h:335)
==14961==    by 0x52FEE77: ~vector (stl_vector.h:683)
==14961==    by 0x52FEE77: ~PointCloud (point_cloud.h:172)
==14961==    by 0x52FEE77: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZL>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115C03: std::__shared_ptr<pcl::PointCloud<pcl::PointXYZL>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115C23: std::shared_ptr<pcl::PointCloud<pcl::PointXYZL> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x113C9A: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x2e247038 is 8 bytes before a block of size 1,879,552 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x5377660: allocate (Memory.h:916)
==14961==    by 0x5377660: allocate (alloc_traits.h:318)
==14961==    by 0x5377660: _M_allocate (stl_vector.h:346)
==14961==    by 0x5377660: void std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> >::_M_range_insert<__gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > >(__gnu_cxx::__normal_iterator<pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, __gnu_cxx::__normal_iterator<pcl::PointXYZL const*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > >, std::forward_iterator_tag) [clone .isra.0] (vector.tcc:769)
==14961==    by 0x5395F53: _M_insert_dispatch<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1665)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (stl_vector.h:1383)
==14961==    by 0x5395F53: insert<__gnu_cxx::__normal_iterator<const pcl::PointXYZL*, std::vector<pcl::PointXYZL, Eigen::aligned_allocator<pcl::PointXYZL> > > > (point_cloud.h:769)
==14961==    by 0x5395F53: concatenate (point_cloud.h:239)
==14961==    by 0x5395F53: operator+= (point_cloud.h:216)
==14961==    by 0x5395F53: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:571)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961== 
==14961== Invalid read of size 8
==14961==    at 0x52FEE9A: handmade_aligned_free (Memory.h:118)
==14961==    by 0x52FEE9A: aligned_free (Memory.h:206)
==14961==    by 0x52FEE9A: conditional_aligned_free<true> (Memory.h:259)
==14961==    by 0x52FEE9A: operator delete (point_cloud.h:900)
==14961==    by 0x52FEE9A: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZL>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115C03: std::__shared_ptr<pcl::PointCloud<pcl::PointXYZL>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115C23: std::shared_ptr<pcl::PointCloud<pcl::PointXYZL> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x113C9A: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x16eafdb8 is 8 bytes before a block of size 128 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x5395DD1: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x5395DD1: operator new (point_cloud.h:900)
==14961==    by 0x5395DD1: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getLabeledVoxelCloud() const (supervoxel_clustering.hpp:559)
==14961==    by 0x1137F8: main (supervoxel_clustering.cpp:102)
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115C03: std::__shared_ptr<pcl::PointCloud<pcl::PointXYZL>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115C23: std::shared_ptr<pcl::PointCloud<pcl::PointXYZL> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x113C9A: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x7f7b00007f78 is not stack'd, malloc'd or (recently) free'd
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x12B572: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115AB7: std::__shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115AD7: std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x113CA9: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x16d3ff40 is 16 bytes inside a block of size 160 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x539326D: handmade_aligned_malloc (Memory.h:105)
==14961==    by 0x539326D: aligned_malloc (Memory.h:188)
==14961==    by 0x539326D: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x539326D: operator new (point_cloud.h:900)
==14961==    by 0x539326D: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::getVoxelCentroidCloud() const (supervoxel_clustering.hpp:550)
==14961==    by 0x113632: main (supervoxel_clustering.cpp:97)
==14961== 
==14961== Invalid read of size 8
==14961==    at 0x52FED87: handmade_aligned_free (Memory.h:118)
==14961==    by 0x52FED87: aligned_free (Memory.h:206)
==14961==    by 0x52FED87: deallocate (Memory.h:921)
==14961==    by 0x52FED87: deallocate (alloc_traits.h:345)
==14961==    by 0x52FED87: _M_deallocate (stl_vector.h:354)
==14961==    by 0x52FED87: ~_Vector_base (stl_vector.h:335)
==14961==    by 0x52FED87: ~vector (stl_vector.h:683)
==14961==    by 0x52FED87: ~PointCloud (point_cloud.h:172)
==14961==    by 0x52FED87: std::_Sp_counted_ptr<pcl::PointCloud<pcl::Normal>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x538340B: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x538340B: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x538340B: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x538340B: ~Supervoxel (supervoxel_clustering.h:67)
==14961==    by 0x538340B: std::_Sp_counted_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115D8F: std::__shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115DD9: std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x122C7B: std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >::~pair() (stl_pair.h:211)
==14961==    by 0x122C9F: void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (new_allocator.h:168)
==14961==    by 0x121622: void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (alloc_traits.h:535)
==14961==    by 0x11F7AE: std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >*) (stl_tree.h:623)
==14961==    by 0x11CDAC: std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >*) (stl_tree.h:631)
==14961==  Address 0x17bb80b8 is 8 bytes before a block of size 32 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x5311E86: allocate (Memory.h:916)
==14961==    by 0x5311E86: allocate (alloc_traits.h:318)
==14961==    by 0x5311E86: _M_allocate (stl_vector.h:346)
==14961==    by 0x5311E86: std::vector<pcl::Normal, Eigen::aligned_allocator<pcl::Normal> >::_M_default_append(unsigned long) (vector.tcc:635)
==14961==    by 0x5390B36: resize (stl_vector.h:940)
==14961==    by 0x5390B36: resize (point_cloud.h:464)
==14961==    by 0x5390B36: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::SupervoxelHelper::getNormals(std::shared_ptr<pcl::PointCloud<pcl::Normal> >&) const (supervoxel_clustering.hpp:907)
==14961==    by 0x539D5B6: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::makeSupervoxels(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:334)
==14961==    by 0x539D8BB: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:129)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x52FED8F: handmade_aligned_free (Memory.h:118)
==14961==    by 0x52FED8F: aligned_free (Memory.h:206)
==14961==    by 0x52FED8F: deallocate (Memory.h:921)
==14961==    by 0x52FED8F: deallocate (alloc_traits.h:345)
==14961==    by 0x52FED8F: _M_deallocate (stl_vector.h:354)
==14961==    by 0x52FED8F: ~_Vector_base (stl_vector.h:335)
==14961==    by 0x52FED8F: ~vector (stl_vector.h:683)
==14961==    by 0x52FED8F: ~PointCloud (point_cloud.h:172)
==14961==    by 0x52FED8F: std::_Sp_counted_ptr<pcl::PointCloud<pcl::Normal>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x538340B: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x538340B: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x538340B: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x538340B: ~Supervoxel (supervoxel_clustering.h:67)
==14961==    by 0x538340B: std::_Sp_counted_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115D8F: std::__shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115DD9: std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x122C7B: std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >::~pair() (stl_pair.h:211)
==14961==    by 0x122C9F: void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (new_allocator.h:168)
==14961==    by 0x121622: void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (alloc_traits.h:535)
==14961==    by 0x11F7AE: std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >*) (stl_tree.h:623)
==14961==  Address 0xbfea9fbe is not stack'd, malloc'd or (recently) free'd
==14961== 
==14961== Invalid free() / delete / delete[] / realloc()
==14961==    at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x12B572: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x5383419: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x5383419: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x5383419: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x5383419: ~Supervoxel (supervoxel_clustering.h:67)
==14961==    by 0x5383419: std::_Sp_counted_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x116508: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:705)
==14961==    by 0x115D8F: std::__shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1154)
==14961==    by 0x115DD9: std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >::~shared_ptr() (shared_ptr.h:122)
==14961==    by 0x122C7B: std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >::~pair() (stl_pair.h:211)
==14961==    by 0x122C9F: void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (new_allocator.h:168)
==14961==    by 0x121622: void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >(std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >*) (alloc_traits.h:535)
==14961==    by 0x11F7AE: std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > >*) (stl_tree.h:623)
==14961==  Address 0x16c42f60 is 16 bytes inside a block of size 160 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x539306D: handmade_aligned_malloc (Memory.h:105)
==14961==    by 0x539306D: aligned_malloc (Memory.h:188)
==14961==    by 0x539306D: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x539306D: operator new (point_cloud.h:900)
==14961==    by 0x539306D: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::SupervoxelHelper::getVoxels(std::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >&) const (supervoxel_clustering.hpp:890)
==14961==    by 0x539D53E: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::makeSupervoxels(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:333)
==14961==    by 0x539D8BB: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:129)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
==14961== Invalid read of size 8
==14961==    at 0x537BFEE: handmade_aligned_free (Memory.h:118)
==14961==    by 0x537BFEE: aligned_free (Memory.h:206)
==14961==    by 0x537BFEE: conditional_aligned_free<true> (Memory.h:259)
==14961==    by 0x537BFEE: operator delete (octree_nodes.h:171)
==14961==    by 0x537BFEE: pcl::octree::OctreeLeafNode<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData> >::~OctreeLeafNode() (octree_nodes.h:94)
==14961==    by 0x53770D6: deleteBranchChild (octree_base.h:611)
==14961==    by 0x53770D6: deleteBranch (octree_base.h:631)
==14961==    by 0x53770D6: deleteBranchChild (octree_base.h:604)
==14961==    by 0x53770D6: deleteBranch (octree_base.h:631)
==14961==    by 0x53770D6: pcl::octree::OctreeBase<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x53771BD: deleteBranch (octree_base.h:631)
==14961==    by 0x53771BD: deleteBranchChild (octree_base.h:604)
==14961==    by 0x53771BD: deleteBranch (octree_base.h:631)
==14961==    by 0x53771BD: deleteBranchChild (octree_base.h:604)
==14961==    by 0x53771BD: deleteBranch (octree_base.h:631)
==14961==    by 0x53771BD: deleteBranchChild (octree_base.h:604)
==14961==    by 0x53771BD: deleteBranch (octree_base.h:631)
==14961==    by 0x53771BD: deleteBranchChild (octree_base.h:604)
==14961==    by 0x53771BD: deleteBranch (octree_base.h:631)
==14961==    by 0x53771BD: pcl::octree::OctreeBase<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::deleteBranchChild(pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>&, unsigned char) [clone .isra.0] (octree_base.h:604)
==14961==    by 0x537D603: deleteBranch (octree_base.h:631)
==14961==    by 0x537D603: deleteBranchChild (octree_base.h:604)
==14961==    by 0x537D603: deleteBranch (octree_base.h:631)
==14961==    by 0x537D603: deleteTree (octree_base.hpp:166)
==14961==    by 0x537D603: pcl::octree::OctreeBase<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::~OctreeBase() (octree_base.hpp:62)
==14961==    by 0x5383790: ~OctreePointCloud (octree_pointcloud.h:72)
==14961==    by 0x5383790: ~OctreePointCloudAdjacency (octree_pointcloud_adjacency.h:78)
==14961==    by 0x5383790: pcl::octree::OctreePointCloudAdjacency<pcl::PointXYZRGBA, pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::~OctreePointCloudAdjacency() (octree_pointcloud_adjacency.h:78)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x5383E5E: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x5383E5E: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x5383E5E: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x5383E5E: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::~SupervoxelClustering() (supervoxel_clustering.hpp:63)
==14961==    by 0x113CD6: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x13fec818 is 8 bytes before a block of size 144 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x538C801: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x538C801: operator new (octree_nodes.h:171)
==14961==    by 0x538C801: createLeafChild (octree_base.h:656)
==14961==    by 0x538C801: pcl::octree::OctreeBase<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::createLeafRecursive(pcl::octree::OctreeKey const&, unsigned int, pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>*, pcl::octree::OctreeLeafNode<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData> >*&, pcl::octree::OctreeBranchNode<pcl::octree::OctreeContainerEmpty>*&) (octree_base.hpp:315)
==14961==    by 0x538C979: createLeaf (octree_base.h:486)
==14961==    by 0x538C979: pcl::octree::OctreePointCloudAdjacency<pcl::PointXYZRGBA, pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::addPointIdx(unsigned int) (octree_pointcloud_adjacency.hpp:163)
==14961==    by 0x53875F4: pcl::octree::OctreePointCloud<pcl::PointXYZRGBA, pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty, pcl::octree::OctreeBase<pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty> >::addPointsFromInputCloud() (octree_pointcloud.hpp:95)
==14961==    by 0x53A21E3: pcl::octree::OctreePointCloudAdjacency<pcl::PointXYZRGBA, pcl::octree::OctreePointCloudAdjacencyContainer<pcl::PointXYZRGBA, pcl::SupervoxelClustering<pcl::PointXYZRGBA>::VoxelData>, pcl::octree::OctreeContainerEmpty>::addPointsFromInputCloud() (octree_pointcloud_adjacency.hpp:98)
==14961==    by 0x53A2510: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::prepareForSegmentation() (supervoxel_clustering.hpp:192)
==14961==    by 0x539D835: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:107)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
==14961== Mismatched free() / delete / delete []
==14961==    at 0x484BB6F: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x12B572: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZRGBA>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x4EC2964: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x4EC2964: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x4EC2964: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x4EC2964: ~Search (search.h:92)
==14961==    by 0x4EC2964: ~KdTree (kdtree.h:93)
==14961==    by 0x4EC2964: ~KdTree (kdtree.h:93)
==14961==    by 0x4EC2964: std::_Sp_counted_ptr<pcl::search::KdTree<pcl::PointXYZRGBA, pcl::KdTreeFLANN<pcl::PointXYZRGBA, flann::L2_Simple<float> > >*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:348)
==14961==    by 0x118690: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:168)
==14961==    by 0x5383E6C: ~__shared_count (shared_ptr_base.h:705)
==14961==    by 0x5383E6C: ~__shared_ptr (shared_ptr_base.h:1154)
==14961==    by 0x5383E6C: ~shared_ptr (shared_ptr.h:122)
==14961==    by 0x5383E6C: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::~SupervoxelClustering() (supervoxel_clustering.hpp:63)
==14961==    by 0x113CD6: main (supervoxel_clustering.cpp:142)
==14961==  Address 0x1678d960 is 0 bytes inside a block of size 128 alloc'd
==14961==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==14961==    by 0x114B19: Eigen::internal::aligned_malloc(unsigned long) (Memory.h:182)
==14961==    by 0x5393874: conditional_aligned_malloc<true> (Memory.h:241)
==14961==    by 0x5393874: operator new (point_cloud.h:900)
==14961==    by 0x5393874: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::computeVoxelData() (supervoxel_clustering.hpp:208)
==14961==    by 0x53A2518: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::prepareForSegmentation() (supervoxel_clustering.hpp:198)
==14961==    by 0x539D835: pcl::SupervoxelClustering<pcl::PointXYZRGBA>::extract(std::map<unsigned int, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> >, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<pcl::Supervoxel<pcl::PointXYZRGBA> > > > >&) (supervoxel_clustering.hpp:107)
==14961==    by 0x1134FB: main (supervoxel_clustering.cpp:90)
==14961== 
==14961== 
==14961== HEAP SUMMARY:
==14961==     in use at exit: 62,001,076 bytes in 489,583 blocks
==14961==   total heap usage: 1,799,932 allocs, 1,312,079 frees, 305,447,681 bytes allocated
==14961== 
==14961== LEAK SUMMARY:
==14961==    definitely lost: 8,245,416 bytes in 37,160 blocks
==14961==    indirectly lost: 51,402,922 bytes in 447,132 blocks
==14961==      possibly lost: 2,095,277 bytes in 2,039 blocks
==14961==    still reachable: 257,461 bytes in 3,252 blocks
==14961==         suppressed: 0 bytes in 0 blocks
==14961== Rerun with --leak-check=full to see details of leaked memory
==14961== 
==14961== Use --track-origins=yes to see where uninitialised values come from
==14961== For lists of detected and suppressed errors, rerun with: -s
==14961== ERROR SUMMARY: 43704 errors from 22 contexts (suppressed: 0 from 0)

Some observations: The 3D Viewer starts showing the point cloud, however this is only displayed using valgrind..

mvieth commented 2 years ago

Looks like this is caused (at least partially) by alignment issues. I assume you compiled PCL from source? Did you use any non-default options while doing that? Especially SIMD (SSE/AVX) or architecture specific options? Same for the compilation of supervoxel_clustering.cpp: do you modify the CMakeLists.txt in any way or supply additional options?

EngDanielAraujo commented 2 years ago

Correct, I had to compile from source because of the issue with the ubuntu 22.04 package reported in #5237.

Here are the files I'm using for testing: supervoxel_clustering.ccp

#include <pcl/console/parse.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/segmentation/supervoxel_clustering.h>
#include <pcl/pcl_config.h>

//VTK include needed for drawing graph lines 
#include <vtkPolyLine.h>

// Types
typedef pcl::PointXYZRGBA PointT;
typedef pcl::PointCloud<PointT> PointCloudT;
typedef pcl::PointNormal PointNT;
typedef pcl::PointCloud<PointNT> PointNCloudT;
typedef pcl::PointXYZL PointLT;
typedef pcl::PointCloud<PointLT> PointLCloudT;

void addSupervoxelConnectionsToViewer (PointT &supervoxel_center,
                                       PointCloudT &adjacent_supervoxel_centers,
                                       std::string supervoxel_name,
                                       pcl::visualization::PCLVisualizer::Ptr & viewer);

int
main (int argc, char ** argv)
{
  std::cout << "PCL_VERSION: " << PCL_VERSION << std::endl;

  if (argc < 2)
  {
    pcl::console::print_error ("Syntax is: %s <pcd-file> \n "
                                "--NT Dsables the single cloud transform \n"
                                "-v <voxel resolution>\n-s <seed resolution>\n"
                                "-c <color weight> \n-z <spatial weight> \n"
                                "-n <normal_weight>\n", argv[0]);
    return (1);
  }

  PointCloudT::Ptr cloud (new PointCloudT);
  pcl::console::print_highlight ("Loading point cloud...\n");
  if (pcl::io::loadPCDFile<PointT> (argv[1], *cloud))
  {
    pcl::console::print_error ("Error loading cloud file!\n");
    return (1);
  }

  bool disable_transform = pcl::console::find_switch (argc, argv, "--NT");

  float voxel_resolution = 0.008f;
  bool voxel_res_specified = pcl::console::find_switch (argc, argv, "-v");
  if (voxel_res_specified)
    pcl::console::parse (argc, argv, "-v", voxel_resolution);

  float seed_resolution = 0.1f;
  bool seed_res_specified = pcl::console::find_switch (argc, argv, "-s");
  if (seed_res_specified)
    pcl::console::parse (argc, argv, "-s", seed_resolution);

  float color_importance = 0.2f;
  if (pcl::console::find_switch (argc, argv, "-c"))
    pcl::console::parse (argc, argv, "-c", color_importance);

  float spatial_importance = 0.4f;
  if (pcl::console::find_switch (argc, argv, "-z"))
    pcl::console::parse (argc, argv, "-z", spatial_importance);

  float normal_importance = 1.0f;
  if (pcl::console::find_switch (argc, argv, "-n"))
    pcl::console::parse (argc, argv, "-n", normal_importance);

  //////////////////////////////  //////////////////////////////
  ////// This is how to use supervoxels
  //////////////////////////////  //////////////////////////////

  pcl::SupervoxelClustering<PointT> super (voxel_resolution, seed_resolution);
  if (disable_transform)
    super.setUseSingleCameraTransform (false);
  super.setInputCloud (cloud);
  super.setColorImportance (color_importance);
  super.setSpatialImportance (spatial_importance);
  super.setNormalImportance (normal_importance);

  std::map <std::uint32_t, pcl::Supervoxel<PointT>::Ptr > supervoxel_clusters;

  pcl::console::print_highlight ("Extracting supervoxels!\n");
  super.extract (supervoxel_clusters);
  pcl::console::print_highlight ("Teste\n");
  pcl::console::print_info ("Found %d supervoxels\n", supervoxel_clusters.size());

  pcl::visualization::PCLVisualizer::Ptr viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
  viewer->setBackgroundColor (0, 0, 0);

  PointCloudT::Ptr voxel_centroid_cloud = super.getVoxelCentroidCloud ();
  viewer->addPointCloud (voxel_centroid_cloud, "voxel centroids");
  viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE,2.0, "voxel centroids");
  viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_OPACITY,0.95, "voxel centroids");

  PointLCloudT::Ptr labeled_voxel_cloud = super.getLabeledVoxelCloud ();
  viewer->addPointCloud (labeled_voxel_cloud, "labeled voxels");
  viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_OPACITY,0.8, "labeled voxels");

  PointNCloudT::Ptr sv_normal_cloud = super.makeSupervoxelNormalCloud (supervoxel_clusters);
  //We have this disabled so graph is easy to see, uncomment to see supervoxel normals
  //viewer->addPointCloudNormals<PointNormal> (sv_normal_cloud,1,0.05f, "supervoxel_normals");

  pcl::console::print_highlight ("Getting supervoxel adjacency\n");
  std::multimap<std::uint32_t, std::uint32_t> supervoxel_adjacency;
  super.getSupervoxelAdjacency (supervoxel_adjacency);
  //To make a graph of the supervoxel adjacency, we need to iterate through the supervoxel adjacency multimap
  for (auto label_itr = supervoxel_adjacency.cbegin (); label_itr != supervoxel_adjacency.cend (); )
  {
    //First get the label
    std::uint32_t supervoxel_label = label_itr->first;
    //Now get the supervoxel corresponding to the label
    pcl::Supervoxel<PointT>::Ptr supervoxel = supervoxel_clusters.at (supervoxel_label);

    //Now we need to iterate through the adjacent supervoxels and make a point cloud of them
    PointCloudT adjacent_supervoxel_centers;
    for (auto adjacent_itr = supervoxel_adjacency.equal_range (supervoxel_label).first; adjacent_itr!=supervoxel_adjacency.equal_range (supervoxel_label).second; ++adjacent_itr)
    {
      pcl::Supervoxel<PointT>::Ptr neighbor_supervoxel = supervoxel_clusters.at (adjacent_itr->second);
      adjacent_supervoxel_centers.push_back (neighbor_supervoxel->centroid_);
    }
    //Now we make a name for this polygon
    std::stringstream ss;
    ss << "supervoxel_" << supervoxel_label;
    //This function is shown below, but is beyond the scope of this tutorial - basically it just generates a "star" polygon mesh from the points given
    addSupervoxelConnectionsToViewer (supervoxel->centroid_, adjacent_supervoxel_centers, ss.str (), viewer);
    //Move iterator forward to next label
    label_itr = supervoxel_adjacency.upper_bound (supervoxel_label);
  }

  while (!viewer->wasStopped ())
  {
    viewer->spinOnce (100);
  }
  return (0);
}

void
addSupervoxelConnectionsToViewer (PointT &supervoxel_center,
                                  PointCloudT &adjacent_supervoxel_centers,
                                  std::string supervoxel_name,
                                  pcl::visualization::PCLVisualizer::Ptr & viewer)
{
  vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New ();
  vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New ();
  vtkSmartPointer<vtkPolyLine> polyLine = vtkSmartPointer<vtkPolyLine>::New ();

  //Iterate through all adjacent points, and add a center point to adjacent point pair
  for (auto adjacent_itr = adjacent_supervoxel_centers.begin (); adjacent_itr != adjacent_supervoxel_centers.end (); ++adjacent_itr)
  {
    points->InsertNextPoint (supervoxel_center.data);
    points->InsertNextPoint (adjacent_itr->data);
  }
  // Create a polydata to store everything in
  vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New ();
  // Add the points to the dataset
  polyData->SetPoints (points);
  polyLine->GetPointIds  ()->SetNumberOfIds(points->GetNumberOfPoints ());
  for(unsigned int i = 0; i < points->GetNumberOfPoints (); i++)
    polyLine->GetPointIds ()->SetId (i,i);
  cells->InsertNextCell (polyLine);
  // Add the lines to the dataset
  polyData->SetLines (cells);
  viewer->addModelFromPolyData (polyData,supervoxel_name);
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.5...3.13)

project(supervoxel_clustering)

find_package(PCL 1.8 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (supervoxel_clustering supervoxel_clustering.cpp)
target_link_libraries (supervoxel_clustering ${PCL_LIBRARIES})

The configuration for compilation was as follows:

 BUILD_2d                         ON
 BUILD_CUDA                       OFF
 BUILD_GPU                        OFF
 BUILD_apps                       OFF
 BUILD_benchmarks                 OFF
 BUILD_common                     ON
 BUILD_examples                   OFF
 BUILD_features                   ON
 BUILD_filters                    ON
 BUILD_geometry                   ON
 BUILD_global_tests               OFF
 BUILD_io                         ON
 BUILD_kdtree                     ON
 BUILD_keypoints                  ON
 BUILD_ml                         ON
 BUILD_octree                     ON
 BUILD_outofcore                  ON
 BUILD_people                     ON
 BUILD_recognition                ON
 BUILD_registration               ON
 BUILD_sample_consensus           ON
 BUILD_search                     ON
 BUILD_segmentation               ON
 BUILD_simulation                 OFF
 BUILD_stereo                     ON
 BUILD_surface                    ON
 BUILD_surface_on_nurbs           OFF
 BUILD_tools                      ON
 BUILD_tracking                   ON
 BUILD_visualization              ON
 Boost_DATE_TIME_LIBRARY_RELEAS   /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.74.0
 Boost_DIR                        /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0
 Boost_FILESYSTEM_LIBRARY_RELEA   /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0
 Boost_INCLUDE_DIR                /usr/include
 Boost_IOSTREAMS_LIBRARY_RELEAS   /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0
 Boost_MPI_LIBRARY_RELEASE        /usr/lib/x86_64-linux-gnu/libboost_mpi.so.1.74.0
 Boost_SERIALIZATION_LIBRARY_RE   /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0
 Boost_SYSTEM_LIBRARY_RELEASE     /usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0
 CMAKE_ADDR2LINE                  /usr/bin/addr2line
 CMAKE_AR                         /usr/bin/ar
 CMAKE_BUILD_TYPE                 RelWithDebInfo
 CMAKE_COLOR_MAKEFILE             ON
 CMAKE_CONFIGURATION_TYPES        Debug;Release
 CMAKE_CUDA_COMPILER              /usr/local/cuda/bin/nvcc
 CMAKE_CUDA_FLAGS 
 CMAKE_CUDA_FLAGS_DEBUG           -g
 CMAKE_CUDA_FLAGS_MINSIZEREL      -O1 -DNDEBUG
 CMAKE_CUDA_FLAGS_RELEASE         -O3 -DNDEBUG
 CMAKE_CUDA_FLAGS_RELWITHDEBINF   -O2 -g -DNDEBUG
 CMAKE_CUDA_STANDARD              14
 CMAKE_CXX_COMPILER               /usr/bin/c++
 CMAKE_CXX_COMPILER_AR            /usr/bin/gcc-ar-11
 CMAKE_CXX_COMPILER_RANLIB        /usr/bin/gcc-ranlib-11
 CMAKE_CXX_FLAGS
 CMAKE_CXX_FLAGS_DEBUG            -g
 CMAKE_CXX_FLAGS_MINSIZEREL       -Os -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE          -O3 -DNDEBUG
 CMAKE_CXX_FLAGS_RELWITHDEBINFO   -O2 -g -DNDEBUG
 CMAKE_CXX_STANDARD               14
 CMAKE_C_COMPILER                 /usr/bin/cc
 CMAKE_C_COMPILER_AR              /usr/bin/gcc-ar-11
 CMAKE_C_COMPILER_RANLIB          /usr/bin/gcc-ranlib-11
 CMAKE_C_FLAGS                    -I/usr/local/cuda/include -I/usr/local/cuda/include -I/usr/local/cuda/include -I/usr/local/cuda/include
 CMAKE_C_FLAGS_DEBUG              -g
 CMAKE_C_FLAGS_MINSIZEREL         -Os -DNDEBUG
 CMAKE_C_FLAGS_RELEASE            -O3 -DNDEBUG
 CMAKE_C_FLAGS_RELWITHDEBINFO     -O2 -g -DNDEBUG
 CMAKE_DLLTOOL                    CMAKE_DLLTOOL-NOTFOUND
 CMAKE_EXE_LINKER_FLAGS
 CMAKE_EXE_LINKER_FLAGS_DEBUG     
 CMAKE_EXE_LINKER_FLAGS_MINSIZE   
 CMAKE_EXE_LINKER_FLAGS_RELEASE   
 CMAKE_EXE_LINKER_FLAGS_RELWITH   
 CMAKE_EXPORT_COMPILE_COMMANDS    OFF
 CMAKE_INSTALL_PREFIX             /usr/local
 CMAKE_LINKER                     /usr/bin/ld
 CMAKE_MAKE_PROGRAM               /usr/bin/gmake
 CMAKE_MODULE_LINKER_FLAGS
 CMAKE_MODULE_LINKER_FLAGS_DEBU   
 CMAKE_MODULE_LINKER_FLAGS_MINS   
 CMAKE_MODULE_LINKER_FLAGS_RELE   
 CMAKE_MODULE_LINKER_FLAGS_RELW   
 CMAKE_MSVC_CODE_LINK_OPTIMIZAT   ON
 CMAKE_NM                         /usr/bin/nm
 CMAKE_OBJCOPY                    /usr/bin/objcopy  
 CMAKE_OBJDUMP                    /usr/bin/objdump
 CMAKE_RANLIB                     /usr/bin/ranlib
 CMAKE_READELF                    /usr/bin/readelf
 CMAKE_SHARED_LINKER_FLAGS                     
 CMAKE_SHARED_LINKER_FLAGS_DEBU   
 CMAKE_SHARED_LINKER_FLAGS_MINS
 CMAKE_SHARED_LINKER_FLAGS_RELE     
 CMAKE_SHARED_LINKER_FLAGS_RELW               
 CMAKE_SKIP_INSTALL_RPATH         OFF
 CMAKE_SKIP_RPATH                 OFF
 CMAKE_STATIC_LINKER_FLAGS          
 CMAKE_STATIC_LINKER_FLAGS_DEBU   
 CMAKE_STATIC_LINKER_FLAGS_MINS   
 CMAKE_STATIC_LINKER_FLAGS_RELE   
 CMAKE_STATIC_LINKER_FLAGS_RELW
 CMAKE_STRIP                      /usr/bin/strip
 CMAKE_TIMING_VERBOSE             OFF
 CMAKE_VERBOSE_MAKEFILE           OFF
 CPACK_SOURCE_RPM                 OFF
 CPACK_SOURCE_TBZ2                ON
 CPACK_SOURCE_TGZ                 ON
 CPACK_SOURCE_TXZ                 ON
 CPACK_SOURCE_TZ                  ON
 CPACK_SOURCE_ZIP                 OFF
 CUDA_64_BIT_DEVICE_CODE          ON
 CUDA_ARCH_BIN                    35;37;50;52;53;60;61;62;70;72;75;80;86;87
 CUDA_ATTACH_VS_BUILD_RULE_TO_C   ON
 CUDA_BUILD_CUBIN                 OFF
 CUDA_BUILD_EMULATION             OFF
 CUDA_CUDART_LIBRARY              /usr/local/cuda/lib64/libcudart.so
 CUDA_CUDA_LIBRARY                /usr/lib/x86_64-linux-gnu/libcuda.so
 CUDA_GENERATED_OUTPUT_DIR        
 CUDA_HOST_COMPILATION_CPP        ON
 CUDA_HOST_COMPILER               /usr/bin/cc
 CUDA_NVCC_EXECUTABLE             /usr/local/cuda/bin/nvcc
 CUDA_NVCC_FLAGS     
 CUDA_NVCC_FLAGS_DEBUG
 CUDA_NVCC_FLAGS_MINSIZEREL
 CUDA_NVCC_FLAGS_RELEASE  
 CUDA_NVCC_FLAGS_RELWITHDEBINFO   
 CUDA_OpenCL_LIBRARY              /usr/local/cuda/lib64/libOpenCL.so
 CUDA_PROPAGATE_HOST_FLAGS        ON
 CUDA_SDK_ROOT_DIR                CUDA_SDK_ROOT_DIR-NOTFOUND
 CUDA_SEPARABLE_COMPILATION       OFF
 CUDA_TOOLKIT_INCLUDE             /usr/local/cuda/include
 CUDA_TOOLKIT_ROOT_DIR            /usr/local/cuda   
 CUDA_USE_STATIC_CUDA_RUNTIME     ON
 CUDA_VERBOSE_BUILD               OFF
 CUDA_VERSION                     11.7
 CUDA_cublas_LIBRARY              /usr/local/cuda/lib64/libcublas.so
 CUDA_cudadevrt_LIBRARY           /usr/local/cuda/lib64/libcudadevrt.a
 CUDA_cudart_static_LIBRARY       /usr/local/cuda/lib64/libcudart_static.a
 CUDA_cufft_LIBRARY               /usr/local/cuda/lib64/libcufft.so
 CUDA_cupti_LIBRARY               CUDA_cupti_LIBRARY-NOTFOUND
 CUDA_curand_LIBRARY              /usr/local/cuda/lib64/libcurand.so
 CUDA_cusolver_LIBRARY            /usr/local/cuda/lib64/libcusolver.so
 CUDA_cusparse_LIBRARY            /usr/local/cuda/lib64/libcusparse.so
 CUDA_nppc_LIBRARY                /usr/local/cuda/lib64/libnppc.so
 CUDA_nppial_LIBRARY              /usr/local/cuda/lib64/libnppial.so
 CUDA_nppicc_LIBRARY              /usr/local/cuda/lib64/libnppicc.so
 CUDA_nppidei_LIBRARY             /usr/local/cuda/lib64/libnppidei.so
 CUDA_nppif_LIBRARY               /usr/local/cuda/lib64/libnppif.so
 CUDA_nppig_LIBRARY               /usr/local/cuda/lib64/libnppig.so
 CUDA_nppim_LIBRARY               /usr/local/cuda/lib64/libnppim.so
 CUDA_nppist_LIBRARY              /usr/local/cuda/lib64/libnppist.so
 CUDA_nppisu_LIBRARY              /usr/local/cuda/lib64/libnppisu.so
 CUDA_nppitc_LIBRARY              /usr/local/cuda/lib64/libnppitc.so
 CUDA_npps_LIBRARY                /usr/local/cuda/lib64/libnpps.so
 CUDA_nvToolsExt_LIBRARY          /usr/local/cuda/lib64/libnvToolsExt.so
 CUDA_rt_LIBRARY                  /usr/lib/x86_64-linux-gnu/librt.a
 ClangFormat_EXECUTABLE           ClangFormat_EXECUTABLE-NOTFOUND
 DAVIDSDK_INCLUDE_DIR             DAVIDSDK_INCLUDE_DIR-NOTFOUND
 DAVIDSDK_LIBRARY                 DAVIDSDK_LIBRARY-NOTFOUND
 DPKG_PROGRAM                     /usr/bin/dpkg
 DSSDK_DIR                        DSSDK_DIR-NOTFOUND
 EIGEN_INCLUDE_DIR                /usr/include/eigen3
 ENSENSO_INCLUDE_DIR              ENSENSO_INCLUDE_DIR-NOTFOUND        
 ENSENSO_LIBRARY                  ENSENSO_LIBRARY-NOTFOUND
 FLANN_INCLUDE_DIR                /usr/include
 FLANN_LIBRARY_DEBUG_SHARED       FLANN_LIBRARY_DEBUG_SHARED-NOTFOUND
 FLANN_LIBRARY_DEBUG_STATIC       FLANN_LIBRARY_DEBUG_STATIC-NOTFOUND
 FLANN_LIBRARY_SHARED             /usr/lib/x86_64-linux-gnu/libflann_cpp.so
 FLANN_LIBRARY_STATIC             /usr/lib/x86_64-linux-gnu/libflann_cpp_s.a
 FREETYPE_INCLUDE_DIR_freetype2   /usr/include/freetype2
 FREETYPE_INCLUDE_DIR_ft2build    /usr/include/freetype2
 FREETYPE_LIBRARY_DEBUG           FREETYPE_LIBRARY_DEBUG-NOTFOUND
 FREETYPE_LIBRARY_RELEASE         /usr/lib/x86_64-linux-gnu/libfreetype.so
 Fontconfig_INCLUDE_DIR           /usr/include
 Fontconfig_LIBRARY               /usr/lib/x86_64-linux-gnu/libfontconfig.so
 GLEW_INCLUDE_DIR                 /usr/include
 GLEW_LIBRARY_DEBUG               GLEW_LIBRARY_DEBUG-NOTFOUND
 GLEW_LIBRARY_RELEASE             /usr/lib/x86_64-linux-gnu/libGLEW.so
 GLUT_INCLUDE_DIR                 /usr/include
 GLUT_Xi_LIBRARY                  /usr/lib/x86_64-linux-gnu/libXi.so
 GLUT_Xmu_LIBRARY                 /usr/lib/x86_64-linux-gnu/libXmu.so
 GLUT_glut_LIBRARY                /usr/lib/x86_64-linux-gnu/libglut.so
 MPIEXEC_EXECUTABLE               /usr/bin/mpiexec
 MPIEXEC_MAX_NUMPROCS             6
 MPIEXEC_NUMPROC_FLAG             -n
 MPIEXEC_POSTFLAGS 
 MPIEXEC_PREFLAGS        
 MPI_CXX_ADDITIONAL_INCLUDE_DIR   
 MPI_CXX_COMPILER                 /usr/bin/mpicxx
 MPI_CXX_COMPILER_INCLUDE_DIRS    /usr/lib/x86_64-linux-gnu/openmpi/include;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi
 MPI_CXX_COMPILE_DEFINITIONS
 MPI_CXX_COMPILE_OPTIONS
 MPI_CXX_HEADER_DIR               /usr/lib/x86_64-linux-gnu/openmpi/include
 MPI_CXX_LIB_NAMES                mpi_cxx;mpi
 MPI_CXX_LINK_FLAGS        
 MPI_CXX_SKIP_MPICXX              OFF
 MPI_C_ADDITIONAL_INCLUDE_DIRS    
 MPI_C_COMPILER                   /usr/bin/mpicc
 MPI_C_COMPILER_INCLUDE_DIRS      /usr/lib/x86_64-linux-gnu/openmpi/include;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi
 MPI_C_COMPILE_DEFINITIONS
 MPI_C_COMPILE_OPTIONS  
 MPI_C_HEADER_DIR                 /usr/lib/x86_64-linux-gnu/openmpi/include
 MPI_C_LIB_NAMES                  mpi
 MPI_C_LINK_FLAGS        
 MPI_mpi_LIBRARY                  /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
 MPI_mpi_cxx_LIBRARY              /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so
 OPENGL_EGL_INCLUDE_DIR           /usr/include      
 OPENGL_GLES2_INCLUDE_DIR         /usr/include       
 OPENGL_GLES3_INCLUDE_DIR         /usr/include                        
 OPENGL_GLX_INCLUDE_DIR           /usr/include            
 OPENGL_INCLUDE_DIR               /usr/include
 OPENGL_egl_LIBRARY               /usr/lib/x86_64-linux-gnu/libEGL.so
 OPENGL_gles2_LIBRARY             /usr/lib/x86_64-linux-gnu/libGLESv2.so
 OPENGL_gles3_LIBRARY             /usr/lib/x86_64-linux-gnu/libGLESv2.so   
 OPENGL_glu_LIBRARY               /usr/lib/x86_64-linux-gnu/libGLU.so       
 OPENGL_glx_LIBRARY               /usr/lib/x86_64-linux-gnu/libGLX.so
 OPENGL_opengl_LIBRARY            /usr/lib/x86_64-linux-gnu/libOpenGL.so
 OPENGL_xmesa_INCLUDE_DIR         OPENGL_xmesa_INCLUDE_DIR-NOTFOUND
 OPENNI2_INCLUDE_DIR              /usr/include/openni2
 OPENNI2_LIBRARY                  /usr/lib/x86_64-linux-gnu/libOpenNI2.so
 OPENNI_INCLUDE_DIR               /usr/include/ni
 OPENNI_LIBRARY                   /usr/lib/libOpenNI.so
 OpenMP_CXX_FLAGS                 -fopenmp
 OpenMP_CXX_LIB_NAMES             gomp;pthread
 OpenMP_C_FLAGS                   -fopenmp
 OpenMP_C_LIB_NAMES               gomp;pthread
 OpenMP_gomp_LIBRARY              /usr/lib/gcc/x86_64-linux-gnu/11/libgomp.so
 OpenMP_pthread_LIBRARY           /usr/lib/x86_64-linux-gnu/libpthread.a
 PCAP_INCLUDE_DIR                 /usr/include    
 PCAP_LIBRARY                     /usr/lib/x86_64-linux-gnu/libpcap.so
 PCL_ALLOW_BOTH_SHARED_AND_STAT   OFF
 PCL_BUILD_WITH_BOOST_DYNAMIC_L   OFF
 PCL_DISABLE_GPU_TESTS            OFF
 PCL_DISABLE_VISUALIZATION_TEST   OFF
 PCL_ENABLE_AVX                   ON
 PCL_ENABLE_CCACHE                OFF
 PCL_ENABLE_MARCHNATIVE           ON
 PCL_ENABLE_SSE                   ON
 PCL_FLANN_REQUIRED_TYPE          DONTCARE
 PCL_INDEX_SIGNED                 ON
 PCL_INDEX_SIZE                   -1
 PCL_IO_ENABLE_MAND_LOCKING       ON
 PCL_NO_PRECOMPILE                OFF
 PCL_ONLY_CORE_POINT_TYPES        OFF
 PCL_QHULL_REQUIRED_TYPE          DONTCARE
 PCL_SHARED_LIBS                  ON
 PCL_VERBOSITY_LEVEL              Info
 PCL_WARNINGS_ARE_ERRORS          OFF
 PKG_CONFIG_ARGN                     
 PKG_CONFIG_EXECUTABLE            /usr/bin/pkg-config
 PNG_LIBRARY_DEBUG                PNG_LIBRARY_DEBUG-NOTFOUND
 PNG_LIBRARY_RELEASE              /usr/lib/x86_64-linux-gnu/libpng.so
 PNG_PNG_INCLUDE_DIR              /usr/include      
 QT_ADDITIONAL_HOST_PACKAGES_PR   
 QT_ADDITIONAL_PACKAGES_PREFIX_   
 Qhull_DIR                        /usr/lib/x86_64-linux-gnu/cmake/Qhull
 Qt6Concurrent_DIR                /usr/lib/x86_64-linux-gnu/cmake/Qt6Concurrent
 Qt6CoreTools_DIR                 /usr/lib/x86_64-linux-gnu/cmake/Qt6CoreTools
 Qt6Core_DIR                      /usr/lib/x86_64-linux-gnu/cmake/Qt6Core
 Qt6DBusTools_DIR                 /usr/lib/x86_64-linux-gnu/cmake/Qt6DBusTools
 Qt6DBus_DIR                      /usr/lib/x86_64-linux-gnu/cmake/Qt6DBus   
 Qt6GuiTools_DIR                  /usr/lib/x86_64-linux-gnu/cmake/Qt6GuiTools
 Qt6Gui_DIR                       /usr/lib/x86_64-linux-gnu/cmake/Qt6Gui
 Qt6OpenGL_DIR                    /usr/lib/x86_64-linux-gnu/cmake/Qt6OpenGL
 Qt6WidgetsTools_DIR              /usr/lib/x86_64-linux-gnu/cmake/Qt6WidgetsTools
 Qt6Widgets_DIR                   /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets
 Qt6_DIR                          /usr/lib/x86_64-linux-gnu/cmake/Qt6
 RSSDK_DIR                        RSSDK_DIR-NOTFOUND   
 VTK_DIR                          /usr/local/lib/cmake/vtk-9.2
 VTK_MPI_NUMPROCS                 2           
 Vulkan_GLSLANG_VALIDATOR_EXECU   Vulkan_GLSLANG_VALIDATOR_EXECUTABLE-NOTFOUND
 Vulkan_GLSLC_EXECUTABLE          Vulkan_GLSLC_EXECUTABLE-NOTFOUND
 Vulkan_INCLUDE_DIR               /usr/include
 Vulkan_LIBRARY                   /usr/lib/x86_64-linux-gnu/libvulkan.so
 WITH_CUDA                        ON
 WITH_DAVIDSDK                    OFF
 WITH_DOCS                        OFF
 WITH_DSSDK                       OFF
 WITH_ENSENSO                     OFF
 WITH_LIBUSB                      ON
 WITH_OPENGL                      ON
 WITH_OPENMP                      ON
 WITH_OPENNI                      ON
 WITH_OPENNI2                     ON
 WITH_PCAP                        ON
 WITH_PNG                         ON
 WITH_QHULL                       ON
 WITH_QT                          AUTO
 WITH_RSSDK                       OFF
 WITH_RSSDK2                      OFF
 WITH_VTK                         ON
 X11_ICE_INCLUDE_PATH             /usr/include
 X11_ICE_LIB                      /usr/lib/x86_64-linux-gnu/libICE.so
 X11_SM_INCLUDE_PATH              /usr/include
 X11_SM_LIB                       /usr/lib/x86_64-linux-gnu/libSM.so
 X11_X11_INCLUDE_PATH             /usr/include       
 X11_X11_LIB                      /usr/lib/x86_64-linux-gnu/libX11.so
 X11_X11_xcb_INCLUDE_PATH         X11_X11_xcb_INCLUDE_PATH-NOTFOUND  
 X11_X11_xcb_LIB                  X11_X11_xcb_LIB-NOTFOUND
 X11_XRes_INCLUDE_PATH            X11_XRes_INCLUDE_PATH-NOTFOUND
 X11_XRes_LIB                     X11_XRes_LIB-NOTFOUND
 X11_XShm_INCLUDE_PATH            /usr/include
 X11_XSync_INCLUDE_PATH           /usr/include
 X11_Xaccessrules_INCLUDE_PATH    X11_Xaccessrules_INCLUDE_PATH-NOTFOUND      
 X11_Xaccessstr_INCLUDE_PATH      /usr/include
 X11_Xau_INCLUDE_PATH             /usr/include
 X11_Xau_LIB                      /usr/lib/x86_64-linux-gnu/libXau.so       
 X11_Xaw_INCLUDE_PATH             X11_Xaw_INCLUDE_PATH-NOTFOUND
 X11_Xaw_LIB                      X11_Xaw_LIB-NOTFOUND
 X11_Xcomposite_INCLUDE_PATH      X11_Xcomposite_INCLUDE_PATH-NOTFOUND     
 X11_Xcomposite_LIB               X11_Xcomposite_LIB-NOTFOUND
 X11_Xcursor_INCLUDE_PATH         /usr/include
 X11_Xcursor_LIB                  /usr/lib/x86_64-linux-gnu/libXcursor.so
 X11_Xdamage_INCLUDE_PATH         X11_Xdamage_INCLUDE_PATH-NOTFOUND
 X11_Xdamage_LIB                  X11_Xdamage_LIB-NOTFOUND    
 X11_Xdmcp_INCLUDE_PATH           /usr/include
 X11_Xdmcp_LIB                    /usr/lib/x86_64-linux-gnu/libXdmcp.so       
 X11_Xext_INCLUDE_PATH            /usr/include
 X11_Xext_LIB                     /usr/lib/x86_64-linux-gnu/libXext.so
 X11_Xfixes_INCLUDE_PATH          /usr/include
 X11_Xfixes_LIB                   /usr/lib/x86_64-linux-gnu/libXfixes.so
 X11_Xft_INCLUDE_PATH             /usr/include
 X11_Xft_LIB                      /usr/lib/x86_64-linux-gnu/libXft.so
 X11_Xi_INCLUDE_PATH              /usr/include
 X11_Xi_LIB                       /usr/lib/x86_64-linux-gnu/libXi.so
 X11_Xinerama_INCLUDE_PATH        X11_Xinerama_INCLUDE_PATH-NOTFOUND
 X11_Xinerama_LIB                 X11_Xinerama_LIB-NOTFOUND
 X11_Xkb_INCLUDE_PATH             /usr/include
 X11_Xkblib_INCLUDE_PATH          /usr/include
 X11_Xlib_INCLUDE_PATH            /usr/include
 X11_Xmu_INCLUDE_PATH             /usr/include
 X11_Xmu_LIB                      /usr/lib/x86_64-linux-gnu/libXmu.so
 X11_Xpm_INCLUDE_PATH             X11_Xpm_INCLUDE_PATH-NOTFOUND
 X11_Xpm_LIB                      X11_Xpm_LIB-NOTFOUND
 X11_Xrandr_INCLUDE_PATH          X11_Xrandr_INCLUDE_PATH-NOTFOUND
 X11_Xrandr_LIB                   X11_Xrandr_LIB-NOTFOUND
 X11_Xrender_INCLUDE_PATH         /usr/include
 X11_Xrender_LIB                  /usr/lib/x86_64-linux-gnu/libXrender.so
 X11_Xshape_INCLUDE_PATH          /usr/include
 X11_Xss_INCLUDE_PATH             /usr/include
 X11_Xss_LIB                      /usr/lib/x86_64-linux-gnu/libXss.so
 X11_Xt_INCLUDE_PATH              /usr/include       
 X11_Xt_LIB                       /usr/lib/x86_64-linux-gnu/libXt.so 
 X11_Xtst_INCLUDE_PATH            X11_Xtst_INCLUDE_PATH-NOTFOUND     
 X11_Xtst_LIB                     X11_Xtst_LIB-NOTFOUND   
 X11_Xutil_INCLUDE_PATH           /usr/include
 X11_Xv_INCLUDE_PATH              X11_Xv_INCLUDE_PATH-NOTFOUND
 X11_Xv_LIB                       X11_Xv_LIB-NOTFOUND
 X11_Xxf86misc_INCLUDE_PATH       X11_Xxf86misc_INCLUDE_PATH-NOTFOUND
 X11_Xxf86misc_LIB                X11_Xxf86misc_LIB-NOTFOUND                  
 X11_Xxf86vm_INCLUDE_PATH         X11_Xxf86vm_INCLUDE_PATH-NOTFOUND
 X11_Xxf86vm_LIB                  X11_Xxf86vm_LIB-NOTFOUND
 X11_dpms_INCLUDE_PATH            /usr/include                              
 X11_xcb_INCLUDE_PATH             /usr/include
 X11_xcb_LIB                      /usr/lib/x86_64-linux-gnu/libxcb.so
 X11_xcb_icccm_INCLUDE_PATH       X11_xcb_icccm_INCLUDE_PATH-NOTFOUND      
 X11_xcb_icccm_LIB                X11_xcb_icccm_LIB-NOTFOUND 
 X11_xcb_util_INCLUDE_PATH        X11_xcb_util_INCLUDE_PATH-NOTFOUND
 X11_xcb_util_LIB                 X11_xcb_util_LIB-NOTFOUND
 X11_xcb_xfixes_INCLUDE_PATH      X11_xcb_xfixes_INCLUDE_PATH-NOTFOUND
 X11_xcb_xfixes_LIB               X11_xcb_xfixes_LIB-NOTFOUND 
 X11_xcb_xkb_LIB                  X11_xcb_xkb_LIB-NOTFOUND
 X11_xkbcommon_INCLUDE_PATH       /usr/include                                
 X11_xkbcommon_LIB                /usr/lib/x86_64-linux-gnu/libxkbcommon.so
 X11_xkbcommon_X11_INCLUDE_PATH   X11_xkbcommon_X11_INCLUDE_PATH-NOTFOUND
 X11_xkbcommon_X11_LIB            X11_xkbcommon_X11_LIB-NOTFOUND
 X11_xkbfile_INCLUDE_PATH         X11_xkbfile_INCLUDE_PATH-NOTFOUND     
 X11_xkbfile_LIB                  X11_xkbfile_LIB-NOTFOUND
 XKB_INCLUDE_DIR                  /usr/include
 XKB_LIBRARY                      /usr/lib/x86_64-linux-gnu/libxkbcommon.so
 ZLIB_INCLUDE_DIR                 /usr/include
 ZLIB_LIBRARY_DEBUG               ZLIB_LIBRARY_DEBUG-NOTFOUND       
 ZLIB_LIBRARY_RELEASE             /usr/lib/x86_64-linux-gnu/libz.so
 boost_date_time_DIR              /usr/lib/x86_64-linux-gnu/cmake/boost_date_time-1.74.0
 boost_filesystem_DIR             /usr/lib/x86_64-linux-gnu/cmake/boost_filesystem-1.74.0
 boost_headers_DIR                /usr/lib/x86_64-linux-gnu/cmake/boost_headers-1.74.0
 boost_iostreams_DIR              /usr/lib/x86_64-linux-gnu/cmake/boost_iostreams-1.74.0
 boost_mpi_DIR                    /usr/lib/x86_64-linux-gnu/cmake/boost_mpi-1.74.0
 boost_serialization_DIR          /usr/lib/x86_64-linux-gnu/cmake/boost_serialization-1.74.0
 boost_system_DIR                 /usr/lib/x86_64-linux-gnu/cmake/boost_system-1.74.0
 flann_DIR                        flann_DIR-NOTFOUND
 libusb_INCLUDE_DIR               /usr/include           
 libusb_LIBRARIES                 /usr/lib/x86_64-linux-gnu/libusb-1.0.so
 pkgcfg_lib_PC_FLANN_flann        /usr/lib/x86_64-linux-gnu/libflann.so  
 pkgcfg_lib_PC_FLANN_flann_cpp    /usr/lib/x86_64-linux-gnu/libflann_cpp.so
 pkgcfg_lib_PC_FLANN_lz4          /usr/lib/x86_64-linux-gnu/liblz4.so
 pkgcfg_lib_PC_OPENNI2_OpenNI2    /usr/lib/x86_64-linux-gnu/libOpenNI2.so
 pkgcfg_lib_PC_OPENNI_OpenNI      /usr/lib/libOpenNI.so
 pkgcfg_lib_PC_libusb_usb-1.0     /usr/lib/x86_64-linux-gnu/libusb-1.0.so
 pkgcfg_lib_PKG_FONTCONFIG_font   /usr/lib/x86_64-linux-gnu/libfontconfig.so
 pkgcfg_lib_PKG_FONTCONFIG_free   /usr/lib/x86_64-linux-gnu/libfreetype.so
 pkgcfg_lib_PKG_XKB_xkbcommon     /usr/lib/x86_64-linux-gnu/libxkbcommon.so
 realsense2_DIR                   realsense2_DIR-NOTFOUND     
 tide_DIR                         tide_DIR-NOTFOUND  
mvieth commented 2 years ago

Ok, now I was partially able to reproduce the problem, and I may have found a solution. When you compile supervoxel_clustering.cpp, you use gcc 11 and don't explicitly specify the used C++ standard, correct? The thing is, gcc 11 and gcc 12 default to C++17 if the standard is not specified, all earlier gcc versions default to C++14. PCL is always built with C++14. When the standards differ between PCL and the downstream project, the "double free or corruption" error happens in the shared pointer (not totally sure why yet). Can you try setting the C++ standard to 14 when compiling supervoxel_clustering.cpp, e.g. with the compiler flag -std=c++14 or the cmake option -DCMAKE_CXX_STANDARD=14?

EngDanielAraujo commented 2 years ago

Ok, now I was partially able to reproduce the problem, and I may have found a solution. When you compile supervoxel_clustering.cpp, you use gcc 11 and don't explicitly specify the used C++ standard, correct? The thing is, gcc 11 and gcc 12 default to C++17 if the standard is not specified, all earlier gcc versions default to C++14. PCL is always built with C++14. When the standards differ between PCL and the downstream project, the "double free or corruption" error happens in the shared pointer (not totally sure why yet). Can you try setting the C++ standard to 14 when compiling supervoxel_clustering.cpp, e.g. with the compiler flag -std=c++14 or the cmake option -DCMAKE_CXX_STANDARD=14?

Perfect, thank you very much, this worked for me!

Here's the CmakeLists.txt for anyone interested:

cmake_minimum_required(VERSION 3.5...3.13)

project(supervoxel_clustering)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

find_package(PCL 1.8 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable (supervoxel_clustering supervoxel_clustering.cpp)
target_link_libraries (supervoxel_clustering ${PCL_LIBRARIES})
mvieth commented 2 years ago

That's great to hear. I wonder if we should somehow force the C++ standard of downstream project to be the one used when PCL was compiled, or at least make that the default standard of downstream projects

themightyoarfish commented 1 year ago

Or somehow raise a warning or an error, if this can lead to hard-to-debug memory problems.

mvieth commented 1 year ago

@themightyoarfish Do you have an idea how to do that? I can't think of a way off the top of my head.

themightyoarfish commented 1 year ago

Couldn't one save the cxx standard using during the PCL build in the installed cmake module? and that module code can check the project being built and compare it's language version to the one pcl was installed with.

themightyoarfish commented 1 year ago

I've never understood the link-time compatibility of different c++ versions, the GCC doc has this to say

Versioning gives subsequent releases of library binaries the ability to add new symbols and add functionality, all the while retaining compatibility with the previous releases in the series. Thus, program binaries linked with the initial release of a library binary will still run correctly if the library binary is replaced by carefully-managed subsequent library binaries. This is called forward compatibility.

The reverse (backwards compatibility) is not true. It is not possible to take program binaries linked with the latest version of a library binary in a release series (with additional symbols added), substitute in the initial release of the library binary, and remain link compatible.

I'm wondering if ABI incompatible binaries shouldn't produce an errors when linked. But the text doesn't seem to state whether two different language versions are ABI compatible, just that first linking to pcl-c++14 and then relinking to pcl-c++17 for instance would work.

mvieth commented 1 year ago

Couldn't one save the cxx standard using during the PCL build in the installed cmake module? and that module code can check the project being built and compare it's language version to the one pcl was installed with.

Problem is just that it may not be easy to find out in PCLConfig.cmake, which C++ version the downstream project uses, especially if no explicit version is set and the compiler default is used. It may be easier to test this in a PCL header file like pcl_config.h.

I'm wondering if ABI incompatible binaries shouldn't produce an errors when linked

They do produce a link error when a symbol is not found, e.g. because a function/class is removed, or a function changed parameters. This seems to be about alignment (at least partially), which is apparently not checked during linking.

On a related note: currently, the compiler is forced to use C++14 when compiling PCL. Most compilers also default to C++14, but some newer ones default to C++17 (gcc-11, gcc-12, and the newest clang as well, I think). PCL is fully compatible with C++17, so perhaps it makes sense to let the compiler decide which C++ standard to use when compiling PCL (as long as it is at least C++14), unless the user specified one.