PointCloudLibrary / PointCloudLibrary/pcl

PCLVisualizer::close() crash, and interactor_->SetDone(true) works

Open
#5,556 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: visualization
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

https://github.com/PointCloudLibrary/pcl/blob/f17f6ddb655b1545dd00686753828ebbb0aa3c4a/visualization/src/pcl_visualizer.cpp#L4329

i'm writing same feature with PCLVisualizer with delay close, just like opencv waitKey() function, and i find when call pcl::visualization::PCLVisualizer::close () will crash in interactor_->TerminateApp (); and i also tried interactor_->ExitCallback (); and crash too. butinteractor_->SetDone(true);works.

example code:
crash in viewer_ptr_->close();
image

crash info:
[1] 209646 segmentation fault (core dumped) ./build/test_lidar_extract_plane_main --pcd_dir --debug=true

debug info:
interactor_ type: 26vtkXRenderWindowInteractor

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at visualization/src/pcl_visualizer.cpp around line 4329 and reproduce the segmentation fault from viewer_ptr_->close(). Compare the behavior of interactor_->TerminateApp(), interactor_->ExitCallback(), and interactor_->SetDone(true) using the example and debug information in this issue. Done means closing the visualizer no longer crashes and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.