View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015365VTK(No Category)public2015-03-09 13:492016-01-14 13:10
ReporterDavid Gobbi 
Assigned ToCory Quammen 
PriorityhighSeveritycrashReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6.2.0 
Target VersionFixed in Version6.2.1 
Summary0015365: Crash in vtkLookupTableMapData if called from multiple threads
DescriptionThis morning I saw a crash in the following recently-added vtkLookupTable code, when using the lookup table via vtkImageMapToColors on a multi-CPU workstation. By adding print statements, I saw that vtkLookupTableMapData() was being called from multiple threads, which were simultaneously calling the Resize() function. It looks like a mutex will be needed in order to make the code thread-safe.

  // Resize the internal table to hold the special colors at the
  // end. When this function is called repeatedly with the same size
  // lookup table, memory reallocation will be done only one the first
  // call if at all.
  vtkUnsignedCharArray* lookupTable = self->GetTable();
  vtkIdType numberOfColors = lookupTable->GetNumberOfTuples();
  vtkIdType neededSize = (numberOfColors + vtkLookupTable::NUMBER_OF_SPECIAL_COLORS) *
    lookupTable->GetNumberOfComponents();
  if (lookupTable->GetSize() < neededSize)
    {
    lookupTable->Resize(numberOfColors + vtkLookupTable::NUMBER_OF_SPECIAL_COLORS);
    }
TagsNo tags attached.
ProjectTBD
Typecrash
Attached Files

 Relationships
related to 0015903closedCory Quammen Race condition in accessing lookup table bwLut from vtkLookupTableMapData() in the TestMedical3 example 

  Notes
(0034306)
Cory Quammen (developer)
2015-03-15 00:39

Proposed bug fix posted on gerrit: http://review.source.kitware.com/#/t/5576/ [^]
(0034326)
Cory Quammen (developer)
2015-03-25 11:31

Same fix posted to GitLab: https://gitlab.kitware.com/vtk/vtk/merge_requests/36 [^]
(0034364)
Cory Quammen (developer)
2015-04-16 22:05

Commit 3461a397a49fc675a39e6a46c628cebe8cbe1fbb

Authored by Utkarsh Ayachit 21 days ago
Committed by Kitware Robot 21 days ago
2 parents b226675e dac748ae
 master ...
Merge topic '15365_thread_safety'
dac748ae BUG 15365: Fixed crash in function called from multiple threads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: David Gobbi <david.gobbi@gmail.com>
Merge-request: !36

 Issue History
Date Modified Username Field Change
2015-03-09 13:49 David Gobbi New Issue
2015-03-09 13:49 David Gobbi Assigned To => Cory Quammen
2015-03-13 09:20 Cory Quammen Priority normal => high
2015-03-13 09:20 Cory Quammen Severity minor => crash
2015-03-15 00:39 Cory Quammen Note Added: 0034306
2015-03-15 00:39 Cory Quammen Status backlog => active development
2015-03-16 14:32 Cory Quammen Status active development => gerrit review
2015-03-25 11:31 Cory Quammen Note Added: 0034326
2015-04-16 22:05 Cory Quammen Note Added: 0034364
2015-04-16 22:05 Cory Quammen Status gerrit review => closed
2015-04-16 22:05 Cory Quammen Resolution open => fixed
2015-04-16 22:05 Cory Quammen Fixed in Version => 6.2.1
2016-01-14 13:10 David Gobbi Relationship added related to 0015903


Copyright © 2000 - 2018 MantisBT Team