Open
Description
Describe the bug
When a pointcloud has an 8 F
field, selecting this channel for display segfaults with this report:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x13fb99816)
* frame #0: 0x0000000108aa4efc libvtkCommonCore-9.3.dylib`vtkAOSDataArrayTemplate<float>::SetArray(float*, long long, int, int) + 36
frame #1: 0x0000000100492524 libpcl_visualization.1.14.dylib`pcl::visualization::PointCloudColorHandlerGenericField<pcl::PCLPointCloud2>::getColor() const + 696
frame #2: 0x000000010047e2e8 libpcl_visualization.1.14.dylib`pcl::visualization::PCLVisualizerInteractorStyle::OnKeyDown() + 2428
frame #3: 0x000000010286ce88 libvtkRenderingCore-9.3.1.dylib`vtkInteractorStyle::ProcessEvents(vtkObject*, unsigned long, void*, void*) + 4008
frame #4: 0x0000000108a0613c libvtkCommonCore-9.3.dylib`vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) + 44
frame #5: 0x0000000108b1ca98 libvtkCommonCore-9.3.dylib`vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1232
frame #6: 0x0000000101dce8f0 libvtkRenderingOpenGL2-9.3.dylib`-[vtkCocoaGLView invokeVTKKeyEvent:cocoaEvent:] + 608
frame #7: 0x0000000198822fc8 AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 316
frame #8: 0x0000000198822cbc AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 284
frame #9: 0x000000019903aeb0 AppKit`-[NSApplication(NSEventRouting) sendEvent:] + 2360
frame #10: 0x0000000198c4889c AppKit`-[NSApplication _handleEvent:] + 60
frame #11: 0x00000001986eeb08 AppKit`-[NSApplication run] + 520
frame #12: 0x000000010001cc48 pcl_viewer`main + 17620
frame #13: 0x0000000194768274 dyld`start + 2840
Context
The point cloud was made from a custom point type:
struct PointXYZIT {
PCL_ADD_POINT4D
PCL_ADD_INTENSITY
double time;
PCL_MAKE_ALIGNED_OPERATOR_NEW
};
…
POINT_CLOUD_REGISTER_POINT_STRUCT(
autocrane::PointXYZIT,
(float, x, x)(float, y, y)(float, z, z)(float, intensity, intensity)(double,
time,
time))
Expected behavior
Viewer displays the double
field correctly
Current Behavior
Viewer crashes
To Reproduce
- Build pcl
d257a89130386c3356fba8ba0f04e8e2089704f3
. - run
pcl_viewer
on attached point cloud - press key
6
to visualize time channel - cry
Your Environment (please complete the following information):
- OS: macos 15.1.1 ARM
- Compiler: Apple Clang 16.0.0
- PCL Version d257a89
Possible Solution
Fix vtk display, or error when double fields are used
Additional context