Panel error: System.AccessViolationException was unhandled

mharezlak96

19-12-2011 17:06:13

Hello. I have problem with panel. It's my code (contents of few class):
public Overlay DebugConsoleOverlay;
public OverlayContainer DebugConsolePanel;
public void CreateDebugConsole()
{
DebugConsoleOverlay = OverlayManager.Singleton.Create("DebugConsole_Overlay");
DebugConsolePanel = OverlayManager.Singleton.CreateOverlayElement("Panel", "DebugConsole_Panel") as OverlayContainer;
DebugConsolePanel.MetricsMode = GuiMetricsMode.GMM_RELATIVE;
DebugConsolePanel.SetDimensions(1.0f, 0.22f);
DebugConsolePanel.SetPosition(0, 0);
DebugConsolePanel.MaterialName = "Console_B_Material";
DebugConsoleOverlay.Add2D(DebugConsolePanel);
DebugConsoleOverlay.Hide();
DebugConsolePanel.Hide();


}
public void ShowDebugConsole()
{
DebugConsoleOverlay.Show(); //Line #116
DebugConsolePanel.Show();
}


When function ShowDebugConsole() is executed Visual studio shows me error:
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory... (Orginal PL:"Nastąpiła próba odczytu lub zapisu pamięci chronionej. Często wskazuje to, że inna pamięć jest uszkodzona.")
Source=Mogre
StackTrace:
w Ogre.Overlay.show(Overlay* )
w Mogre.Overlay.Show()
w Abc.MainC.ShowDebugConsole() w File3.cs:wiersz 116
w Abc.KeyboardC.Update() w File2.cs:wiersz 283
w Abc.MainC.Update() w File.cs:wiersz 124
w Abc.Program.Main(String[] args) w Program.cs:wiersz 15
w System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
w System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
w Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
w System.Threading.ThreadHelper.ThreadStart_Context(Object state)
w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
w System.Threading.ThreadHelper.ThreadStart()
InnerException:


What is wrong?

McDonte

20-12-2011 02:18:39

Really bad error, usually there is something messed up with your binaries. Which bundle do you use? SDK, Cygon's, own...?

mharezlak96

24-12-2011 13:56:23

I use default console project from visual studio 2010 c#. I use library form link on ogre3d.org.

Tubulii

01-01-2012 20:15:36

Could you please post the ogre.log?

mharezlak96

01-01-2012 20:30:36

