[SOLVED]broken assert of Ogre 1 12 13

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
paul424
Gnome
Posts: 314
Joined: Thu May 24, 2012 7:16 pm
x 13

[SOLVED]broken assert of Ogre 1 12 13

Post by paul424 »

Ogre Version: :1.12.13:
Operating System: :Linux OpenSuse:
Render System: :OpenGL:

Hello, when I do try to start a program with g++ options -g -O0 ( all optimizations turned off I get ) :

Code: Select all

0  in __pthread_kill_implementation of /lib64/libc.so.6
1  in raise of /lib64/libc.so.6
2  in abort of /lib64/libc.so.6
3  in __assert_fail_base.cold of /lib64/libc.so.6
4  in __assert_fail of /lib64/libc.so.6
5  in Ogre::GLSLProgramCommon::getAttributeSemanticEnum of /home/tom/Downloads/ogre-1.12.13/RenderSystems/GLSupport/src/GLSL/OgreGLSLProgramCommon.cpp:20
6  in Ogre::GLSLProgramCommon::extractLayoutQualifiers of /home/tom/Downloads/ogre-1.12.13/RenderSystems/GLSupport/src/GLSL/OgreGLSLProgramCommon.cpp:133
7  in Ogre::GLSLSeparableProgram::activate of /home/tom/Downloads/ogre-1.12.13/RenderSystems/GL3Plus/src/GLSL/src/OgreGLSLSeparableProgram.cpp:102
8  in Ogre::GLSLProgramManager::getActiveProgram of /home/tom/Downloads/ogre-1.12.13/RenderSystems/GL3Plus/src/GLSL/src/OgreGLSLProgramManager.cpp:118
9  in Ogre::GL3PlusRenderSystem::bindGpuProgramParameters of /home/tom/Downloads/ogre-1.12.13/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp:1874
10 in Ogre::SceneManager::updateGpuProgramParameters of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:4053
11 in Ogre::SceneManager::_issueRenderOp of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:4073
12 in Ogre::SceneManager::issueRenderWithLights of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1925
13 in Ogre::SceneManager::renderSingleObject of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:2204
14 in Ogre::SceneManager::BRAND NAME::visit of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1725
15 in Ogre::QueuedRenderableCollection::acceptVisitorGrouped of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:411
16 in Ogre::QueuedRenderableCollection::acceptVisitor of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:389
17 in Ogre::SceneManager::renderObjects of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1814
18 in Ogre::SceneManager::ShadowRenderer::renderAdditiveTextureShadowedQueueGroupObjects of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreShadowRenderer.cpp:501
19 in Ogre::SceneManager::ShadowRenderer::render of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreShadowRenderer.cpp:116
20 in Ogre::SceneManager::_renderQueueGroupObjects of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1841
21 in Ogre::SceneManager::renderVisibleObjectsDefaultSequence of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1686
22 in Ogre::SceneManager::_renderVisibleObjects of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1603
23 in Ogre::SceneManager::_renderScene of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreSceneManager.cpp:1366
24 in Ogre::Camera::_renderScene of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreCamera.cpp:496
25 in Ogre::Viewport::update of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreViewport.cpp:218
26 in Ogre::RenderTarget::_updateViewport of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderTarget.cpp:203
27 in Ogre::RenderTarget::_updateAutoUpdatedViewports of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderTarget.cpp:181
28 in Ogre::RenderTarget::updateImpl of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderTarget.cpp:158
29 in Ogre::RenderTarget::update of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderTarget.cpp:565
30 in Ogre::RenderSystem::_updateAllRenderTargets of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRenderSystem.cpp:265
31 in Ogre::Root::_updateAllRenderTargets of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRoot.cpp:1296
32 in Ogre::Root::renderOneFrame of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRoot.cpp:868
33 in Ogre::Root::startRendering of /home/tom/Downloads/ogre-1.12.13/OgreMain/src/OgreRoot.cpp:858

so far my understanding of this code is :

Code: Select all

VertexElementSemantic GLSLProgramCommon::getAttributeSemanticEnum(const String& type)
{
    size_t numAttribs = sizeof(msCustomAttributes)/sizeof(CustomAttribute);
    for (size_t i = 0; i < numAttribs; ++i)
    {
        if (msCustomAttributes[i].name == type)
            return msCustomAttributes[i].semantic;
    }

OgreAssertDbg(false, "Missing attribute!");
return VertexElementSemantic(0);
}

for parameter type = "aPos" should be rised up......
because the msCustomAttributes is equall to :

Code: Select all

(gdb) print msCustomAttributes
$9 = {{name = 0x7ffff413333d "vertex", attrib = 0, semantic = Ogre::VES_POSITION},
 {name = 0x7ffff4133344 "position", attrib = 0, semantic = Ogre::VES_POSITION},
  {name = 0x7ffff413334d "blendWeights", attrib = 1, semantic = Ogre::VES_BLEND_WEIGHTS}, 
  {name = 0x7ffff413335a "normal", attrib = 2, semantic = Ogre::VES_NORMAL},
   {name = 0x7ffff4133361 "colour", attrib = 3, semantic = Ogre::VES_COLOUR},
    {name = 0x7ffff4133368 "secondary_colour", attrib = 4, semantic = Ogre::VES_COLOUR2},
     {name = 0x7ffff4133379 "blendIndices", attrib = 7, semantic = Ogre::VES_BLEND_INDICES}, 
     {name = 0x7ffff4133339 "uv0", attrib = 8, semantic = Ogre::VES_TEXTURE_COORDINATES},
      {name = 0x7ffff4133386 "uv1", attrib = 9, semantic = Ogre::VES_TEXTURE_COORDINATES},
       {name = 0x7ffff413338a "uv2", attrib = 10, semantic = Ogre::VES_TEXTURE_COORDINATES},
        {name = 0x7ffff413338e "uv3", attrib = 11, semantic = Ogre::VES_TEXTURE_COORDINATES},
         {name = 0x7ffff4133392 "uv4", attrib = 12, semantic = Ogre::VES_TEXTURE_COORDINATES},
          {name = 0x7ffff4133396 "uv5", attrib = 13, semantic = Ogre::VES_TEXTURE_COORDINATES},
           {name = 0x7ffff413339a "uv6", attrib = 14, semantic = Ogre::VES_TEXTURE_COORDINATES},
            {name = 0x7ffff413339e "uv7", attrib = 15, semantic = Ogre::VES_TEXTURE_COORDINATES},
            {name = 0x7ffff41333a2 "tangent", attrib = 14, semantic = Ogre::VES_TANGENT},
             {name = 0x7ffff41333aa "binormal", attrib = 15, semantic = Ogre::VES_BINORMAL}}
             

Why is it good to use " layout (location = 0) in vec4 aPos; " in my shader programs in Relase mode , and why it is bad to use it in suppressed optimization mode ?

Last edited by paul424 on Sun Jun 19, 2022 9:53 am, edited 1 time in total.
User avatar
paul424
Gnome
Posts: 314
Joined: Thu May 24, 2012 7:16 pm
x 13

Re: broken assert of Ogre 1 12 13

Post by paul424 »

Naah after a small sed-ing here and there it works fine .... but I would like to know why the things are the way they are ...

paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

Re: broken assert of Ogre 1 12 13

Post by paroj »

Post Reply