[vtk-developers] vtkMINCImageAttributes regression in master vs 6.3, related to new vtkDataArray changes?

Sean McBride sean at rogue-research.com
Thu Apr 21 12:55:43 EDT 2016


On Thu, 21 Apr 2016 12:05:30 -0400, David Lonie said:

>> GetBuffer() returns null, which it doesn't in 6.3.
>
>vtkBuffer::GetBuffer should only return NULL when there's no data in the
>array, in which case the returned pointer should not be dereferenced
>anyway. What is the actual error you're seeing?

Superficially, my problem is that in VTK 6.3 and earlier, with every MINC file we have in our testing collection, vtkMINCImageAttributes::GetAttributeValueAsString() never returns null, now with git master it sometimes does.  My code is assuming (perhaps incorrectly?) that null is never returned, and I unconditionally dereference it and thus now crash.

So to compare, I'm now stepping through in 6.3 where GetPointer is:

  T* GetPointer(vtkIdType id) { return this->Array + id; }

here, this->Array is not null, but instead is a pointer to an empty string.

Cheers,

-- 
____________________________________________________________
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