MantisBT - VTK
View Issue Details
0007511VTK(No Category)public2008-08-20 10:352008-09-12 11:17
Vince Magnotta 
Karthik Krishnan 
0007511: vtkSmoothPolyDataFilter Segfault
I am working on an application that uses the vtkSmoothPolyDataFilter and a dataset that was recently given to me has illuminated a bug in vtkSmoothPolyDataFilter. We are smoothing a surface representation that is constrained to a second surface using the SetSource() method. I was getting a segmentation fault in vtkSmoothPolyDataFilter. After running a test case through valgrind I tracked down the problem to incorrect allocation of the weights array, w.

Line 531 should be
  w = new double[source->GetMaxCellSize()];
It had previously referenced used input->GetMaxCellSize()

Following the code through this section, the cell variable is associated with the source dataset and thus the weights array needs to be to of the appropriate length.

This bug will only appear if you use the SetSource method and have datasets that are of different types such as an input of triangles and the source defined by triangle strips.
No tags attached.
Issue History
2008-08-20 10:35Vince MagnottaNew Issue
2008-09-11 12:31Karthik KrishnanNote Added: 0013431
2008-09-11 12:32Karthik KrishnanAssigned To => Karthik Krishnan
2008-09-11 12:32Karthik KrishnanStatusbacklog => tabled
2008-09-11 12:32Karthik KrishnanResolutionopen => fixed
2008-09-11 12:32Karthik KrishnanStatustabled => @80@
2008-09-11 12:32Karthik KrishnanNote Added: 0013432
2008-09-12 11:17David ColeStatus@80@ => closed
2008-09-12 11:17David ColeNote Added: 0013449
2011-06-16 13:11Zack GalbreathCategory => (No Category)

Karthik Krishnan   
2008-09-11 12:31   
< w = new double[input->GetMaxCellSize()];
> w = new double[source->GetMaxCellSize()];

/cvsroot/VTK/VTK/Graphics/vtkSmoothPolyDataFilter.cxx,v <-- vtkSmoothPolyDataFilter.cxx
new revision: 1.43; previous revision: 1.42
Karthik Krishnan   
2008-09-11 12:32   
/cvsroot/VTK/VTK/Graphics/vtkSmoothPolyDataFilter.cxx,v <-- vtkSmoothPolyDataFilter.cxx
new revision: 1.43; previous revision: 1.42
David Cole   
2008-09-12 11:17   
Fix also merged to the VTK-5-2 branch:

    /cvsroot/VTK/VTK/Graphics/vtkSmoothPolyDataFilter.cxx,v <-- Graphics/vtkSmoothPolyDataFilter.cxx
    new revision:; previous revision: 1.42