Crash in VTK 6.2 at exit
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Static version of VTK causes crash inside msvcrt.exit() call in my program and many tests. Debugging of this problem shows following trace of code:
...
vtkObjectFactory.cxx:444 (vtkObjectFactory::UnRegisterAllFactories()) vtkObjectFactory::RegisteredFactories->Delete();
...
vtkCollection.cxx:40 (~vtkCollection()) this->RemoveAllItems();
vtkCollection.cxx:199 (vtkCollection::RemoveAllItems()) this->Modified();
vtkObject.cxx:850 (vtkObject::Modified()) this->MTime.Modified();
vtkTimeStamp.cxx:41 (vtkTimeStamp::Modified()) this->ModifiedTime = (unsigned long)++GlobalTimeStamp;
...
ntdll.RtlEnterCriticalSection(<<pGarbageInHeap>>)
Seems that object GlobalTimeStamp destroyed before vtkObjectFactory::RegisteredFactories. VTK 6.2.0, compiled with CMake 3.2.1 and gcc 4.9.2 (MinGW-w64 32bit). OS: Windows 7 32bit.