Segmentation fault when clearing the pcl visualizer using RemoveAllViewProps
In my application I use vtkObjImporter class to import textured obj files into pcl visualizer. I need to clear the visualizer screen at different times.
vtk API RemoveAllViewProps causes a segmentation fault if I use a renderer created by pcl visualizer. But if I delete the default renderer created by pcl and create my own, there is no segmentation fault. But then, when I add new pcl polygons, they cannot be visualized. Why is that ?
My goal is to clear all the vtk actors in the render window and still be able to add new actors to it. Please help me do this.
Sample Code to recreate segmentation fault when using RemoveAllViewProps on pcl's default renderer