Code: Select all
GUIHandler(JoinClicked)
{
char Msg;
Msg = NW_REQJOIN;
CEGUI::WindowManager wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::MultiColumnList* myMCL = static_cast<CEGUI::MultiColumnList*>(wmgr.getWindow("lstServers"));
CEGUI::ListboxTextItem* myLBI;
//Check if there are any selected
if (myMCL->getSelectedCount()==0)
{
ShowDialog("You must select a server to join first.");
return true;
}
//Start at the beginning and find a selected cell
//myLBI = myMCL->getNextSelected(NULL);
//myLBI = myMCL->getNextSelected(myLBI);
int i;
i = 0;
while ((i < myMCL->getRowCount()))
{
unsigned int ID;
myLBI = static_cast<CEGUI::ListboxTextItem*>(myMCL->getItemAtGridReference(CEGUI::MCLGridRef(i, 0)));
if (myLBI->isSelected())
{
char out[1024];
ID = myMCL->getRowID(i);
sprintf(out,"SENDING NW_REQJOIN to %u\n", ID);
OutputDebugString(out);
NetworkManager->UnreliableSendTo(&Msg, 1, ID);
return true;
}
++i;
return true;
}
return true;
}
It crashes no matter whether I select a server to join or not. When I was looking at the call stack after clicking Join without selecting a server, I noticed that the WindowManager's destructor was being called:
Code: Select all
CEGUIBase_d.dll!std::vector<CEGUI::ListHeaderSegment *,std::allocator<CEGUI::ListHeaderSegment *> >::size() Line 703 + 0x3 bytes C++
CEGUIBase_d.dll!CEGUI::ListHeader::getColumnCount() Line 101 C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::getColumnCount() Line 141 C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::resetList_impl() Line 2271 + 0x1a bytes C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::~MultiColumnList() Line 104 C++
CEGUITaharezLook_d.dll!CEGUI::TLMultiColumnList::~TLMultiColumnList() Line 99 + 0x46 bytes C++
CEGUITaharezLook_d.dll!CEGUI::TLMultiColumnList::`vector deleting destructor'() + 0x6c bytes C++
CEGUITaharezLook_d.dll!CEGUI::TLMultiColumnListFactory::destroyWindow(CEGUI::Window * window=0x14d1f538) Line 228 + 0x8a bytes C++
CEGUIBase_d.dll!CEGUI::WindowManager::cleanDeadPool() Line 261 + 0x1a bytes C++
CEGUIBase_d.dll!CEGUI::WindowManager::~WindowManager() Line 72 C++
SpaceRaceD.exe!JoinClicked(const CEGUI::EventArgs & e={...}) Line 109 + 0x19 bytes C++
SpaceRaceD.exe!CEGUI::_freeBinder<bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 74 + 0xe bytes C++
CEGUIBase_d.dll!CEGUI::SubscriberTemplate<bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 133 + 0x16 bytes C++
CEGUIBase_d.dll!CEGUI::Event::operator()(CEGUI::EventArgs & args={...}) Line 105 + 0x1d bytes C++
CEGUIBase_d.dll!CEGUI::EventSet::fireEvent(const CEGUI::String & name={...}, CEGUI::EventArgs & args={...}, const CEGUI::String & eventNamespace={...}) Line 178 C++
CEGUIBase_d.dll!CEGUI::Window::onMouseClicked(CEGUI::MouseEventArgs & e={...}) Line 3982 + 0x21 bytes C++
CEGUIBase_d.dll!CEGUI::System::injectMouseButtonUp(CEGUI::MouseButton button=LeftButton) Line 941 + 0x16 bytes C++
SpaceRaceD.exe!GameLoop() Line 555 + 0x1b bytes C++
SpaceRaceD.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f1c, int nCmdShow=1) Line 80 C++
SpaceRaceD.exe!__tmainCRTStartup() Line 315 + 0x35 bytes C
SpaceRaceD.exe!WinMainCRTStartup() Line 187 C
If I select a server and then click Join, I get the same call stack and Line 109, BTW, is the return true;
Here is my CEGUI log
Code: Select all
23/10/2006 21:30:18 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23/10/2006 21:30:18 (InfL1) + Crazy Eddie's GUI System - Event log +
23/10/2006 21:30:18 (InfL1) + (http://www.cegui.org.uk/) +
23/10/2006 21:30:18 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23/10/2006 21:30:18 (InfL1) CEGUI::Logger singleton created.
23/10/2006 21:30:18 (InfL1) ---- Begining CEGUI System initialisation ----
23/10/2006 21:30:18 (InfL1) CEGUI::ImagesetManager singleton created
23/10/2006 21:30:18 (InfL1) CEGUI::FontManager singleton created.
23/10/2006 21:30:18 (InfL1) CEGUI::WindowFactoryManager singleton created
23/10/2006 21:30:18 (InfL1) CEGUI::WindowManager singleton created
23/10/2006 21:30:18 (InfL1) CEGUI::SchemeManager singleton created.
23/10/2006 21:30:18 (InfL1) CEGUI::MouseCursor singleton created.
23/10/2006 21:30:18 (InfL1) CEGUI::GlobalEventSet singleton created.
23/10/2006 21:30:18 (InfL1) CEGUI::WidgetLookManager singleton created.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'DefaultWindow' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'DragContainer' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'ScrolledContainer' windows added.
23/10/2006 21:30:18 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
23/10/2006 21:30:18 (InfL1) CEGUI::System singleton created.
23/10/2006 21:30:18 (InfL1) ---- CEGUI System initialisation completed ----
23/10/2006 21:30:18 (InfL1) ---- Version 0.4.1 ----
23/10/2006 21:30:18 (InfL1) ---- Renderer module is: CEGUI::DirectX81Renderer - Official Direct3D 9 based renderer module for CEGUI ----
23/10/2006 21:30:18 (InfL1) ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
23/10/2006 21:30:18 (InfL1) ---- Scripting module is: None ----
23/10/2006 21:30:18 (InfL1) Attempting to load Scheme from file 'Layouts\TaharezLook.scheme'.
23/10/2006 21:30:18 (InfL1) Attempting to create an Imageset from the information specified in file 'Layouts/TaharezLook.imageset'.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/AlternateProgressBar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Button' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Checkbox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/CloseButton' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Combobox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ComboDropList' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ComboEditbox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Editbox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/FrameWindow' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/LargeVerticalScrollbar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/LargeVerticalScrollbarThumb' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Listbox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ListHeader' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ListHeaderSegment' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/HorizontalScrollbar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/HorizontalScrollbarThumb' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/MultiColumnList' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/MultiLineEditbox' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ProgressBar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/RadioButton' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/ScrollablePane' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Slider' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/SliderThumb' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Spinner' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/StaticImage' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/StaticText' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/TabButton' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/TabControl' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/TabPane' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Titlebar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/Tooltip' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/VerticalScrollbar' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/VerticalScrollbarThumb' windows added.
23/10/2006 21:30:18 (InfL1) WindowFactory for 'TaharezLook/VUMeter' windows added.
23/10/2006 21:30:18 (InfL1) Attempting to create Font from the information specified in file 'Layouts/Commonwealth-10.font'.
23/10/2006 21:30:18 (InfL1) Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
23/10/2006 21:30:21 (InfL1) ---- Successfully completed loading of GUI layout from 'Layouts/MainMenu.layout' ----
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-10' does not exist within the system
23/10/2006 21:30:24 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:24 (InfL1) ---- Successfully completed loading of GUI layout from 'Layouts/MultiMenu.layout' ----
23/10/2006 21:30:31 (Error) Exception: MultiColumnList::getRowWithID - no row with the requested ID is present.
23/10/2006 21:30:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:33 (Error) Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12' does not exist within the system
23/10/2006 21:30:33 (InfL1) ---- Successfully completed loading of GUI layout from 'Layouts\Dialog.layout' ----
As you will notice, it does correctly load the Dialog.layout that is loaded in ShowDialog(), so it must be a problem later (after the return). Also, it appears to crash when accessing the vector which stores the columns for the ListHeaderSegment. It does throw me out into the vector source code, but I am sure that is not the problem. Any help is greatly appreciated.
BTW, is 0.5 much better that 0.4? Also, if I upgraded, how much work would it be to convert what I already have?