[vtk-developers] VTK 7.0 segfault in vtkContourFilter with UseScalarTree

Leif Delgass ldelgass at gmail.com
Sat Feb 6 14:14:05 EST 2016


In VTK 7.0, I am getting a segfault in vtkContourFilter when setting
UseScalarTreeOn(), but not supplying a ScalarTree pointer.  This worked in
VTK 6.3, since the filter would create a default vtkSimpleScalarTree if a
ScalarTree wasn't supplied.  However, it seems that in the following
commit, the code was changed so that now a default ScalarTree (a
vtkSpanSpace) is only supplied if the input is an unstructured grid.

https://gitlab.kitware.com/vtk/vtk/commit/8ae05d907d5b047be79574cf8cc0c3c9a816e51c#4ec6be05bae9bbde34d3583e844cc26dfc4e91ea_574_589

Restoring the deleted block from vtkContourFilter.cxx:574:589 in the above
commit fixes the problem for me.

I haven't made a test/repro case, but this should be fairly simple to
reproduce, just:

1. Attach a data set that isn't an unstructured grid (e.g. a
vtkStructuredGrid), to a vtkContourFilter.
2. Generate a couple of isovalues in the filter.
3. Set UseScalarTreeOn() in the filter and update/run the filter.

-Leif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160206/f1617571/attachment.html>


More information about the vtk-developers mailing list