View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011846VTK(No Category)public2011-02-11 13:192012-12-12 12:02
ReporterDavid Gobbi 
Assigned ToDavid Gobbi 
PriorityhighSeveritymajorReproducibilityrandom
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0011846: The vtkLinearExtrusionFilter is not thread safe
DescriptionMultiple instances of vtkLinearExtrusionFilter cannot run in multiple threads, because this filter uses static variables to store its internal method return values. The bad code, which dates back to 1995, is as follows:

double *vtkLinearExtrusionFilter::ViaNormal(double x[3], vtkIdType id,
                                           vtkDataArray *n)
{
  static double xNew[3], normal[3];
  int i;

  n->GetTuple(id, normal);
  for (i=0; i<3; i++)
    {
    xNew[i] = x[i] + this->ScaleFactor*normal[i];
    }

  return xNew;
}

double *vtkLinearExtrusionFilter::ViaVector(double x[3],
                                           vtkIdType vtkNotUsed(id),
                                           vtkDataArray *vtkNotUsed(n))
{
  static double xNew[3];
  int i;

  for (i=0; i<3; i++)
    {
    xNew[i] = x[i] + this->ScaleFactor*this->Vector[i];
    }

  return xNew;
}

double *vtkLinearExtrusionFilter::ViaPoint(double x[3], vtkIdType vtkNotUsed(id),
                                          vtkDataArray *vtkNotUsed(n))
{
  static double xNew[3];
  int i;

  for (i=0; i<3; i++)
    {
    xNew[i] = x[i] + this->ScaleFactor*(x[i] - this->ExtrusionPoint[i]);
    }

  return xNew;
}
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0025399)
David Gobbi (developer)
2011-02-11 16:02

9e49da9b34d77e047306437d6e4394e3d8eaf272

 Issue History
Date Modified Username Field Change
2011-02-11 13:19 David Gobbi New Issue
2011-02-11 16:02 David Gobbi Note Added: 0025399
2011-02-11 16:02 David Gobbi Status backlog => @80@
2011-02-11 16:02 David Gobbi Resolution open => fixed
2011-02-11 16:02 David Gobbi Assigned To => David Gobbi
2012-12-12 12:02 David Gobbi Status customer review => closed


Copyright © 2000 - 2018 MantisBT Team