[vtk-developers] Help with vtkImageDataGeometryFilter.cxx:250...

Sean McBride sean at rogue-research.com
Fri Mar 8 19:25:53 EST 2013


Hi again!

clang's -fsanitize=null gives:

Filters/Geometry/vtkImageDataGeometryFilter.cxx:250:28: runtime error: member call on null pointer of type 'vtkCellArray'

on this line:

  newPolys->Allocate(newLines->EstimateSize(numPolys,4));

Looking at the code, it does indeed seem that in the "case 2:" branch, 'newLines' is never set.

Frankly, I'm amazed this doesn't crash everywhere, all the time.  But I even added an "assert(newLines)" and it definitely is null.  

Not sure what the right fix is here though... anyone?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtk-developers mailing list