Unhandeled exception with loadWindowLayout

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Azri
Just popping in
Just popping in
Posts: 2
Joined: Wed Aug 09, 2006 18:51

Unhandeled exception with loadWindowLayout

Postby Azri » Wed Aug 09, 2006 19:47

Hello. I'm a new user to CEGUI but I've been checking over the docs and I'm already very impressed. I suspect that if I can get around my current problem I'll become a long time user of CEGUI. So, now to the problem:

I'm trying to load a simple layout I created in CELayoutEditor with loadWindowLayout but I keep getting an Unhandeled exception when I make the call.

Here is all of my code related to CEGUI:

Code: Select all

   pRenderer = new CEGUI::DirectX9Renderer(pDevice, 3000);
   new CEGUI::System(pRenderer);

   CEGUI::SchemeManager::getSingleton().loadScheme("Media\\WindowsLook.scheme");
   
   CEGUI::FontManager::getSingleton().createFont("Media\\Commonwealth-10.font");
   CEGUI::System::getSingleton().setDefaultFont("Commonwealth-10");

   CEGUI::System::getSingleton().setDefaultMouseCursor("WindowsLook", "MouseArrow");

   pRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout(sXMLFilepath.c_str());
CEGUI::System::getSingleton().setGUISheet(pRoot);


and then here is a copy of the log file:
09/08/2006 14:25:53 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
09/08/2006 14:25:53 (InfL1) + Crazy Eddie's GUI System - Event log +
09/08/2006 14:25:53 (InfL1) + (http://www.cegui.org.uk/) +
09/08/2006 14:25:53 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

09/08/2006 14:25:53 (InfL1) CEGUI::Logger singleton created.
09/08/2006 14:25:53 (InfL1) ---- Begining CEGUI System initialisation ----
09/08/2006 14:25:53 (InfL1) CEGUI::ImagesetManager singleton created
09/08/2006 14:25:53 (InfL1) CEGUI::FontManager singleton created.
09/08/2006 14:25:53 (InfL1) CEGUI::WindowFactoryManager singleton created
09/08/2006 14:25:53 (InfL1) CEGUI::WindowManager singleton created
09/08/2006 14:25:53 (InfL1) CEGUI::SchemeManager singleton created.
09/08/2006 14:25:53 (InfL1) CEGUI::MouseCursor singleton created.
09/08/2006 14:25:53 (InfL1) CEGUI::GlobalEventSet singleton created.
09/08/2006 14:25:53 (InfL1) CEGUI::WidgetLookManager singleton created.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'DefaultWindow' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'DragContainer' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'ScrolledContainer' windows added.
09/08/2006 14:25:53 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
09/08/2006 14:25:53 (InfL1) CEGUI::System singleton created.
09/08/2006 14:25:53 (InfL1) ---- CEGUI System initialisation completed ----
09/08/2006 14:25:53 (InfL1) ---- Version 0.4.1 ----
09/08/2006 14:25:53 (InfL1) ---- Renderer module is: CEGUI::DirectX81Renderer - Official Direct3D 9 based renderer module for CEGUI ----
09/08/2006 14:25:53 (InfL1) ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
09/08/2006 14:25:53 (InfL1) ---- Scripting module is: None ----
09/08/2006 14:25:53 (InfL1) Attempting to load Scheme from file 'Media\WindowsLook.scheme'.
09/08/2006 14:25:53 (InfL1) Attempting to create an Imageset from the information specified in file 'Media\WindowsLook.imageset'.
09/08/2006 14:25:53 (InfL1) No window factories specified for module 'CEGUIWindowsLook' - adding all available factories...
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Button' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Checkbox' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/CloseButton' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Combobox' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/ComboDropList' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Editbox' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/FrameWindow' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Listbox' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/ListHeader' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/ListHeaderSegment' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/HorizontalScrollbar' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/HorizontalScrollbarThumb' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/MultiColumnList' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/MultiLineEditbox' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/ProgressBar' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/RadioButton' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/ScrollablePane' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Slider' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/SliderThumb' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Spinner' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/StaticImage' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/StaticText' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/TabButton' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/TabControl' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/TabPane' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Titlebar' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Tooltip' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/VerticalScrollbar' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/VerticalScrollbarThumb' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/TextItem' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/MenubarItem' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/PopupMenuItem' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/Menubar' windows added.
09/08/2006 14:25:53 (InfL1) WindowFactory for 'WindowsLook/PopupMenu' windows added.
09/08/2006 14:25:53 (InfL1) Attempting to create Font from the information specified in file 'Media\Commonwealth-10.font'.
09/08/2006 14:25:53 (InfL1) Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
09/08/2006 14:26:14 (Error) WindowManager::loadWindowLayout - loading of layout from file 'Media\demolayout.layout' failed.



I suspect the error has something to do with the way I set up the project, or because I'm missing some file that I need. I really am not sure about how to go about finding out how to fix this though. Any help is appreciated though.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Aug 10, 2006 08:40

Welcome Azri :-)

Are you using version 0.5? If so, make sure that your resoucepaths are correctly setup. More on this can be found here: http://www.cegui.org.uk/wiki/index.php/ ... s_in_0.5.0

Have you put this code inside a try-catch block? If not, catch a "CEGuiException". This will give you more exact information.

Good luck!

Azri
Just popping in
Just popping in
Posts: 2
Joined: Wed Aug 09, 2006 18:51

Postby Azri » Thu Aug 10, 2006 19:49

Ahh, I got it. Thanks for your help =).


Return to “Help”

Who is online

Users browsing this forum: No registered users and 22 guests