MantisBT - VTK
View Issue Details
0015485VTK(No Category)public2015-05-23 10:122016-08-12 09:55
Vladimir 
Joachim Pouderoux 
normalminorhave not tried
closedmoved 
 
 
TBD
crash
0015485: Crash in VTK 6.2 at exit
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.
No tags attached.
7z vtkTEst2.7z (792) 2016-02-11 11:05
https://www.vtk.org/Bug/file/10036/vtkTEst2.7z
Issue History
2015-05-23 10:12VladimirNew Issue
2015-09-11 02:46boris airieauNote Added: 0035210
2016-02-11 11:05Tomislav LugarićNote Added: 0035709
2016-02-11 11:05Tomislav LugarićFile Added: vtkTEst2.7z
2016-02-17 10:35Joachim PouderouxNote Added: 0035746
2016-02-17 10:35Joachim PouderouxAssigned To => Joachim Pouderoux
2016-02-17 11:05Tomislav LugarićNote Added: 0035747
2016-08-12 09:55Kitware RobotNote Added: 0037389
2016-08-12 09:55Kitware RobotStatusbacklog => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0035210)
boris airieau   
2015-09-11 02:46   
Same problem on pvserver exit.

Paraview 4.3.1 with VTK 6.2.0, compiled with gcc 4.4.7
OS : CentOS 6.5
(0035709)
Tomislav Lugarić   
2016-02-11 11:05   
I have ran into this problem on Windows 8, and looked into it further. It seems like this is caused by the compiler. It started appearing after I started using MinGW-4.9.3. I am attaching a minimal example (vtkTest2.7z). It is built with QtCreator/qmake, but I have it configured to not use any QT libraries, only VTK.

I tried 4 scenarios:
1) VTK 6.2/6.3 built with MinGW-4.9.2, example with MinGW-4.9.2 -> no problem
2) VTK 6.2/6.3 built with MinGW-4.9.3, example with MinGW-4.9.2 -> no problem
3) VTK 6.2/6.3 built with MinGW-4.9.2, example with MinGW-4.9.3 -> crash
4) VTK 6.2/6.3 built with MinGW-4.9.3, example with MinGW-4.9.3 -> crash

The same behaviour occurs with static and dynamic builds, and with VTK 6.2 and 6.3.

On Linux (CentOS 6.7 and Ubuntu 14.10) there is no crash (gcc 4.9.3 in both cases)

MinGW-4.9.2 downloaded from: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download [^]
MinGW-4.9.3 downloaded from: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.3/threads-win32/seh/x86_64-4.9.3-release-win32-seh-rt_v4-rev1.7z/download [^]
(0035746)
Joachim Pouderoux   
2016-02-17 10:35   
Vladim,

Tested with VTK 7.0.0.
I can't reproduce the problem on Linux. Does it only appear on Windows/mingw, do you have it with VC++?

Thanks,
Joachim
(0035747)
Tomislav Lugarić   
2016-02-17 11:05   
I don't know about others, but I only had this problem on Windows, and only with MinGW-4.9.3. Never managed to reproduce it with Linux. Unfortunately I am unable to test it with VC++
(0037389)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.