ogre.log while I don't press key and method ShowDebugConsole():
18:55:55: Creating resource group General
18:55:55: Creating resource group Internal
18:55:55: Creating resource group Autodetect
18:55:55: SceneManagerFactory for type 'DefaultSceneManager' registered.
18:55:55: Registering ResourceManager for type Material
18:55:55: Registering ResourceManager for type Mesh
18:55:55: Registering ResourceManager for type Skeleton
18:55:55: MovableObjectFactory for type 'ParticleSystem' registered.
18:55:55: OverlayElementFactory for type Panel registered.
18:55:55: OverlayElementFactory for type BorderPanel registered.
18:55:55: OverlayElementFactory for type TextArea registered.
18:55:55: Registering ResourceManager for type Font
18:55:55: ArchiveFactory for archive type FileSystem registered.
18:55:55: ArchiveFactory for archive type Zip registered.
18:55:55: DDS codec registering
18:55:55: FreeImage version: 3.13.1
18:55:55: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
18:55:55: 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
18:55:55: PVRTC codec registering
18:55:55: Registering ResourceManager for type HighLevelGpuProgram
18:55:55: Registering ResourceManager for type Compositor
18:55:55: MovableObjectFactory for type 'Entity' registered.
18:55:55: MovableObjectFactory for type 'Light' registered.
18:55:55: MovableObjectFactory for type 'BillboardSet' registered.
18:55:55: MovableObjectFactory for type 'ManualObject' registered.
18:55:55: MovableObjectFactory for type 'BillboardChain' registered.
18:55:55: MovableObjectFactory for type 'RibbonTrail' registered.
18:55:55: Loading library ./Libs\RenderSystem_Direct3D9
18:55:55: Installing plugin: D3D9 RenderSystem
18:55:55: D3D9 : Direct3D9 Rendering Subsystem created.
18:55:55: D3D9: Driver Detection Starts
18:55:55: D3D9: Driver Detection Ends
18:55:55: Plugin successfully installed
18:55:55: *-*-* OGRE Initialising
18:55:55: *-*-* Version 1.7.1 (Cthugha)
18:55:55: Added resource location 'Data' of type 'FileSystem' to resource group 'General'
18:55:55: Added resource location 'Data\Map1' of type 'FileSystem' to resource group 'General'
18:55:55: Added resource location 'Data\General' of type 'FileSystem' to resource group 'General'
18:55:55: Creating resource group Load1
18:55:55: Added resource location 'Data\Load' of type 'FileSystem' to resource group 'Load1'
18:55:55: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
18:55:55: D3D9 : RenderSystem Option: FSAA = 0
18:55:55: D3D9 : RenderSystem Option: Floating-point mode = Fastest
18:55:55: D3D9 : RenderSystem Option: Full Screen = No
18:55:55: D3D9 : RenderSystem Option: Rendering Device = Monitor-1-ATI Mobility Radeon HD 4570
18:55:55: D3D9 : RenderSystem Option: Resource Creation Policy = Create on all devices
18:55:55: D3D9 : RenderSystem Option: VSync = No
18:55:55: D3D9 : RenderSystem Option: VSync Interval = 1
18:55:55: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
18:55:55: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
18:55:55: CPU Identifier & Features
18:55:55: -------------------------
18:55:55: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
18:55:55: * SSE: yes
18:55:55: * SSE2: yes
18:55:55: * SSE3: yes
18:55:55: * MMX: yes
18:55:55: * MMXEXT: yes
18:55:55: * 3DNOW: no
18:55:55: * 3DNOWEXT: no
18:55:55: * CMOV: yes
18:55:55: * TSC: yes
18:55:55: * FPU: yes
18:55:55: * PRO: yes
18:55:55: * HT: no
18:55:55: -------------------------
18:55:55: D3D9 : Subsystem Initialising
18:55:55: Registering ResourceManager for type Texture
18:55:55: Registering ResourceManager for type GpuProgram
18:55:55: D3D9RenderSystem::_createRenderWindow "WorldOfFantasy GameEngine (showdconsole)", 800x600 windowed miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=false monitorIndex=0 useNVPerfHUD=false vsync=false vsyncInterval=1
18:55:55: D3D9 : Created D3D9 Rendering Window 'WorldOfFantasy GameEngine (showdconsole)' : 800x600, 32bpp
18:55:55: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
18:55:55: D3D9: Vertex texture format supported - PF_L8
18:55:55: D3D9: Vertex texture format supported - PF_L16
18:55:55: D3D9: Vertex texture format supported - PF_A8
18:55:55: D3D9: Vertex texture format supported - PF_A4L4
18:55:55: D3D9: Vertex texture format supported - PF_BYTE_LA
18:55:55: D3D9: Vertex texture format supported - PF_R5G6B5
18:55:55: D3D9: Vertex texture format supported - PF_B5G6R5
18:55:55: D3D9: Vertex texture format supported - PF_A4R4G4B4
18:55:55: D3D9: Vertex texture format supported - PF_A1R5G5B5
18:55:55: D3D9: Vertex texture format supported - PF_A8R8G8B8
18:55:55: D3D9: Vertex texture format supported - PF_B8G8R8A8
18:55:55: D3D9: Vertex texture format supported - PF_A2R10G10B10
18:55:55: D3D9: Vertex texture format supported - PF_A2B10G10R10
18:55:55: D3D9: Vertex texture format supported - PF_DXT1
18:55:55: D3D9: Vertex texture format supported - PF_DXT2
18:55:55: D3D9: Vertex texture format supported - PF_DXT3
18:55:55: D3D9: Vertex texture format supported - PF_DXT4
18:55:55: D3D9: Vertex texture format supported - PF_DXT5
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
18:55:55: D3D9: Vertex texture format supported - PF_X8R8G8B8
18:55:55: D3D9: Vertex texture format supported - PF_X8B8G8R8
18:55:55: D3D9: Vertex texture format supported - PF_R8G8B8A8
18:55:55: D3D9: Vertex texture format supported - PF_DEPTH
18:55:55: D3D9: Vertex texture format supported - PF_SHORT_RGBA
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT16_R
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT32_R
18:55:55: D3D9: Vertex texture format supported - PF_SHORT_GR
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT16_GR
18:55:55: D3D9: Vertex texture format supported - PF_FLOAT32_GR
18:55:55: D3D9: Vertex texture format supported - PF_SHORT_RGB
18:55:55: D3D9: Vertex texture format supported - PF_PVRTC_RGB2
18:55:55: D3D9: Vertex texture format supported - PF_PVRTC_RGBA2
18:55:55: D3D9: Vertex texture format supported - PF_PVRTC_RGB4
18:55:55: D3D9: Vertex texture format supported - PF_PVRTC_RGBA4
18:55:55: RenderSystem capabilities
18:55:55: -------------------------
18:55:55: RenderSystem Name: Direct3D9 Rendering Subsystem
18:55:55: GPU Vendor: ati
18:55:55: Device Name: Monitor-1-ATI Mobility Radeon HD 4570
18:55:55: Driver Version: 8.14.10.678
18:55:55: * Fixed function pipeline: yes
18:55:55: * Hardware generation of mipmaps: yes
18:55:55: * Texture blending: yes
18:55:55: * Anisotropic texture filtering: yes
18:55:55: * Dot product texture operation: yes
18:55:55: * Cube mapping: yes
18:55:55: * Hardware stencil buffer: yes
18:55:55: - Stencil depth: 8
18:55:55: - Two sided stencil support: yes
18:55:55: - Wrap stencil values: yes
18:55:55: * Hardware vertex / index buffers: yes
18:55:55: * Vertex programs: yes
18:55:55: * Number of floating-point constants for vertex programs: 256
18:55:55: * Number of integer constants for vertex programs: 16
18:55:55: * Number of boolean constants for vertex programs: 16
18:55:55: * Fragment programs: yes
18:55:55: * Number of floating-point constants for fragment programs: 224
18:55:55: * Number of integer constants for fragment programs: 16
18:55:55: * Number of boolean constants for fragment programs: 16
18:55:55: * Geometry programs: no
18:55:55: * Number of floating-point constants for geometry programs: 0
18:55:55: * Number of integer constants for geometry programs: 0
18:55:55: * Number of boolean constants for geometry programs: 0
18:55:55: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
18:55:55: * Texture Compression: yes
18:55:55: - DXT: yes
18:55:55: - VTC: no
18:55:55: - PVRTC: no
18:55:55: * Scissor Rectangle: yes
18:55:55: * Hardware Occlusion Query: yes
18:55:55: * User clip planes: yes
18:55:55: * VET_UBYTE4 vertex element type: yes
18:55:55: * Infinite far plane projection: yes
18:55:55: * Hardware render-to-texture: yes
18:55:55: * Floating point textures: yes
18:55:55: * Non-power-of-two textures: yes
18:55:55: * Volume textures: yes
18:55:55: * Multiple Render Targets: 4
18:55:55: - With different bit depths: yes
18:55:55: * Point Sprites: yes
18:55:55: * Extended point parameters: yes
18:55:55: * Max Point Size: 10
18:55:55: * Vertex texture fetch: yes
18:55:55: * Number of world matrices: 0
18:55:55: * Number of texture units: 8
18:55:55: * Stencil buffer depth: 8
18:55:55: * Number of vertex blend matrices: 0
18:55:55: - Max vertex textures: 4
18:55:55: - Vertex textures shared: no
18:55:55: * Render to Vertex Buffer : no
18:55:55: * DirectX per stage constants: yes
18:55:55: ***************************************
18:55:55: *** D3D9 : Subsystem Initialised OK ***
18:55:55: ***************************************
18:55:55: DefaultWorkQueue('Root') initialising on thread main.
18:55:55: Particle Renderer Type 'billboard' registered
18:55:55: Initialising resource group Load1
18:55:55: Parsing scripts for resource group Load1
18:55:55: Parsing script background.material
18:55:55: Parsing script Fonts.fontdef
18:55:55: Finished parsing scripts for resource group Load1
18:55:55: Texture: loadingbackground.png: Loading 1 faces(PF_A8R8G8B8,1024x768x1) with 10 generated mipmaps from Image. Internal format is PF_A8R8G8B8,1024x768x1.
18:55:55: Font Font1using texture size 4096x4096
18:55:55: Info: Freetype returned null for character 160 in font Font1
18:55:55: Texture: Font1Texture: Loading 1 faces(PF_BYTE_LA,4096x4096x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,4096x4096x1.
18:55:56: Initialising resource group General
18:55:56: Parsing scripts for resource group General
18:55:56: Parsing script domek.material
18:55:56: Parsing script materials.material
18:55:56: Parsing script Fonts.fontdef
18:55:56: Finished parsing scripts for resource group General
18:55:56: Texture: consolebackground.png: Loading 1 faces(PF_A8R8G8B8,4x4x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,4x4x1.
18:55:56: Mesh: Loading domek.mesh.
18:55:56: Texture: domek_COLOR.tga: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
18:55:57: DefaultWorkQueue('Root') shutting down on thread main.
18:55:57: *-*-* OGRE Shutdown
18:55:57: Unregistering ResourceManager for type Compositor
18:55:57: Unregistering ResourceManager for type Font
18:55:57: Unregistering ResourceManager for type Skeleton
18:55:57: Unregistering ResourceManager for type Mesh
18:55:57: Unregistering ResourceManager for type HighLevelGpuProgram
18:55:57: Uninstalling plugin: D3D9 RenderSystem
18:55:57: D3D9 : Shutting down cleanly.
18:55:57: Unregistering ResourceManager for type Texture
18:55:57: Unregistering ResourceManager for type GpuProgram
18:55:57: D3D9 : Direct3D9 Rendering Subsystem destroyed.
18:55:57: Plugin successfully uninstalled
18:55:57: Unloading library ./Libs\RenderSystem_Direct3D9
18:55:57: Unregistering ResourceManager for type Material




ogre.log while I pressed key and method ShowDebugConsole():
19:05:41: Creating resource group General
19:05:41: Creating resource group Internal
19:05:41: Creating resource group Autodetect
19:05:41: SceneManagerFactory for type 'DefaultSceneManager' registered.
19:05:41: Registering ResourceManager for type Material
19:05:41: Registering ResourceManager for type Mesh
19:05:41: Registering ResourceManager for type Skeleton
19:05:41: MovableObjectFactory for type 'ParticleSystem' registered.
19:05:41: OverlayElementFactory for type Panel registered.
19:05:41: OverlayElementFactory for type BorderPanel registered.
19:05:41: OverlayElementFactory for type TextArea registered.
19:05:41: Registering ResourceManager for type Font
19:05:41: ArchiveFactory for archive type FileSystem registered.
19:05:41: ArchiveFactory for archive type Zip registered.
19:05:41: DDS codec registering
19:05:41: FreeImage version: 3.13.1
19:05:41: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
19:05:41: 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
19:05:41: PVRTC codec registering
19:05:41: Registering ResourceManager for type HighLevelGpuProgram
19:05:41: Registering ResourceManager for type Compositor
19:05:41: MovableObjectFactory for type 'Entity' registered.
19:05:41: MovableObjectFactory for type 'Light' registered.
19:05:41: MovableObjectFactory for type 'BillboardSet' registered.
19:05:41: MovableObjectFactory for type 'ManualObject' registered.
19:05:41: MovableObjectFactory for type 'BillboardChain' registered.
19:05:41: MovableObjectFactory for type 'RibbonTrail' registered.
19:05:41: Loading library ./Libs\RenderSystem_Direct3D9
19:05:41: Installing plugin: D3D9 RenderSystem
19:05:41: D3D9 : Direct3D9 Rendering Subsystem created.
19:05:41: D3D9: Driver Detection Starts
19:05:41: D3D9: Driver Detection Ends
19:05:41: Plugin successfully installed
19:05:41: *-*-* OGRE Initialising
19:05:41: *-*-* Version 1.7.1 (Cthugha)
19:05:41: Added resource location 'Data' of type 'FileSystem' to resource group 'General'
19:05:41: Added resource location 'Data\Map1' of type 'FileSystem' to resource group 'General'
19:05:41: Added resource location 'Data\General' of type 'FileSystem' to resource group 'General'
19:05:41: Creating resource group Load1
19:05:41: Added resource location 'Data\Load' of type 'FileSystem' to resource group 'Load1'
19:05:41: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
19:05:41: D3D9 : RenderSystem Option: FSAA = 0
19:05:41: D3D9 : RenderSystem Option: Floating-point mode = Fastest
19:05:41: D3D9 : RenderSystem Option: Full Screen = No
19:05:41: D3D9 : RenderSystem Option: Rendering Device = Monitor-1-ATI Mobility Radeon HD 4570
19:05:41: D3D9 : RenderSystem Option: Resource Creation Policy = Create on all devices
19:05:41: D3D9 : RenderSystem Option: VSync = No
19:05:41: D3D9 : RenderSystem Option: VSync Interval = 1
19:05:41: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
19:05:41: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
19:05:41: CPU Identifier & Features
19:05:41: -------------------------
19:05:41: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
19:05:41: * SSE: yes
19:05:41: * SSE2: yes
19:05:41: * SSE3: yes
19:05:41: * MMX: yes
19:05:41: * MMXEXT: yes
19:05:41: * 3DNOW: no
19:05:41: * 3DNOWEXT: no
19:05:41: * CMOV: yes
19:05:41: * TSC: yes
19:05:41: * FPU: yes
19:05:41: * PRO: yes
19:05:41: * HT: no
19:05:41: -------------------------
19:05:41: D3D9 : Subsystem Initialising
19:05:41: Registering ResourceManager for type Texture
19:05:41: Registering ResourceManager for type GpuProgram
19:05:41: D3D9RenderSystem::_createRenderWindow "WorldOfFantasy GameEngine (showdconsole)", 800x600 windowed miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=false monitorIndex=0 useNVPerfHUD=false vsync=false vsyncInterval=1
19:05:41: D3D9 : Created D3D9 Rendering Window 'WorldOfFantasy GameEngine (showdconsole)' : 800x600, 32bpp
19:05:41: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
19:05:41: D3D9: Vertex texture format supported - PF_L8
19:05:41: D3D9: Vertex texture format supported - PF_L16
19:05:41: D3D9: Vertex texture format supported - PF_A8
19:05:41: D3D9: Vertex texture format supported - PF_A4L4
19:05:41: D3D9: Vertex texture format supported - PF_BYTE_LA
19:05:41: D3D9: Vertex texture format supported - PF_R5G6B5
19:05:41: D3D9: Vertex texture format supported - PF_B5G6R5
19:05:41: D3D9: Vertex texture format supported - PF_A4R4G4B4
19:05:41: D3D9: Vertex texture format supported - PF_A1R5G5B5
19:05:41: D3D9: Vertex texture format supported - PF_A8R8G8B8
19:05:41: D3D9: Vertex texture format supported - PF_B8G8R8A8
19:05:41: D3D9: Vertex texture format supported - PF_A2R10G10B10
19:05:41: D3D9: Vertex texture format supported - PF_A2B10G10R10
19:05:41: D3D9: Vertex texture format supported - PF_DXT1
19:05:41: D3D9: Vertex texture format supported - PF_DXT2
19:05:41: D3D9: Vertex texture format supported - PF_DXT3
19:05:41: D3D9: Vertex texture format supported - PF_DXT4
19:05:41: D3D9: Vertex texture format supported - PF_DXT5
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
19:05:41: D3D9: Vertex texture format supported - PF_X8R8G8B8
19:05:41: D3D9: Vertex texture format supported - PF_X8B8G8R8
19:05:41: D3D9: Vertex texture format supported - PF_R8G8B8A8
19:05:41: D3D9: Vertex texture format supported - PF_DEPTH
19:05:41: D3D9: Vertex texture format supported - PF_SHORT_RGBA
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT16_R
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT32_R
19:05:41: D3D9: Vertex texture format supported - PF_SHORT_GR
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT16_GR
19:05:41: D3D9: Vertex texture format supported - PF_FLOAT32_GR
19:05:41: D3D9: Vertex texture format supported - PF_SHORT_RGB
19:05:41: D3D9: Vertex texture format supported - PF_PVRTC_RGB2
19:05:41: D3D9: Vertex texture format supported - PF_PVRTC_RGBA2
19:05:41: D3D9: Vertex texture format supported - PF_PVRTC_RGB4
19:05:41: D3D9: Vertex texture format supported - PF_PVRTC_RGBA4
19:05:41: RenderSystem capabilities
19:05:41: -------------------------
19:05:41: RenderSystem Name: Direct3D9 Rendering Subsystem
19:05:41: GPU Vendor: ati
19:05:41: Device Name: Monitor-1-ATI Mobility Radeon HD 4570
19:05:41: Driver Version: 8.14.10.678
19:05:41: * Fixed function pipeline: yes
19:05:41: * Hardware generation of mipmaps: yes
19:05:41: * Texture blending: yes
19:05:41: * Anisotropic texture filtering: yes
19:05:41: * Dot product texture operation: yes
19:05:41: * Cube mapping: yes
19:05:41: * Hardware stencil buffer: yes
19:05:41: - Stencil depth: 8
19:05:41: - Two sided stencil support: yes
19:05:41: - Wrap stencil values: yes
19:05:41: * Hardware vertex / index buffers: yes
19:05:41: * Vertex programs: yes
19:05:41: * Number of floating-point constants for vertex programs: 256
19:05:41: * Number of integer constants for vertex programs: 16
19:05:41: * Number of boolean constants for vertex programs: 16
19:05:41: * Fragment programs: yes
19:05:41: * Number of floating-point constants for fragment programs: 224
19:05:41: * Number of integer constants for fragment programs: 16
19:05:41: * Number of boolean constants for fragment programs: 16
19:05:41: * Geometry programs: no
19:05:41: * Number of floating-point constants for geometry programs: 0
19:05:41: * Number of integer constants for geometry programs: 0
19:05:41: * Number of boolean constants for geometry programs: 0
19:05:41: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
19:05:41: * Texture Compression: yes
19:05:41: - DXT: yes
19:05:41: - VTC: no
19:05:41: - PVRTC: no
19:05:41: * Scissor Rectangle: yes
19:05:41: * Hardware Occlusion Query: yes
19:05:41: * User clip planes: yes
19:05:41: * VET_UBYTE4 vertex element type: yes
19:05:41: * Infinite far plane projection: yes
19:05:41: * Hardware render-to-texture: yes
19:05:41: * Floating point textures: yes
19:05:41: * Non-power-of-two textures: yes
19:05:41: * Volume textures: yes
19:05:41: * Multiple Render Targets: 4
19:05:41: - With different bit depths: yes
19:05:41: * Point Sprites: yes
19:05:41: * Extended point parameters: yes
19:05:41: * Max Point Size: 10
19:05:41: * Vertex texture fetch: yes
19:05:41: * Number of world matrices: 0
19:05:41: * Number of texture units: 8
19:05:41: * Stencil buffer depth: 8
19:05:41: * Number of vertex blend matrices: 0
19:05:41: - Max vertex textures: 4
19:05:41: - Vertex textures shared: no
19:05:41: * Render to Vertex Buffer : no
19:05:41: * DirectX per stage constants: yes
19:05:41: ***************************************
19:05:41: *** D3D9 : Subsystem Initialised OK ***
19:05:41: ***************************************
19:05:41: DefaultWorkQueue('Root') initialising on thread main.
19:05:41: Particle Renderer Type 'billboard' registered
19:05:41: Initialising resource group Load1
19:05:41: Parsing scripts for resource group Load1
19:05:41: Parsing script background.material
19:05:41: Parsing script Fonts.fontdef
19:05:41: Finished parsing scripts for resource group Load1
19:05:41: Texture: loadingbackground.png: Loading 1 faces(PF_A8R8G8B8,1024x768x1) with 10 generated mipmaps from Image. Internal format is PF_A8R8G8B8,1024x768x1.
19:05:41: Font Font1using texture size 4096x4096
19:05:42: Info: Freetype returned null for character 160 in font Font1
19:05:42: Texture: Font1Texture: Loading 1 faces(PF_BYTE_LA,4096x4096x1) with 0 generated mipmaps from Image. Internal format is PF_BYTE_LA,4096x4096x1.
19:05:42: Initialising resource group General
19:05:42: Parsing scripts for resource group General
19:05:42: Parsing script domek.material
19:05:42: Parsing script materials.material
19:05:42: Parsing script Fonts.fontdef
19:05:42: Finished parsing scripts for resource group General
19:05:42: Texture: consolebackground.png: Loading 1 faces(PF_A8R8G8B8,4x4x1) with hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,4x4x1.
19:05:42: Mesh: Loading domek.mesh.
19:05:42: Texture: domek_COLOR.tga: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.

Tubulii

02-01-2012 11:48:00

Huh, a lot of errors.

Have you ever run your project successfully?
I would guess some critical files are missing.

If not or you deleted files from the media folder or you only used a parts of the demo media folder, rename your current media folder and use the media folder from Mogre demo.
Backup ressource.cfg and copy the demo one, too.
Try to compile and to run again. Look in your log file and post it again if the error still occurs.

mharezlak96

02-01-2012 18:03:36

Sorry, I uploaded wrong file. I edited post. There is logs from current code. Program work correctly while I press key and method ShowDebugConsole() is executed.

Tubulii

02-01-2012 18:21:51

I am now guessing:
Does the material "Console_B_Material" exists (no additional blanks,...) [try to use another one]?
Does it work if :
MetricsMode is skipped,
No DebugConsolePanel is created,
No hide is called?

And would happens if you use the Wiki sample instead?

mharezlak96

02-01-2012 18:41:15

I think what can be wrong. I have code:
Overlay = OverlayManager.Singleton.Create("TextLabeleerasdasd");
Panel = OverlayManager.Singleton.CreateOverlayElement("Panel", "TextLabelsdasderPanel") as OverlayContainer;


and before in program i have:
Overlay = OverlayManager.Singleton.Create("Text1OM");
Panel = OverlayManager.Singleton.CreateOverlayElement("Panel", "Tex1t") as OverlayContainer;

Can I create OverlayManager two times?


I try use this material in second panel and it's ok.

I'd like create console. When i press F2 it should show and when i press F2 second time it's hide.

Tubulii

02-01-2012 18:53:03

Can I create OverlayManager two times?
No, it is a singleton which is created by native (unmanaged) code.

I guess, something went wrong with the names. Are you sure you created the panels only one time (e.g. in SetupScene)?
Does that piece of code compile?

Nevertheless: Mogre Console

mharezlak96

02-01-2012 18:55:00

I change function:public void ShowDebugConsole()
{
if (raz != 2) CreateDebugConsole();
if(raz != 2)DebugConsoleOverlay.Show();
if (raz != 2) DebugConsolePanel.Show();
raz = 2;
}

And it's work. But I don't understand why before it doesn't work...

I had:public void Initialise()
{
//...
CreateDebugConsole();
}

In class where is function CreateDebugConsole();

Tubulii

02-01-2012 19:00:57

Maybe you created the panels before all critical stuff was created (camera, ...). Use CreateScene for this.

mharezlak96

02-01-2012 19:11:21

you're right. Now all is OK. Thanks for help.