[SOLVED] Crash after restart


08-02-2009 21:41:07

After restarting MyGUI, it's mysteriously crashing when calling injectFrameEntered. The MyGUI::Gui pointer is ok, all values are normal, lists show the expected values. Also, the passed RenderWindow and SceneManager are ok.

Here my code:

void GuiTaskImpl::onUpdate()
AWAKE_PROFILE( "GuiTaskImpl::onUpdate" );

if( mGUI && mGUIInited )
mGUI->injectFrameEntered( Engine::getSingleton().getTimeLastFrame() );

void GuiTaskImpl::setup( Ogre::RenderWindow* renderWindow )
AWAKE_ASSERT( mGUIInited == false )

mGUI->initialise( renderWindow );
mGUI->setSceneManager( RenderTask::getSingleton().getSceneManager() );

mGUIInited = true;

void GuiTaskImpl::shutdown()
AWAKE_ASSERT( mGUIInited == true )


mGUIInited = false;

Calling setup, shutdown, setup leads to the crash.

Thanks for your help.


09-02-2009 20:08:50

Looks like we haven't checked reinitialisation for a long time. Yes, it is bug and it will be fixed soon.


10-02-2009 13:44:26

I fixed it by just deleting and then newing the MyGUI::Gui again :)


10-02-2009 15:12:16

Fixed. Now you don't need delete and new it again.