[vtkusers] [vtk-developers] Crash in vtkImageStencil after update to VTK 6
Sean McBride
sean at rogue-research.com
Tue Dec 9 17:36:48 EST 2014
On Tue, 9 Dec 2014 13:45:31 -0700, David Gobbi said:
>The vtkImageStencilData filter had some bugs relating to the way it handled
>tolerance, and these were fixed only a few weeks ago. Setting Tolerance to
>zero will keep the bugs from manifesting. But I definitely recommend that
>you use the latest VTK master if possible, if you are depending on
>vtkPolyDataToImageStencil.
David,
Thanks for your reply. I've just checked git master and it repros there too.
>However, they weren't the kind of bugs that would cause a crash, so the
>crash surprises me. I'll look at vtkImageStencil for clues. As far as I
>understand, vtkImageStencil itself hasn't changed since VTK 5.
The crash is in a secondary thread here:
#0 void vtkCopyPixel<unsigned char>(unsigned char*&, unsigned char const*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:99
#1 void vtkImageStencilExecute<unsigned char>(vtkImageStencil*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, int*, int, vtkInformation*) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:194
#2 vtkImageStencil::ThreadedRequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*, vtkImageData***, vtkImageData**, int*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:324
#3 vtkThreadedImageAlgorithmThreadedExecute(void*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:200
#4 _pthread_body ()
#5 _pthread_start ()
#6 thread_start ()
the main thread meanwhile always seems to be in vtkCopyPixel at the same time:
#0 void vtkCopyPixel<unsigned char>(unsigned char*&, unsigned char const*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:96
#1 void vtkImageStencilExecute<unsigned char>(vtkImageStencil*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, vtkImageData*, unsigned char*, int*, int, vtkInformation*) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:194
#2 vtkImageStencil::ThreadedRequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*, vtkImageData***, vtkImageData**, int*, int) at /VTK/Imaging/Stencil/vtkImageStencil.cxx:324
#3 vtkThreadedImageAlgorithmThreadedExecute(void*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:200
#4 vtkMultiThreader::SingleMethodExecute() at /VTK/Common/Core/vtkMultiThreader.cxx:390
#5 vtkThreadedImageAlgorithm::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkThreadedImageAlgorithm.cxx:294
#6 vtkImageAlgorithm::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkImageAlgorithm.cxx:103
#7 vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkExecutive.cxx:775
#8 vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:491
#9 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx:178
#10 vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:274
#11 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) at /VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx:310
#12 vtkDemandDrivenPipeline::UpdateData(int) at /VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx:441
#13 vtkStreamingDemandDrivenPipeline::Update(int) at /VTK/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx:363
#14 vtkAlgorithm::Update(int) at /VTK/Common/ExecutionModel/vtkAlgorithm.cxx:1455
#15 vtkAlgorithm::Update() at /VTK/Common/ExecutionModel/vtkAlgorithm.cxx:1449
If I force vtkMultiThreader::SetGlobalMaximumNumberOfThreads(1), then it crashes all the same, again in vtkCopyPixel.
Sean
More information about the vtkusers
mailing list