Rather than printing out the information of the exception and exiting the program cleanly,
an assert occurs, and the exception info is NOT printed out. This causes a loss of valuable debug information.
For example, on the following Ogre v2-1 config on macOS I tried to run Sample_TutorialUav01_Setup.
changeset 11283:e04d99567c87
There is a bug in this program which causes OGRE_EXCEPT() to be called.
Here is the assert message:
Code: Select all
Assertion failed: (!mRoot && "deinitialize() not called!!!"),
Code: Select all
An exception has occured: OGRE EXCEPTION(5:ItemIdentityException): Cannot find best technique for material 'FillUav' in CompositorPassQuad::CompositorPassQuad at /Volumes/Home/home/ogfiles/src/ogdev/OgreMain/src/Compositor/Pass/PassQuad/OgreCompositorPassQuad.cpp (line 101)
Program ended with exit code: 255
Code: Select all
graphicsSystem->deinitialize(); // <<<<<<< ADDED
delete graphicsSystem;
delete graphicsGameState;
Thus, NOT calling deinitialize has become a de facto standard. Therefore, I propose that the proper fix is to delete the assertion in deinitialize().
Any comments?