SIGSEGV with vtkFieldData::DeepCopy
The following python script causes SIGSEGV. It was confirmed with VTK8.2.
import vtk
f = vtk.vtkFieldData()
f.AddArray(vtk.vtkStringArray())
f0 = vtk.vtkFieldData()
f0.AddArray(vtk.vtkStringArray())
f.AddArray(vtk.vtkStringArray())
# f.Initialize()
f.DeepCopy(f0)
print(f.GetNumberOfArrays())
It prints "3", and then crashes in vtkFieldData::~vtkFieldData()
.
It runs ok with output "1" if f.Initialize()
is uncommented. It
seems that this->Initialize()
is necessary at the beginning of
vtkFieldData::DeepCopy
.