reference counting bug in vtkTransform or vtkAbstractTransform
Code crashing in
void vtkTransformConcatenation::DeepCopy(vtkTransformConcatenation *concat)
{
.........
if (pair->ForwardTransform)
{
pair->ForwardTransform->Delete(); // crash here
pair->ForwardTransform = NULL;
}
Replacing calls to (vtkTransform) DeepCopy with setting matrix fixes the issue. Reproducible on both vtk 5 and vtk 7 (upgraded to it in order to pick up the fix to reference bug which added pair->ForwardTransform = NULL; after Delete). Upgrading did fix the problem in certain cases, but seems not all. Unfortunately even though I can reproduce it, I have not found the way to create a short test since it involves multiple concatenations of transforms and there is no an easy way to save transform state.