Exporting with vtkXMLPolyDataWriter using SetInputData() crashes the java virtual machine
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I am using VTK 6.2 and Java 8.
When exporting an actor with quadrilateral facets, the java virtual machine crashes. I examined the content of the vtkPolyData object using print() method and it looked reasonable (see attached).
public void exportGraphicFile(String filename) { //Write the file vtkActor testActor = elementFaceActor; vtkPolyDataMapper testMapper = (vtkPolyDataMapper) testActor.GetMapper(); vtkPolyData polyData = testMapper.GetInput();
vtkXMLPolyDataWriter writer = new vtkXMLPolyDataWriter();
writer.SetFileName(filename);
writer.SetInputData(polyData);
//Optional - set the mode. The default is binary.
//writer.SetDataModeToBinary(); // not used
writer.SetDataModeToAscii();
//writer.Update(); // This crashes the Java VM
writer.Write(); // This also crashes the Java VM
}