MYGUI Crashing from button widget

atarax

26-10-2009 22:44:32

Hi,

Im not sure why MYGUI is crashing at all. I have tried to debug the application and it is crashing at

MyGUI::ButtonPtr buttonStart = mMenuWindow->createWidget<MyGUI::Button>("Button", 5, 5, 50, 25, MyGUI::Align::Center, "Start");
buttonStart->setCaption("Play");


In the error log i found ....

17:40:31 | General | Warning | Texture 'cust_buttons2.png' have non power ow two size | c:\program files\mygui2.2.2_source\myguiengine\src\mygui_skinmanager.cpp | 296

Could this warning be causing the crash? Everything works fine until i try to create this button. I tried looking elsewhere and cant find anything.

my.name

27-10-2009 02:56:16

mMenuWindow - ?

atarax

27-10-2009 16:36:26

mMenuWindow = mpGUI->createWidget<MyGUI::Window>("FlowContainer", 300,150, 300, 300, MyGUI::Align::Center, "Main", "Menu");

Its a pointer to a MyGUI::Window.

mpGUI is the pointer to the GUI system.

atarax

28-10-2009 00:45:31

it is also crashing with this code, ive been testing...

mpGUI = MyGUI::Gui::getInstancePtr();
mpGUI->setSceneManager(mpSceneMng);
mMenuWindow = mpGUI->createWidget<MyGUI::Window>("FlowConteiner", 300,150, 300, 300, MyGUI::Align::Center, "Main", "Menu");
MyGUI::WindowPtr mSubMenuWindow = mMenuWindow->createWidget<MyGUI::Window>("Default",150,75,75,75,MyGUI::Align::Center,"Start");


//the mMenuWindow->setCaption() makes it crash here...
mMenuWindow->setCaption("Main menu Window");



could someone tell me what i am doing wrong?

Thanks

my.name

28-10-2009 03:46:47

mMenuWindow = mpGUI->createWidget<MyGUI::Window>("Window", 300,150, 300, 300, MyGUI::Align::Center, "Main", "Menu");

atarax

28-10-2009 21:10:45

i tried the code you send and it still crashes.

anything else to try?