Open nblythe opened 7 years ago
Confirmed this is in trunk too
The problem is surface/include/pcl/surface/3rdparty/poisson4/allocator.h, which isn't thread-safe and is instantiated statically by octree_poisson.h and sparse_matrix.h.
Possible fixes include switching to member instances instead of static instances (will break memory usage reporting) and mutex-locking allocations.
Unfortunately there's no easy fix for this. Switching to member instances isn't straightforward, because SetAllocator() is called out-of-scope in several places. Mutex-locking allocations won't work because Allocator exposes state that implies single-consumer. The best fix would be to write new thread-safe implementation of Allocator.
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Your Environment
Expected Behavior
Two threads should be able to create two different instances of pcl::Poisson and run them on two different input clouds at the same time.
Current Behavior
Segfault
Code to Reproduce
http://pastebin.com/yJrpcpTL