-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can NOT close PCLVisualizer #3959
Comments
It originally sounded like a duplicate of #172 but with the VTK version you're using, you should no longer have that problem. :/ |
@SergioRAgostinho I have investigated #172 , and tried every solution that issue mentioned, but my problem still unsolved... |
And I am pretty sure that the pcl library has been linked to VTK 8.2.0
|
Any updates? |
@lihk11 I had the same problem with pcl 1.11 and vtk 8.2. It turns out the problem is caused by the immediate pause (the while loop) after viewer.close(). #include <pcl/visualization/pcl_visualizer.h>
#include <iostream>
int main(void) {
pcl::visualization::PCLVisualizer viewer1("viewer1");
while (!viewer1.wasStopped()) {
viewer1.spinOnce();
}
viewer1.close();
while (true) {} // if you remove this line, the close will be successful
pcl::visualization::PCLVisualizer viewer2("viewer2");
// now you can see two viewer windows. However,
// if you comment out the while(true) line,
// there should be only one window now.
while (!viewer2.wasStopped()) {
viewer2.spinOnce();
}
viewer2.close();
} Beside |
I don't think the problem is caused by inmmediate pause. A window will always remain before the whole program exits. |
I see, that's a slightly different problem. I don't know if the last window will stay till the program exits. My case is that I need to draw and inspect different things in a loop; after 100 loops, I would end up with 99 dead windows.... So I basically can not do large loops. Now this problem is fixed, the window in each loop can close before the next loop starts. |
any news? is there a way to hide the window then? |
@tpham3783 What OS / PCL version do you use? |
this issue fix by updating VTK(9.2 or master) and rebuild PCL with it. |
Can NOT close PCLVisualizer
As a thread on Stackoverflow said,
And I am experiencing the very same problem, could someone give some workarounds?
Code to reproduce the problem:
OS: Ubuntu 18.04
gcc:(Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
VTK: 8.2.0
pcl: 1.9.1 or 1.10.1
The text was updated successfully, but these errors were encountered: