OgreSdk 1.9.1 - Assertion failed

走远了吗. 提交于 2019-12-13 02:37:57

问题


I'm trying to set up Ogre 1.9 on Windows 7 with Visual studio 2012 (x64). I've managed to iron out some of the bugs, but I'm getting a MessageBox error with the text:

Assertion failed!

Program: C:\OgreSDK\bin\Debug\OgreOverlay_d.dll
File: ..\..\..\..\..\Components\Overlay\src\Ogre...Manager.cpp
Line: 52

Expression: msSingleton

For information on how your program can cause an assertion failure, see the Visual C++     documentation on asserts

(Press Retry o debug the application - JIT must be enabled)

I am then given 3 options: Abort, Retry, and Ignore. Abort is the only one I can do that doesn't require a ctrl+alt+delete and a computer restart.

My Ogre.cfg file:

Render System=OpenGL Rendering Subsystem

[Direct3D9 Rendering Subsystem]
Allow DirectX9Ex=No
Allow NVPerfHUD=No
FSAA=0
Fixed Pipeline Enabled=Yes
Floating-point mode=Fastest
Full Screen=Yes
Multi device memory hint=Use minimum system memory
Rendering Device=Monitor-1-NVIDIA GeForce GTX 550 Ti
Resource Creation Policy=Create on all devices
Use Multihead=Auto
VSync=No
VSync Interval=1
Video Mode=800 x 600 @ 32-bit colour
sRGB Gamma Conversion=No

[Direct3D11 Rendering Subsystem]
Allow NVPerfHUD=No
Driver type=Hardware
FSAA=0
Floating-point mode=Fastest
Full Screen=Yes
Information Queue Exceptions Bottom Level=Info (exception on any message)
Max Requested Feature Levels=11.0
Min Requested Feature Levels=9.1
Rendering Device=NVIDIA GeForce GTX 550 Ti
VSync=No
VSync Interval=1
Video Mode=800 x 600 @ 32-bit colour
sRGB Gamma Conversion=No

[OpenGL Rendering Subsystem]
Colour Depth=32
Display Frequency=60
FSAA=0
Fixed Pipeline Enabled=Yes
Full Screen=Yes
RTT Preferred Mode=FBO
VSync=No
VSync Interval=1
Video Mode=1024 x 768
sRGB Gamma Conversion=No

And my Ogre.log:

04:08:53: Parsing scripts for resource group Essential
04:08:53: Parsing script SdkTrays.material
04:08:54: Parsing script OgreProfiler.material
04:08:54: Finished parsing scripts for resource group Essential
04:08:54: Creating resources for group Essential
04:08:54: All done
04:08:54: Parsing scripts for resource group General
04:08:54: Finished parsing scripts for resource group General
04:08:54: Creating resources for group General
04:08:54: All done
04:08:54: Parsing scripts for resource group Internal
04:08:54: Finished parsing scripts for resource group Internal
04:08:54: Creating resources for group Internal
04:08:54: All done
04:08:54: Parsing scripts for resource group Popular
04:08:54: Parsing script DualQuaternion.program
04:08:54: Parsing script Examples.program
04:08:55: Parsing script Instancing.program
04:08:55: Parsing script StdQuad_vp.program
04:08:55: Parsing script deferred_post.program
04:08:55: Parsing script ShadowCaster.program
04:08:55: Parsing script GBuffer.program
04:08:55: Parsing script triplanarReference.program
04:08:56: Parsing script ASCII.material
04:08:56: Parsing script ASMSwizzle.material
04:08:56: Parsing script BlackAndWhite.material
04:08:56: Parsing script Bloom.material
04:08:56: Parsing script Bloom2.material
04:08:56: Parsing script CGSwizzle.material
04:08:56: Parsing script CompositorDemo.material
04:08:56: Parsing script DepthShadowmap.material
04:08:57: Parsing script Dither.material
04:08:57: Parsing script DOF.material
04:08:57: Parsing script DualQuaternion.material
04:08:57: Parsing script Embossed.material
04:08:57: Parsing script Example-Water.material
04:08:57: Parsing script Examples-Advanced.material
04:08:59: Compiler error: object unsupported by render system in Examples-Advanced.material(617): , Shader name: Examples/FresnelRefractReflectPS
04:08:59: Parsing script Examples-DynTex.material
04:08:59: Parsing script Examples-Water.material
04:08:59: Parsing script Examples.material
04:09:03: Parsing script facial.material
04:09:03: Parsing script Glass.material
04:09:03: Parsing script GLSLSwizzle.material
04:09:03: Parsing script Halftone.material
04:09:03: Parsing script hdr.material
04:09:04: Parsing script HeatVision.material
04:09:04: Parsing script Hurt.material
04:09:04: Parsing script HWInstancing.material
04:09:04: Parsing script HW_VTFInstancing.material
04:09:05: Parsing script HW_VTF_LUTInstancing.material
04:09:06: Parsing script instancing.material
04:09:07: Parsing script InstancingMisc.material
04:09:07: Parsing script Invert.material
04:09:07: Parsing script IsoSurf.material
04:09:07: Problem parsing the following Cg Uniform: '@TMP29' in file Ogre/IsoSurf/TessellateTetrahedraGS_CG
04:09:07: Parsing script Laplace.material
04:09:07: Parsing script MotionBlur.material
04:09:07: Parsing script MRTtest.material
04:09:07: Parsing script NightVision.material
04:09:07: Parsing script Ocean.material
04:09:09: Parsing script OffsetMapping.material
04:09:09: Compiler error: object unsupported by render system in OffsetMapping.material(35): , Shader name: Examples/OffsetMappingPSAsm
04:09:09: Parsing script Ogre.material
04:09:09: Parsing script OldMovie.material
04:09:09: Parsing script OldTV.material
04:09:09: Parsing script ParticleGS.material
04:09:10: Parsing script Penguin.material
04:09:10: Parsing script Posterize.material
04:09:10: Parsing script pssm.material
04:09:10: Parsing script RadialBlur.material
04:09:10: Parsing script RasterizationOrder.material
04:09:10: Parsing script RZR-002.material
04:09:10: Parsing script ShaderInstancing.material
04:09:10: Parsing script ShaderSystem.material
04:09:10: Parsing script shadows.material
04:09:11: Parsing script SharpenEdges.material
04:09:11: Parsing script sibenik.material
04:09:11: Parsing script smoke.material
04:09:11: Parsing script Tesselation.material
04:09:11: Parsing script Tiling.material
04:09:11: Parsing script VarianceShadowmap.material
04:09:11: Parsing script VTFInstancing.material
04:09:11: Parsing script deferreddemo.material
04:09:11: Parsing script deferred_post.material
04:09:12: Parsing script deferred_post_minilight.material
04:09:12: Parsing script ShadowCaster.material
04:09:12: Parsing script ssao.material
04:09:12: Parsing script ROOM.material
04:09:12: Parsing script DualQuaternionSkinning_Shadow.material
04:09:13: Parsing script HardwareSkinningShadow.material
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called worldMatrix does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(206): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called viewProjMatrix does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(207): setting of constant failed
04:09:14: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/RTShader/shadow_receiver_ps: The compile returned an error.
(0) : error C3001: no program defined
 in CgProgram::compileMicrocode at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
