I just switched to VS 2005 Express, and now I am having a problem with the following code:
Code: Select all
void SetupMainMenu()
{
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
wmgr.destroyAllWindows();
CEGUI::Window* myRoot = wmgr.createWindow("DefaultWindow", "root");
CEGUI::System::getSingleton().setGUISheet(myRoot);
CEGUI::Window* myTop = wmgr.loadWindowLayout("Layouts/MainMenu.layout");
myRoot->addChildWindow(myTop);
wmgr.getWindow("btnSingle")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnMulti")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnSound")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnGraphics")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnCredits")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnQuit")->subscribeEvent("MouseEnter",EventMouseOver);
wmgr.getWindow("btnQuit")->subscribeEvent("MouseClick",QuitClicked);
wmgr.getWindow("btnSound")->subscribeEvent("MouseClick",SoundClicked);
};
When it executes, i get the error:
Code: Select all
Unhandled exception at 0x0042d9ab in SpaceRaceD.exe: 0xC0000005: Access violation reading location 0xcdcdcd08.
When it gets to:
Code: Select all
wmgr.getWindow("btnSingle")->subscribeEvent("MouseEnter",EventMouseOver);
Although there are no errors shown, here is my ceGUI.log
Code: Select all
07/12/2005 21:38:16 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
07/12/2005 21:38:16 (InfL1) + Crazy Eddie's GUI System - Event log +
07/12/2005 21:38:16 (InfL1) + (http://www.cegui.org.uk/) +
07/12/2005 21:38:16 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
07/12/2005 21:38:16 (InfL1) CEGUI::Logger singleton created.
07/12/2005 21:38:16 (InfL1) ---- Begining CEGUI System initialisation ----
07/12/2005 21:38:16 (InfL1) CEGUI::ImagesetManager singleton created
07/12/2005 21:38:16 (InfL1) CEGUI::FontManager singleton created.
07/12/2005 21:38:16 (InfL1) CEGUI::WindowFactoryManager singleton created
07/12/2005 21:38:16 (InfL1) CEGUI::WindowManager singleton created
07/12/2005 21:38:16 (InfL1) CEGUI::SchemeManager singleton created.
07/12/2005 21:38:16 (InfL1) CEGUI::MouseCursor singleton created.
07/12/2005 21:38:16 (InfL1) CEGUI::GlobalEventSet singleton created.
07/12/2005 21:38:16 (InfL1) WindowFactory for 'DefaultWindow' windows added.
07/12/2005 21:38:16 (InfL1) WindowFactory for 'DragContainer' windows added.
07/12/2005 21:38:16 (InfL1) WindowFactory for 'ScrolledContainer' windows added.
07/12/2005 21:38:16 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
07/12/2005 21:38:16 (InfL1) CEGUI::System singleton created.
07/12/2005 21:38:16 (InfL1) ---- CEGUI System initialisation completed ----
07/12/2005 21:38:16 (InfL1) Attempting to load Scheme from file 'Layouts\TaharezLook.scheme'.
07/12/2005 21:38:16 (InfL1) Attempting to create an Imageset from the information specified in file 'Layouts/TaharezLook.imageset'.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/AlternateProgressBar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Button' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Checkbox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/CloseButton' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Combobox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ComboDropList' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ComboEditbox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Editbox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/FrameWindow' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/LargeVerticalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/LargeVerticalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Listbox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ListHeader' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ListHeaderSegment' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/HorizontalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/HorizontalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/MultiColumnList' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/MultiLineEditbox' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ProgressBar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/RadioButton' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/ScrollablePane' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Slider' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/SliderThumb' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Spinner' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/StaticImage' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/StaticText' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/TabButton' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/TabControl' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/TabPane' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Titlebar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/Tooltip' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/VerticalScrollbar' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/VerticalScrollbarThumb' windows added.
07/12/2005 21:38:17 (InfL1) WindowFactory for 'TaharezLook/VUMeter' windows added.
07/12/2005 21:38:17 (InfL1) Attempting to create Font from the information specified in file 'Layouts/Commonwealth-10.font'.
07/12/2005 21:38:17 (InfL1) Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
07/12/2005 21:38:23 (InfL1) ---- Successfully completed loading of GUI layout from 'Layouts/MainMenu.layout' ----
This only happens when I compile to my debug version. My release works just fine, and evn handles the events correctly. I have tried linking my debug with both debug and release versions of all ceGUI DLLs, but it does not make a difference.
Any ideas?