[vtkusers] GetFieldData segfaults
Berk Geveci
berk.geveci at kitware.com
Thu Apr 23 12:58:08 EDT 2009
Maybe the polydata pointer is invalid? Or maybe there is some issues
with using smart pointers. Try this:
vtkFieldData* FieldData = polydata->GetFieldData();
where polydata is not a smart pointer.
-berk
On Thu, Apr 23, 2009 at 12:29 PM, David Doria <daviddoria at gmail.com> wrote:
> With some models, the following call causes a segmentation fault:
> vtkSmartPointer<vtkFieldData> FieldData = polydata->GetFieldData();
>
> I was originally calling
> vtkSmartPointer<vtkDoubleArray> ScannerLocationArray =
> vtkDoubleArray::SafeDownCast(polydata->GetFieldData()->GetArray("ScannerLocation"));
>
> but I thought the ->GetArray() might be failing if GetFieldData returned
> null, so I tried to get the entire field data, and it still crashes.
>
> Any thoughts?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list