korbul
10-07-2012 14:16:03
Hey guys, i recently changed my gui library to MyGUI. I got to say, it's much better than what i used before, however i kinda have a problem. I can load layouts just fine but i get an error when i try to unload them. So here is what i have:
My current project is composed of states, and when i switch between them i call a function that loads/unloads layouts. example:
Here is the tricky part. This works in debug and release mode, but when i Start without debbuging (ctrl+f5) in debug mode it crashes with don't send error. Here's what the log says:
as the log says, the app crashes at
MyGUI::WidgetManager::getInstancePtr()->destroyWidgets(currentLayout); -> seems to be the problem. If i remove this it works but the layout remains on screen.
I would really appreciate if somebody could offer a little knowledge
My current project is composed of states, and when i switch between them i call a function that loads/unloads layouts. example:
void MyGuiManager::errorStateGUI( Ogre::RenderWindow* rw,Ogre::SceneManager* sm, std::string errmsg)
{
MyGUI::WidgetManager::getInstancePtr()->destroyWidgets(currentLayout);
//MyGUI::LayoutManager::getInstance ().unloadLayout (currentLayout);
setRenderWindow (rw);
setSceneManager (sm);
currentLayout = MyGUI::LayoutManager::getInstance().loadLayout("FatalError.layout");
mGUI->findWidget<MyGUI::TextBox>("ErrorTextBox")->setCaption(errmsg);
}
Here is the tricky part. This works in debug and release mode, but when i Start without debbuging (ctrl+f5) in debug mode it crashes with don't send error. Here's what the log says:
...
16:02:03 | Core | Info | Load ini file 'MyGUI_BlackOrangeTheme.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_BlackOrangeImages.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_BlackOrangeSkins.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_BlackOrangeTemplates.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_Pointers.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_Layers.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Load ini file 'MyGUI_Settings.xml' | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_ResourceManager.cpp | 130
16:02:03 | Core | Info | Gui successfully initialized | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_Gui.cpp | 133
16:02:06 | Core | Critical | It is too much vertexes | C:\Users\Gladiator\Desktop\MyGUI_3.2.0\MyGUIEngine\src\MyGUI_RenderItem.cpp | 79
as the log says, the app crashes at
// колличество отрисованных вершин
MYGUI_DEBUG_ASSERT(mLastVertexCount <= (*iter).second, "It is too much vertexes");
MyGUI::WidgetManager::getInstancePtr()->destroyWidgets(currentLayout); -> seems to be the problem. If i remove this it works but the layout remains on screen.
I would really appreciate if somebody could offer a little knowledge