ERROR: In .\vtkWin32OpenGLRenderWindow.cxx

  • ch_eb

    ch_eb - 2007-12-12

    I use the vtkFormsWindowControl for displaying. After starting the program it runs perfect for a while. Then the following error occurs:

    ERROR: In .\vtkWin32OpenGLRenderWindow.cxx, line 238
    vtkWin32OpenGLRenderWindow (053AD030): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is in use.

    I tried to debug in the C++ code of the vtk library. It seems that the program crashes during mouse interactions. I used the pdb files for debugging. Finally the program crashes because of a System Violation Exception.

    Callstack shows the following in "vtkplanewidget.cxx" :

    void vtkPlaneWidget::OnLeftButtonDown()
      int X = this->Interactor->GetEventPosition()[0];

    Maybe the Interactor is null...
    I try to find a solution for this problem for days but I have no idea...

    Any suggestions? Thanks for help!

    • Alex

      Alex - 2008-02-26

      I have the same proplem... and no solution for it...

    • Alex

      Alex - 2008-02-28

      I found the reason in my project :) it is:

      renWin.AddObserver((uint)vtk.EventIds.AbortCheckEvent, this.AbortCheckCallback);

      private void AbortCheckCallback(vtkObject caller, uint eventId, object clientData, IntPtr callData)
                  vtkRenderWindow renWin = vtkRenderWindow.SafeDownCast(caller);
                  if(renWin != null)
                      if (renWin.GetEventPending() != 0)

      I comment "renWin.AddObserver((uint)vtk.EventIds.AbortCheckEvent, this.AbortCheckCallback);" and have no more such exception

      But I need this abort, any idia how to make it correctly?


Log in to post a comment.