"attempt to write protected memory"


02-11-2013 20:37:36

I have just started to work with MOGRE and tryed to create application without tutorial framework, but I have problem with this.

root = new Root();
root.RenderSystem = root.GetRenderSystemByName("Direct3D9 Rendering Subsystem");
window = root.CreateRenderWindow(title, width, height, fullscreen);

An exception has been thrown in third line: "attempt to write protected memory" or something like this. Why so? What should I do to fix this?

Sorry for my broken english.


11-11-2013 23:22:20

Hi Aliksht,

welcome to the Mogre world.
It's recommended to go through the basic tutorials.

Additionally you can learn important basics by the source code of the TutorialFramework, which you can add to your own project and modify as you want.
You find the code here:

And here is a further note:
http://www.ogre3d.org/tikiwiki/Mogre+Wi ... Other+Uses

It's important to have a lock to your ogre.log file. Search for exceptions. They tell you the reasons of crashes.
Without these details it's difficult to help.

Here I wrote some notes about the common "MemoryViolationExceptions":