Brian Stewart
Brian Stewart

Reputation: 9277

Invalid lock sequence error in an OpenSceneGraph application

I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception "attempt was made to execute an invalid lock sequence" in OpenGL32.dll. When I re-run it, I sometimes get this exception, and sometimes an exception about a "privileged instruction". The call stack looks like it is corrupted, so I can't really tell exactly where the exception is being thrown from. I ran the app quite a bit a couple of days ago and never saw this behavior. Since then I have added an else clause to a couple of ifs, and that is all. My app is a console application, is built with Visual Studio 2008, and it sets OpenScenGraph to SingleThreaded mode. Anybody seen this before? Any debugging tips?

Upvotes: 0

Views: 722

Answers (2)

Brian Stewart
Brian Stewart

Reputation: 9277

The problem turned out to be our app was picking up an incorrect version of the OpenGL DLL , instead of the one installed in System32.

Upvotes: 0

Martin Beckett
Martin Beckett

Reputation: 96139

Can you reproduce it with one of the standard examples?
Can you create a minimal app that causes this?
Do you have a machine with a different brand video card you can test it on (eg Nvidia vs. ATI) there are some issues with openscenegraph and bad OpenGL drivers.

Have you tried posting to [email protected]

Upvotes: 1

Related Questions