|
Notes |
|
|
(0003964)
|
|
Mathieu Malaterre
|
|
2006-04-04 18:40
|
|
|
Can you provide an example to reproduce the problem ? Thanks |
|
|
|
(0003966)
|
|
Helmut Herrmann
|
|
2006-04-05 04:18
|
|
|
I tried to provide an example to reproduce the problem. Unfortunately, I cannot reproduce it with a simple and small Windows application. I assume the probem is connected to the architecture of our application and to the use of Qt. I can try to create a Qt based example. However, in this case I would have to send you qt-mt334.dll. Would that be ok for you? |
|
|
|
(0003977)
|
|
Helmut Herrmann
|
|
2006-04-07 06:27
|
|
As I mentioned in a previous comment, I have not been able to create a simple application that reproduces the problem. Even our application does not always crash. So I decided to describe the problem in more detail without providing a running example.
Our application is based on Qt 3.3.4 and consists of almost 100 DLLs. On demand one of these DLLs loads a Qt and VTK based DLL used for 3D visualization. The application executes scripts. When I leave a script in order to run another script, the visualization DLL is freed. If the next script also requires 3D visualization, it reloads the VTK based module. Thus, it is possible that during a session the VTK module is loaded and freed several times.
The events concerning vtkWin32OpenGLRenderWindow.cxx are as follows:
1st script execution
--------------------
InitializeApplication():
this->ApplicationInstance = 0
this->ParentId = 0x...
Calling this->ApplicationInstance = (HINSTANCE)vtkGetWindowLong(this->ParentId,vtkGWLP_HINSTANCE);
-> this->ApplicationInstance = 0x400000
CreateAWindow():
GetClassInfo(this->ApplicationInstance,"vtkOpenGL",&wndClass) = 0
-> RegisterClass(&wndClass) is called
CreateAWindow(): -> OK
2nd or later script execution
-----------------------------
InitializeApplication():
this->ApplicationInstance = 0
this->ParentId = 0x...
Calling this->ApplicationInstance = (HINSTANCE)vtkGetWindowLong(this->ParentId,vtkGWLP_HINSTANCE);
-> this->ApplicationInstance = 0x400000
CreateAWindow():
GetClassInfo(this->ApplicationInstance,"vtkOpenGL",&wndClass) != 0
-> RegisterClass(&wndClass) is NOT called
CreateAWindow(): -> might CRASH
The difference between first and later script execution is that during the first run GetClassInfo() is 0 and in the later runs it is no longer 0 and RegisterClass() is not called. Thus, I added UnregisterClass() to the destructor of vtkWin32OpenGLRenderWindow and have had no more crashes.
|
|
|
|
(0036851)
|
|
Kitware Robot
|
|
2016-08-12 09:54
|
|
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. |
|