OgreRenderer crash in destroySystem()
Posted: Fri Oct 16, 2009 11:36
Hi I am new to CEGUI and I would like to say that it rocks! I searched the forums and could not find an answer so I am sorry if this has already been asked.
OgreRenderer::destroySystem() crashes when called. The code below shows how I am using the OgreRenderer:
I am not sure whether I am doing something wrong or it is a bug. When stepping through the code in destroySystem() the crash happens on line 113 of CEGUIOgreRenderer.cpp which contains the following code:
The error happens on destroyOgreImageCodec(*ic); which intern deletes ic. I noticed that once System::destroy() is called ic no longer exists (it appears to have been freed) causing the deletion of ic to fail.
Is this a bug or have I missed out a step
I am grateful for any help you can give,
Slake.
OgreRenderer::destroySystem() crashes when called. The code below shows how I am using the OgreRenderer:
Code: Select all
GuiEngine::GuiEngine( void )
{
CEGUI::OgreRenderer &renderer = CEGUI::OgreRenderer::bootstrapSystem();
//CEGUI::System::getSingleton().setScriptingModule( &CEGUI::LuaScriptModule::create() );
}
GuiEngine::~GuiEngine( void )
{
CEGUI::OgreRenderer::destroySystem();
}
I am not sure whether I am doing something wrong or it is a bug. When stepping through the code in destroySystem() the crash happens on line 113 of CEGUIOgreRenderer.cpp which contains the following code:
Code: Select all
OgreImageCodec* ic = &static_cast<OgreImageCodec&>(sys->getImageCodec());
System::destroy();
destroyOgreImageCodec(*ic);
The error happens on destroyOgreImageCodec(*ic); which intern deletes ic. I noticed that once System::destroy() is called ic no longer exists (it appears to have been freed) causing the deletion of ic to fail.
Is this a bug or have I missed out a step
![Confused :?](./images/smilies/icon_confused.gif)
I am grateful for any help you can give,
Slake.