[vtkusers] VTKPolyData Dummy Critical Section Issue

Brenton Thomas Brenton_Thomas at bigpond.com
Sun Jul 8 06:10:57 EDT 2007


Also having trouble with the DummyCritSect in vtkPolyData

 

It appears to not have been initialized by the time it gets to 

 

this->Information->Set(vtkDataObject::DATA_EXTENT_TYPE(),
VTK_PIECES_EXTENT);

this->Information->Set(vtkDataObject::DATA_PIECE_NUMBER(), -1);

this->Information->Set(vtkDataObject::DATA_NUMBER_OF_PIECES(), 1);

this->Information->Set(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(), 0);

 

  // static variable, initialized only once.

  DummyCritSect.Lock();

 

Well at least its address is still 0x000000000

 

This looks to be the similar to the problem that was reported in 2004 for
borland users. 

 

http://public.kitware.com/pipermail/vtkusers/2004-March/072440.html

 

 

The bad news is that I am on good old Visual C++ 2005

 

 

Any ideas. 

 

Also the destructor seems a little unusual

 

vtkPolyData::~vtkPolyData()

{

  vtkPolyData::Initialize();

  // Reference to static dummy persists. 

  // Keep destructed dummy from being used again.

  DummyCritSect.Lock();

  if (this->Dummy->GetReferenceCount() == 1)

    {

    this->Dummy->UnRegister(this);

    this->Dummy = NULL;

    }

  else

    {

    this->Dummy->UnRegister(this);

    }

  DummyCritSect.Unlock();

 

 

 

Brenton 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070708/7bd3bce6/attachment.htm>


More information about the vtkusers mailing list