[vtkusers] vtkPointLocator seg faults at BuildLocator

David Doria daviddoria+vtk at gmail.com
Thu Aug 26 12:03:07 EDT 2010


On Thu, Aug 26, 2010 at 11:51 AM, Chris Turner
<cturnercomplex at googlemail.com> wrote:
> Hi Everyone,
>
> when I try to use the vtkPointLocator on a vtkPolyData my program seg
> faults when ever I call BuildLocator:
>
> Here is the code:
>
>    pd=vtk.vtkPolyData()
>    pd.DeepCopy(polyData_org)
>    pointLocator=vtk.vtkPointLocator()
>    pointLocator.SetDataSet(pd)
>    print "before BuildLocator"
>    sys.stdout.flush()
>    pointLocator.BuildLocator()
>    print "after BuildLocator"
>    sys.stdout.flush()
>    id = pointLocator.FindClosestPoint(pt[0],pt[1],pt[2])
>
> Here is the backtrace:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007f21ab328c40 in vtkIdList::InsertNextId (this=0x40011,
> vtkid=33286) at /VTK/Common/vtkIdList.h:122
> 122       if ( this->NumberOfIds >= this->Size )
> (gdb) bt
> #0  0x00007f21ab328c40 in vtkIdList::InsertNextId (this=0x40011,
> vtkid=33286) at /VTK/Common/vtkIdList.h:122
> #1  0x00007f21a5b47cf6 in vtkPointLocator::BuildLocator
> (this=0xc1ac470) at /VTK/Filtering/vtkPointLocator.cxx:1013
> #2  0x00007f21a67ca7c8 in vtkPointLocatorCppCommand (op=0xc1ac470,
> interp=0x15eb9b0, argc=2, argv=0x7fff2a29f410)
>
>
> Anybody an idea?
>
>
> Thanks,
> Chris

Does this work?

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointLocator_Radius

Which version of VTK are you using?

David



More information about the vtkusers mailing list