zivid-cpp-samples icon indicating copy to clipboard operation
zivid-cpp-samples copied to clipboard

Trace/breakpoint trap (core dumped) when visualizing point cloud

Open Nitrow opened this issue 3 years ago • 2 comments

Hello Zivid. I have trouble with the stability of the visualizer. I'm using the from your examples CaptureWritePCLVis3D with the small modification that I simulate the camera with the FileCameraZividOne.zfc file. Whenever it tries to executes the visualization it crashes and gives me Trace/breakpoint trap (core dumped).

I'm using VTK 9.1 and have tried to use a never version from source but without luck. I'm also using PCL 1.12. This is what the terminal prints out.

Connecting to camera
Creating settings
Capturing frame
Converting Zivid point cloud to PCL format
Visualizing PCL point cloud
Press r to centre and zoom the viewer so that the entire cloud is visible
Press q to exit the viewer application
Trace/breakpoint trap (core dumped)

Hope someone can help.

Best regards, Asger Programmer LT Automation

Nitrow avatar Nov 01 '22 12:11 Nitrow

Hi, Asger

This seems to be an issue with the specific VTK or PCL version you are using. The sample runs fine on my system (using the file camera), although with some warnings from VTK. I am using PCL 1.9.1, which comes with VTK 8.1.2. I'll try to reproduce the error using your setup, but for now you might want to try PCL 1.9.1.

The samples should ideally work with newer versions of these libraries, so I will look into it.

Edit: I now ran the sample using PCL 1.12 and VTK 9.0, which worked fine. This is on Windows though. Looks like a problem with VTK, so I would check for similar issues there or make one. You can also try to reproduce it using a minimal example with PCL with visualizer (no Zivid libraries), just to verify that the error is on the VTK/PCL side.

andersfagerli avatar Nov 02 '22 11:11 andersfagerli

A bit late here, but there apparently is a bug with PCL/VTK for Ubuntu 22.04, which is causing this crash https://github.com/PointCloudLibrary/pcl/issues/5237.

A workaround is to build PCL from source as it seems to be fixed in master.

andersfagerli avatar Mar 14 '23 08:03 andersfagerli