PointCloudLibrary / PointCloudLibrary/pcl
pcl::visualization::RangeImageVisualizer crashes on showRangeImage() on Mac
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
In following the simple example at https://pointclouds.org/documentation/tutorials/range_image_visualization.html I've encountered a consistent crash on Mac inside showRangeImage(). I'm using default up-to-date PCL, Vtk, and Qt5 from Homebrew.
Context
As indicated in the tutorial, I'm trying to display points as a range image in a 2D window. Note the 3D PCLVisualizer appears to work fine, displays a window, can be rotated interactively. It's only RangeImageVisualizer::showRangeImage() that is a problem.
Current Behavior
There's a null pointer dereference happening down in Vtk, presumably the Render() context.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libvtkRenderingContext2D-9.1.1.dylib 0x000000010b6f640c vtkContextActor::RenderOverlay(vtkViewport*) + 540
1 libvtkRenderingOpenGL2-9.1.1.dylib 0x000000010bc05770 vtkOpenGLRenderer::UpdateGeometry(vtkFrameBufferObjectBase*) + 1698
2 libvtkRenderingOpenGL2-9.1.1.dylib 0x000000010bc04dbe vtkOpenGLRenderer::DeviceRender() + 526
3 libvtkRenderingCore-9.1.1.dylib 0x000000010be0e4fc vtkRenderer::Render() + 1168
4 libvtkRenderingCore-9.1.1.dylib 0x000000010be1441d vtkRendererCollection::Render() + 123
5 libvtkRenderingCore-9.1.1.dylib 0x000000010be07280 vtkRenderWindow::DoStereoRender() + 134
6 libvtkRenderingCore-9.1.1.dylib 0x000000010be0715f vtkRenderWindow::Render() + 343
7 libvtkRenderingOpenGL2-9.1.1.dylib 0x000000010bc03b8d vtkOpenGLRenderWindow::Render() + 73
8 libpcl_visualization.1.12.dylib 0x000000010951218e pcl::visualization::ImageViewer::render() + 26
9 libpcl_visualization.1.12.dylib 0x000000010951a293 pcl::visualization::RangeImageVisualizer::showRangeImage(pcl::RangeImage const&, float, float, bool) + 111
10 range_image_creation 0x00000001031f76b1 main + 881 (range_image_creation.cpp:75)
11 libdyld.dylib 0x00007fff20825f3d start + 1
To Reproduce
Tutorial steps are being followed. Commenting out the showRangeImage() line, and it runs without crashing, even displaying the second window. The rangeImage data was created as per the tutorial example.
pcl::visualization::RangeImageVisualizer range_image_widget ("Range image");
range_image_widget.showRangeImage(rangeImage);
If the latter line is commented out, the window indeed displays:
Your Environment (please complete the following information):
- OS: Mac 11.6.5
- Compiler: Apple clang version 13.0.0 (clang-1300.0.29.30)
- PCL Version: 1.12.1 (from Homebrew)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the range image visualization tutorial and the calls to RangeImageVisualizer::showRangeImage() and ImageViewer::render() named in the stack trace. Reproduce the crash on the reported Mac setup, comparing it with the working PCLVisualizer window. Done means the tutorial's range-image window renders without the null-pointer crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- computer-graphics, computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100