Segmentation Fault


11-03-2010 01:49:15

I'm getting stuck on a segmentation fault when I try to find widgets from delegated functions.
Take for example I successfully load a layout and then successfully delegate functions in the following class

example code:
#include "Ogre.h"
#include "MyGUI.h"
#include "MenuHandler.h"
MenuHandler::MenuHandler(MyGUI::Gui *cGUI)
//mGUI is member variable
mGUI = cGUI;

//adding this runs just fine
MyGUI::ButtonPtr myButton = mGUI->findWidget<MyGUI::Button>("btnNote");

//function delegated
void MenuHandler::logWrite_Click(MyGUI::WidgetPtr _widget)
//adding this results in a segmentation fault
MyGUI::EditPtr myEdit = mGUI->findWidget<MyGUI::Edit>("edtNote");


11-03-2010 08:19:12

Check MyGUI.log. Also check that you really have that widget and it have Edit type.


11-03-2010 19:09:44

I've checked the logs for the gui and ogre, both end abruptly on the segmentation fault
The only errors in the gui log are that the sheets for the tabs can't find the 'Default' skin and are replacing them with a default skin
as long as I don't trigger the function that causes the seg fault, the program can run to completion.

And yes both these widgets are listed in my .layout file and are of the proper type.


11-03-2010 19:30:35

Sorry,disregard this thread :oops:

Seems I was calling a few functions out of order.


06-05-2010 03:23:58

Please, do tell!
I'm running into a segfault at the end of program execution and can't for the life of me figure out whats going on...its after the OgreDataManager destructs