Error: System.AccessViolationException ?!

Nexam

21-07-2008 09:50:41


Exception non gérée : System.AccessViolationException: Tentative de lecture ou d
'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est end
ommagée.
à Ogre.Root.startRendering(Root* )
à Mogre.Root.StartRendering() dans d:\cubicalminds\mogreworld\mogre\mogre\src
\auto\mogreroot.cpp:ligne 222
à OniEngine.Graphics.GraphicCore.BeginRendering() dans C:\Developpement\Oni G
ame\Oni Engine\Graphics\GraphicCore.cs:ligne 83
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, Co
ntextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
Appuyez sur une touche pour continuer...



Link : http://msdn.microsoft.com/en-us/library/ms164911(VS.80).aspx

This error crash my game anytime.... Not on a specific function, but always when Engine load a texture (i think).
An end of an Ogre.Log:

10:40:25: Texture: textbox.R.png: Loading 1 faces(PF_A8R8G8B8,7x13x1) with 3 generated mipmaps from Image. Internal format is PF_A8R8G8B8,7x13x1.
10:40:25: Texture: textbox.B.png: Loading 1 faces(PF_A8R8G8B8,15x8x1) with 3 generated mipmaps from Image. Internal format is PF_A8R8G8B8,15x8x1.
10:40:25: Texture: textbox.L.png: Loading 1 faces(PF_A8R8G8B8,8x13x1) with 3 generated mipmaps from Image. Internal format is PF_A8R8G8B8,8x13x1.
10:40:25: Texture: textbox.png: Loading 1 faces(PF_A8R8G8B8,15x13x1) with 3 generated mipmaps from Image. Internal format is PF_A8R8G8B8,15x13x1.
10:40:25: Texture: ConnectButton.texPtr: Loading 1 faces(PF_A8R8G8B8,111x42x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,111x42x1.
10:40:25: Texture: ConnectButton.over.texPtr: Loading 1 faces(PF_A8R8G8B8,111x42x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,111x42x1.
10:40:25: Texture: ConnectButton.down.texPtr: Loading 1 faces(PF_A8R8G8B8,111x42x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,111x42x1.
10:40:25: Creating viewport on target 'O.n.i', rendering from camera 'SceneCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 1
10:40:25: Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
10:40:31: Creating viewport on target 'O.n.i', rendering from camera 'SceneCamera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
10:40:31: Texture: axes.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
10:40:31: Texture: ButtonArrow.texPtr: Loading 1 faces(PF_A8R8G8B8,30x30x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,30x30x1.
10:40:31: Texture: ButtonArrow.over.texPtr: Loading 1 faces(PF_A8R8G8B8,30x30x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,30x30x1.
10:40:31: Texture: ButtonArrow.down.texPtr: Loading 1 faces(PF_A8R8G8B8,30x30x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,30x30x1.



Client doesn't crash always at the same time, so i don't understand where is the problem.

Some help will be great :)

Nexam

21-07-2008 23:15:41

After investigation, i think bug appear when Mogre want to display a texture before texture is totaly load...

So, how can i do in order to load texture i need before use them ?
I can load every texture, it will be too big...
And i can't realy know wich texture i will use...