[vtk-developers] [VTK 0013384]: vtkColorTransferFunction::GetTable race condition

Mantis Bug Tracker mantis at public.kitware.com
Wed Aug 22 04:52:53 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.vtk.org/Bug/view.php?id=13384 
====================================================================== 
Reported By:                John Stark
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   13384
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     backlog
Project:                    TBD 
Type:                       crash 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2012-08-22 04:52 EDT
Last Modified:              2012-08-22 04:52 EDT
====================================================================== 
Summary:                    vtkColorTransferFunction::GetTable race condition
Description: 
When vtkColorTransferFunction is used with vtkImageMapToColors a race condition
can arise during running leading to corrupted output or a crash.

The issue is caused by the re-allocation and re-computation of the lookup table
(LUT) performed in vtkColorTransferFunction::GetTable(). Because
vtkImageMapToColors is a multi-threaded algorithm, GetTable can be called by
many threads simultaneously. The re-allocation and computation should be
protected with a mutex or critical section.

Only vtkImageData using unsigned char or unsigned short pixel data are affected.

My solution was to protect GetTable with a vtkCriticalSection.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-08-22 04:52 John Stark     New Issue                                    
======================================================================




More information about the vtk-developers mailing list