v2-2 Asserts Release Mode

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
dermont
Orc Shaman
Posts: 773
Joined: Thu Dec 09, 2004 2:51 am
x 9

v2-2 Asserts Release Mode

Post by dermont » Thu Jan 17, 2019 4:32 am

I'm trying to enable asserts for a release build of v2-2.

OgreBuildSettings.h
#define OGRE_DEBUG_LEVEL_DEBUG 0
#define OGRE_DEBUG_LEVEL_RELEASE 1
#define OGRE_ASSERT_MODE 1/2
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreOfflineProfiler.h:29:16: warning: ‘newSample.Ogre::OfflineProfiler::ProfileSample::parent’ may be used uninitialized in this function [-Wmaybe-uninitialized]
make[1]: *** [CMakeFiles/Makefile2:91: OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
dermont@dermont-desktop:/media/sdb5/Libraries/OGRE/build/v2-2ASSERT$
dermont@dermont-desktop:/media/sdb5/Libraries/OGRE/build/v2-2ASSERT$ make
[ 1%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreNode.cpp.o
In file included from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreHardwareVertexBuffer.h:36,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgrePose.h:33,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAnimationTrack.h:36,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAnimation.h:34,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreMesh.h:36,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreLodStrategy.h:33,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreRenderable.h:43,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreNode.h:34,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:29:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreHlmsPso.h: In member function ‘void Ogre::HlmsPso::initialize()’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreHlmsPso.h:205:51: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct Ogre::HlmsPassPso’; use assignment or value-initialization instead [-Wclass-memaccess]
memset( &pass, 0, sizeof(HlmsPassPso) );
^
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreHlmsPso.h:101:12: note: ‘struct Ogre::HlmsPassPso’ declared here
struct HlmsPassPso
^~~~~~~~~~~
In file included from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgrePrerequisites.h:735,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreNode.h:31,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:29:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Quaternion Ogre::Node::_getDerivedOrientation() const’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:692:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:692:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Vector3 Ogre::Node::_getDerivedPosition() const’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:704:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:704:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Vector3 Ogre::Node::_getDerivedScale() const’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:716:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:716:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Vector3 Ogre::Node::convertWorldToLocalPosition(const Ogre::Vector3&)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:728:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:728:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Vector3 Ogre::Node::convertLocalToWorldPosition(const Ogre::Vector3&)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:743:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:743:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Quaternion Ogre::Node::convertWorldToLocalOrientation(const Ogre::Quaternion&)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:758:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:758:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp: In member function ‘Ogre::Quaternion Ogre::Node::convertLocalToWorldOrientation(const Ogre::Quaternion&)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:765:30: error: ‘mCachedTransformOutOfDate’ was not declared in this scope
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreAssert.h:71:19: note: in definition of macro ‘OGRE_ASSERT’
if (!(cond)) \
^~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreNode.cpp:765:9: note: in expansion of macro ‘OGRE_ASSERT_MEDIUM’
OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate );
^~~~~~~~~~~~~~~~~~
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/build.make:1493: OgreMain/CMakeFiles/OgreMain.dir/src/OgreNode.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
dermont@dermont-desktop:/media/sdb5/Libraries/OGRE/build/v2-2ASSERT$
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3882
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 158
Contact:

Re: v2-2 Asserts Release Mode

Post by dark_sylinc » Thu Jan 17, 2019 4:58 am

Try again after this commit https://bitbucket.org/sinbad/ogre/commi ... 0a1a57be57

Typo errors were preventing OGRE_DEBUG_MEDIUM & OGRE_DEBUG_HIGH from working as intended. Thanks for the report!
0 x

dermont
Orc Shaman
Posts: 773
Joined: Thu Dec 09, 2004 2:51 am
x 9

Re: v2-2 Asserts Release Mode

Post by dermont » Thu Jan 17, 2019 5:39 am

Sorry still having problems.

gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)

#define OGRE_DEBUG_LEVEL_DEBUG 0
#define OGRE_DEBUG_LEVEL_RELEASE 0/1
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardClustered.cpp: In member function ‘void Ogre::ForwardClustered::collectLightForSlice(size_t, size_t)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardClustered.cpp:389:88: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct Ogre::ForwardPlusBase::LightCount’; use assignment or value-initialization instead [-Wclass-memaccess]
0, numPackedFrustumsPerSlice * ARRAY_PACKED_REALS * sizeof(LightCount) );
^

In file included from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreForwardClustered.h:32,
from /media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardClustered.cpp:31:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/include/OgreForwardPlusBase.h:108:16: note: ‘struct Ogre::ForwardPlusBase::LightCount’ declared here
struct LightCount
^~~~~~~~~~
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardClustered.cpp: In member function ‘void Ogre::ForwardClustered::collectObjs(const Ogre::Camera*, size_t&, size_t&)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardClustered.cpp:712:64: error: void value not ignored as it ought to be
OGRE_ASSERT_MEDIUM( numRqs == objsPerRq.size() );
^
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/build.make:648: OgreMain/CMakeFiles/OgreMain.dir/src/OgreForwardClustered.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
dermont@dermont-desktop:/media/sdb5/Libraries/OGRE/build/v2-2$
#define OGRE_DEBUG_LEVEL_DEBUG 0
#define OGRE_DEBUG_LEVEL_RELEASE 2
[ 8%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreGpuProgramManager.cpp.o
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardPlusBase.cpp: In member function ‘void Ogre::ForwardPlusBase::fillGlobalLightListBuffer(Ogre::Camera*, Ogre::TexBufferPacked*)’:
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardPlusBase.cpp:288:65: error: void value not ignored as it ought to be
OGRE_ASSERT_HIGH( dynamic_cast<Decal*>( *itor ) );
^
/media/sdb5/Libraries/OGRE/src/v2-2/OgreMain/src/OgreForwardPlusBase.cpp:328:80: error: void value not ignored as it ought to be
OGRE_ASSERT_HIGH( dynamic_cast<InternalCubemapProbe*>( *itor ) );
^
make[1]: *** [CMakeFiles/Makefile2:91: OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
dermont@dermont-desktop:/media/sdb5/Libraries/OGRE/build/v2-2ASSERT$
0 x

Post Reply