Page 1 of 1

[SOLVED] Access violation on window creation using OpenGL render systems

Posted: Wed Aug 01, 2018 5:28 pm
by taigore
Ogre Version: 1.11.1
Operating System: Windows 10 x64
Render System: GL and GL3Plus

Hello everyone.

I just signed up to the forum to ask a question about a quite strange error.

I tried to call Ogre from a C++ application, and as long as I used the Direct3D11 render system no issues surfaced, until I tried to populate the SceneManager with some entities, but that's for another question.
I then switched to the OpenGL-based renderers, but both seem to fail at window creation, when an "0xC0000005: Access violation executing location 0x00000000" is thrown.

Indeed it seems that at window registration, NULL is set as the lpfnWndProc, and I confirmed it by trying to register a similarly configured window class, which raises the same error at window creation.
However, NULL is explicitly given as the value, so it looks somehow intentional.
What was the reason for doing so? Is still valid or due a fix?
For reference, the code is in the file OgreWin32Window.cpp, lines from 378 to 422, with the exception being thrown at 414.

I tried searching for a previous post about this, but after a quick search I found just this topic, without answers.

Re: Access violation on window creation using OpenGL render systems

Posted: Wed Aug 01, 2018 10:45 pm
by paroj

Re: [SOLVED] Access violation on window creation using OpenGL render systems

Posted: Tue Aug 07, 2018 10:54 am
by taigore
Yes, that fixes it indeed. Thanks for the reply