AccessViolationException at new Mogre.Root()

hencz

22-05-2010 18:57:30

Hello

When I try to run a sample project I get this message
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=Mogre
StackTrace:
at Ogre.Root.{ctor}(Root* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
at Mogre.Root..ctor() in d:\devel\gamedevel\mogre\main\src\auto\mogreroot.cpp:line 64
at Mogre.Demo.ExampleApplication.Example.Setup() in D:\MogreSDK\Samples\ExampleApplication\Example.cs:line 66
at Mogre.Demo.ExampleApplication.Example.Go() in D:\MogreSDK\Samples\ExampleApplication\Example.cs:line 51
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1[T0](CallSite site, T0 arg0)
at Mogre.Demo.Fresnel.Program.Main(String[] args) in D:\MogreSDK\Samples\Fresnel\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Thanks for any help.

mstoyke

23-05-2010 01:21:21

Have you tried to run a Mogre sample or one of the Ogre samples?

If you run the normal Ogre sample programs with a mogre-compiled ogre version the application will crash. You need to compile the samples against the mogre-modified version of ogre. That is because for mogre, some changes in the ogre objects where made to help with connecting the native ogre types to their managed wrapper classes.

smiley80

23-05-2010 01:25:02

Check the ogre.log file. That might contain a more meaningful error message.

hencz

23-05-2010 06:44:34

The samples work on my laptop(windows 7) but they crash on my pc(xp).
I mean mogre samples.
Here is the ogre.log:
08:08:07: Creating resource group General
08:08:07: Creating resource group Internal
08:08:07: Creating resource group Autodetect
08:08:07: SceneManagerFactory for type 'DefaultSceneManager' registered.
08:08:07: Registering ResourceManager for type Material
08:08:07: Registering ResourceManager for type Mesh
08:08:07: Registering ResourceManager for type Skeleton
08:08:07: MovableObjectFactory for type 'ParticleSystem' registered.
08:08:07: OverlayElementFactory for type Panel registered.
08:08:07: OverlayElementFactory for type BorderPanel registered.
08:08:07: OverlayElementFactory for type TextArea registered.
08:08:07: Registering ResourceManager for type Font
08:08:07: ArchiveFactory for archive type FileSystem registered.
08:08:07: ArchiveFactory for archive type Zip registered.
08:08:07: DDS codec registering
08:08:07: FreeImage version: 3.13.1
08:08:07: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
08:08:07: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz
08:08:07: PVRTC codec registering
08:08:07: Registering ResourceManager for type HighLevelGpuProgram
08:08:07: Registering ResourceManager for type Compositor
08:08:07: MovableObjectFactory for type 'Entity' registered.
08:08:07: MovableObjectFactory for type 'Light' registered.
08:08:07: MovableObjectFactory for type 'BillboardSet' registered.
08:08:07: MovableObjectFactory for type 'ManualObject' registered.
08:08:07: MovableObjectFactory for type 'BillboardChain' registered.
08:08:07: MovableObjectFactory for type 'RibbonTrail' registered.
08:08:07: Loading library .\RenderSystem_Direct3D9
08:08:07: Installing plugin: D3D9 RenderSystem
08:08:07: D3D9 : Direct3D9 Rendering Subsystem created.
08:08:07: D3D9: Driver Detection Starts
08:08:07: D3D9: Driver Detection Ends
08:08:07: Plugin successfully installed
08:08:07: Loading library .\RenderSystem_GL
08:08:07: Installing plugin: GL RenderSystem
08:08:07: OpenGL Rendering Subsystem created.

smiley80

23-05-2010 16:36:38

Looks like there's a problem with the OpenGL renderer. You can check that by removing the 'Plugin=RenderSystem_GL' line from plugins.cfg.
If that prevents the exception, try to update your graphics card driver (from the manufacturer's site not from Microsoft).

hencz

23-05-2010 16:54:57

It works now :D thanks
I've reinstalled my graphics driver, the opengl doesn't seem to work tough.
Nevermind directX is enough for me :lol: