[vtkusers] Error during cleanup: wglMakeCurrent failed in Clean()

Zamir Khan zkhan at modusmed.com
Wed Nov 25 11:19:27 EST 2009


I am seeing the following errors from a VTK 5 / MFC application when I 
close it:

ERROR: In ..\..\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 113
vtkWin32OpenGLRenderWindow (0685AF70): wglMakeCurrent failed in Clean(), 
error: 6

ERROR: In ..\..\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 113
vtkWin32OpenGLRenderWindow (0698BAE8): wglMakeCurrent failed in Clean(), 
error: 6

The error will appear 2 or 3 times in the debug output file, depending 
on what actions I have taken in the program (I assume for the instances 
of vtkRenderWindow that are problematic). Also, I can only reproduce it 
on certain platforms (doesn't happen on machine with NVIDIA, but does on 
machine with Intel integrated graphics). I have searched the mailing 
list and the recommendation appears to be to make sure to Finalize() the 
vtkRenderWindow (there are 3 of them being instantiated in this 
application). In the destructor of each of the classes that instantiate 
vtkRenderWindows, I have the following code snippets:

    if (renWin)
    {
        renWin->Finalize();
        renWin->Delete();
    }
    if (renderer)
    {
        renderer->RemoveAllViewProps();
        renderer->Delete();
    }

However, this does not resolve the issue. Any help is appreciated!

Thanks,
Zamir

-- 
Zamir Khan
Modus Medical Devices
e-mail: zkhan at modusmed.com




More information about the vtkusers mailing list