04:09:14: High-level program Ogre/RTShader/shadow_receiver_ps encountered an error during loading and is thus not supported.
OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/RTShader/shadow_receiver_ps: The compile returned an error.
(0) : error C3001: no program defined
 in CgProgram::compileMicrocode at ..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1627)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(219): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix0 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(239): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix1 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(240): setting of constant failed
04:09:14: OGRE EXCEPTION(2:InvalidParametersException): Parameter called texViewProjMatrix2 does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\..\..\..\OgreMain\src\OgreGpuProgramParams.cpp (line 1637)
04:09:14: Compiler error: invalid parameters in HardwareSkinningShadow.material(241): setting of constant failed
04:09:14: Parsing script RTShaderSystem.material
04:09:14: Compiler error: unknown error in RTShaderSystem.material(23): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(52): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(146): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(162): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(81): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(110): token "rtshader_system" is not recognized
04:09:14: Compiler error: unknown error in RTShaderSystem.material(211): token "rtshader_system" is not recognized
04:09:14: Parsing script TriplanarTexturing.material
04:09:14: Compiler error: unknown error in TriplanarTexturing.material(9): token "rtshader_system" is not recognized
04:09:14: Parsing script ROOM.material
04:09:14: Parsing script CreaseShading.material
04:09:14: Parsing script Crytek.material
04:09:14: Parsing script GBuffer.material
04:09:14: Parsing script HemisphereMC.material
04:09:14: Parsing script HorizonBased.material
04:09:14: Parsing script Modulate.material
04:09:14: Parsing script ShowDepth.material
04:09:14: Parsing script ShowNormals.material
04:09:14: Parsing script ShowViewPos.material
04:09:14: Parsing script SSAOPost.material
04:09:15: Parsing script UnsharpMask.material
04:09:15: Parsing script Volumetric.material
04:09:15: Parsing script triplanarReference.material
04:09:15: Parsing script RomanBath.material
04:09:15: Parsing script Sinbad.material
04:09:15: Parsing script emitted_emitter.particle
04:09:15: Parsing script Examples-Water.particle
04:09:16: Parsing script Examples.particle
04:09:16: Parsing script smoke.particle
04:09:16: Parsing script Examples.compositor
04:09:16: Parsing script deferred.compositor
04:09:17: Parsing script ssao.compositor
04:09:17: Parsing script SSAO.compositor
04:09:17: Parsing script SSAOPost.compositor
04:09:17: Finished parsing scripts for resource group Popular
04:09:17: Creating resources for group Popular
04:09:17: All done
04:09:17: Parsing scripts for resource group Tests
04:09:17: Finished parsing scripts for resource group Tests
04:09:17: Creating resources for group Tests
04:09:17: All done
04:09:17: *** Initializing OIS ***

(Due to character limits, this starts when things seem to hit the fan, and ends at the end of the file.)


回答1:


Sounds like you did not properly initialize the Ogre::OverlaySystem. See the code snippet below taken from the Ogre 1.9 Porting Notes.

Ogre::OverlaySystem* pOverlaySystem = new Ogre::OverlaySystem();
m_pSceneMgr->addRenderQueueListener(pOverlaySystem);


来源:https://stackoverflow.com/questions/17957656/ogresdk-1-9-1-assertion-failed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!