AccessViolationException without any more details


29-10-2009 10:41:04

I already asked this questions in OGRE forum, however this seems to be MOGRE issue. The OGRe thread is here

I use MOGRE and try to create a game. I already have created terrain (which is actually set of manualobjects), where game tiles are grouped to bigger manualobjects (e.g. 5x5 tiles is one manual object). Because of there is no way to enable LOD for manual objects(or that's what I was told), the easiest way to apply "LOD" was to generate detailed terrain, change the number of vertices per tile and generate it again.
I currently use three "LOD objects". In the most detailed one has every tile 20x20 vertices, in the second one 10x10 vertices and in the least detailed (third) 2x2 vertices. In the specified height are these LODs changed to less(more) detailed one.
This approach works pretty well. Or more precisely it works great for small maps (20x20 tiles). I have created a big map (130x70 tiles) which works when there is just one (most detailed) LOD. When I enable all three LODs, it throws exception in Ogre.Root.renderOneFrame(Root* ). There are not so many details about this excpetion.

Does anyone know what can be the problem here? Is there a limitation of the number of vertices, or something similar?
I haven't counted the real number of vertices, however I think there can be altogether roughly 7millions vertices for all three LOD layers (but in one moment is just one displayed)

The exception is "Memory Access Violation". There are no more details, really. I have tried to enable unmanaged debugging and started it. When the unmanaged debugging was enabled, there was no exception and everything worked ok (lower performance, but ok). When I disabled it again, it failed. In output window is just "A first chance exception of type 'System.AccessViolationException' occurred in Mogre.dll".

Thamnk you Pavel


29-10-2009 14:04:14


looking at the exception (and to the ogre.log you have posted in the other thread), it seem you use the release version of mogre. try to use the debug version (the *_d.dll), then use the debugger to step through your program when enabling the LODs. this way, you could step into the mogre code. you could also post some sample code here, so i could test it myself.


30-10-2009 13:26:23

Hi GantZ,
you are right. I actually use release version of dll. I swapped it to debug version, but there were another exceptions not related to this one thrown before this one is actually thrown. Maybe I use wrong verion of MOGRE. Let me with this and I will send the exception details whenever I will fix the other issues.
Thank you Pavel


03-11-2009 21:50:15

I have found out, that this is actually Miyagi exception and has nothing to do with mogre. I am sorry for it.
THank you for your help. Pavel