Segfault with vtkLoopSubdivisionFilter
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I am using vtkLoopSubdivisionFilter with Python on OS X. The segfault happens with VTK 6.0.0 and VTK 6.1.0 RC 1.
Here is my code, I added the stl file I use (I exported the polydata I wanted to smooth, so you can reproduce the bug). I also tried with using vtkCleanPolyData before the smoothing; but that does not change anything.
#!/usr/bin/env python
import vtk
filename = "test2.stl"
reader = vtk.vtkSTLReader() reader.SetFileName(filename)
smooth = vtk.vtkLoopSubdivisionFilter() smooth.SetNumberOfSubdivisions(2) smooth.SetInputConnection(reader.GetOutputPort()) smooth.Update()
The error message of the segfault :
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_c.dylib 0x00007fff8bc13b16 small_free_list_remove_ptr + 318 1 libsystem_c.dylib 0x00007fff8bc17c53 szone_free_definite_size + 3495 2 libsystem_c.dylib 0x00007fff8bc50789 free + 194 3 libvtkCommonDataModel-6.0.1.dylib 0x0000000108e65cae vtkEdgeTable::Initialize() + 78 4 libvtkCommonDataModel-6.0.1.dylib 0x0000000108e65ea1 vtkEdgeTable::~vtkEdgeTable() + 25 5 libvtkCommonDataModel-6.0.1.dylib 0x0000000108e65e5f vtkEdgeTable::~vtkEdgeTable() + 15 6 libvtkCommonCore-6.0.1.dylib 0x00000001087cd6dd vtkObject::UnRegisterInternal(vtkObjectBase*, int) + 605 7 libvtkFiltersModeling-6.0.1.dylib 0x000000010c0afd8c vtkLoopSubdivisionFilter::GenerateSubdivisionPoints(vtkPolyData*, vtkIntArray*, vtkPoints*, vtkPointData*) + 782 8 libvtkFiltersGeneral-6.0.1.dylib 0x0000000109a5ef24 vtkApproximatingSubdivisionFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 1036 9 libvtkFiltersModeling-6.0.1.dylib 0x000000010c0b0752 vtkLoopSubdivisionFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 728 10 libvtkCommonExecutionModel-6.0.1.dylib 0x000000010924550a vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) + 66 11 libvtkCommonExecutionModel-6.0.1.dylib 0x000000010923da6f vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 61 12 libvtkCommonExecutionModel-6.0.1.dylib 0x0000000109238134 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 564 13 libvtkCommonExecutionModel-6.0.1.dylib 0x000000010923d32f vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 727 14 libvtkCommonExecutionModel-6.0.1.dylib 0x000000010925734d vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 707 15 libvtkCommonExecutionModel-6.0.1.dylib 0x000000010923d814 vtkDemandDrivenPipeline::UpdateData(int) + 246 16 libvtkCommonExecutionModel-6.0.1.dylib 0x0000000109257797 vtkStreamingDemandDrivenPipeline::Update(int) + 137 17 libvtkCommonExecutionModelPython27D-6.0.1.dylib 0x00000001091a78d9 ZL21PyvtkAlgorithm_UpdateP7_objectS0 + 305 18 org.python.python 0x00000001080965ac PyEval_EvalFrameEx + 7873 19 org.python.python 0x00000001080945c1 PyEval_EvalCodeEx + 1638 20 org.python.python 0x0000000108093f55 PyEval_EvalCode + 54 21 org.python.python 0x00000001080b2db4 run_mod + 53 22 org.python.python 0x00000001080b2e5b PyRun_FileExFlags + 137 23 org.python.python 0x00000001080b29a9 PyRun_SimpleFileExFlags + 718 24 org.python.python 0x00000001080c354f Py_Main + 3039 25 org.python.python 0x0000000108011f2c 0x108010000 + 7980