[SOLVED] Help migrating to CEGUI 0.7 using Ogre 1.6.4

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

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

[SOLVED] Help migrating to CEGUI 0.7 using Ogre 1.6.4

Postby Van » Sun Oct 25, 2009 23:43

MSVS 9.0
Ogre: 1.6.4 SVN (using boost 1.40)
CEGUI: 0.7 SVN

We are migrating from CEGUI 0.6.x to 0.7.0 (SVN) and we are getting a runtime exception when initializing the CEGUI system.
Based on the Ogre sample provide, I think we are doing it correctly. The error appears to happen inside CEGUI. The CEGUI log is not even created.

Code: Select all

   // Initialize the CEGUI system
   mGlobalResource->CEGUIRenderer = &CEGUI::OgreRenderer::create();
   CEGUI::ImageCodec *mImageCode = (CEGUI::ImageCodec *) &mGlobalResource->CEGUIRenderer->createOgreImageCodec();
   CEGUI::ResourceProvider *mResourceProvider = (CEGUI::ResourceProvider *) &mGlobalResource->CEGUIRenderer->createOgreResourceProvider();

   mCEGUISystem = &CEGUI::System::create( *mGlobalResource->CEGUIRenderer, mResourceProvider, 0, mImageCode );

   CEGUI::Logger::getSingleton().setLoggingLevel( (CEGUI::LoggingLevel) clsConfig::getSingleton().System.GUILogLevel );


We are getting the exception at this line:

Code: Select all

   mCEGUISystem = &CEGUI::System::create( *mGlobalResource->CEGUIRenderer, mResourceProvider, 0, mImageCode );


The exception

Code: Select all

Unhandled exception at 0x76dcfbae in Client.exe: Microsoft C++ exception: CEGUI::GenericException at memory location 0x0012d67c..


Ogre is already initialized and running. Are we initializing the CEGUI system properly?
Last edited by Van on Mon Oct 26, 2009 23:13, edited 1 time in total.

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:

Re: Help migrating to CEGUI 0.7 using Ogre 1.6.4

Postby scriptkid » Mon Oct 26, 2009 10:29

Hi,

While looking at the sample code myself, i notice a difference with how Ogre is initialized. For example in this file:
http://crayzedsgui.svn.sourceforge.net/ ... iew=markup

You will notice this line:

Code: Select all

// initialise GUI system using the new automagic function
d_renderer = &CEGUI::OgreRenderer::bootstrapSystem();


That 'bootstrap' method already does a bit more on its own. However it doesn't seem to do much more that your custom code though. But it might be worth giving a try... note that you should comment your code which creates the imagecodec, resourceprovider and gui system!

HTH.
Check out my released snake game using Cegui!

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

Re: Help migrating to CEGUI 0.7 using Ogre 1.6.4

Postby Van » Mon Oct 26, 2009 22:46

OK, after doing some debug, it seems to be failing in System::setXMLParser() at line 1579

Code: Select all

    d_xmlParser = createFunc();


This is happening in the CEGUI demo and the Ogre Demo_GUI (converted to 0.7). It still occurs if I use the bootstrap() function call you provided (thank you by the way!).

It would seem the XML parser specification is missing or needs to be provided. Is this missing in the demo's?
BTW, I am trying to link using the DEBUG and RELEASE configurations.

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

[SOLVED] Re: Help migrating to CEGUI 0.7 using Ogre 1.6.4

Postby Van » Mon Oct 26, 2009 23:05

*sigh* Found it. I didn't include the EXPAT XML parser in the batch build. The DLL was missing. How embarrassing. :oops:

Interesting how CEGUI doesn't throw an excepting when the XML DLL is missing.

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:

Re: [SOLVED] Help migrating to CEGUI 0.7 using Ogre 1.6.4

Postby scriptkid » Wed Oct 28, 2009 08:34

Hi,

Okay glad you got it to work. I am not sure why it doesn't throw. I should look at the code to know what's going on. IIRC it does check whether it can load the DLL and query some important function pointers from it...
Check out my released snake game using Cegui!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests