vtkCellLocator::FindClosestPointWithinRadius does not check return value of EvaluatePosition
vtkCellLocator::FindClosestPointWithinRadius
uses EvaluatePosition
twice:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataModel/vtkCellLocator.cxx#L413-L414
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataModel/vtkCellLocator.cxx#L530-L532
The if
s that follow these calls should be modified to become
if (tmpInside != -1 && dist2 < minDist2)
If this does not happen invalid data is written to the output as the returned dist2
is -1 and in my case this eventually leads to a segfault.