Page 1 of 1

Initialization Generic Exception

Posted: Fri May 30, 2008 21:31
by tobi11
Hi!
I am trying to initialize CEGUI 0.6 on Mac OS X Leopard. I am using Ogre, so the code is that:
mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr);
mGUISystem = new CEGUI::System(mGUIRenderer, 0, 0, 0, "", "cegui.log");
This Code causes the following errors:
terminate called after throwing an instance of 'CEGUI::GenericException'
(0) : fatal error C9999: *** exception during compilation ***
Cg compiler terminated due to fatal error
Exited with exit code: 15
If I comment the CEGUI::System line (2) out, the following errors are displayed:
Assertion failed: (ms_Singleton), function getSingleton, file CEGUISingleton.h, line 79.
(0) : fatal error C9999: *** exception during compilation ***
Cg compiler terminated due to fatal error
Exited with exit code: 15
If I leave both lines out, all works well without any error.
I was not able to get the log file, because it will not be created, whatever path I write in the param list of System().
Can somebody help me fix these errors?
thanks

tobi11

Posted: Sat May 31, 2008 07:55
by CrazyEddie
Hi,

I think this could be that it can't find the XML parser module. I'm not sure what that would default to, since in CEGUIConfig.h it is set to the Expat parser, though in the other thread you mentioned renaming config.h.in to config.h - if this is getting included the default action in there is to undefine the CEGUI_DEFAULT_XMLPARSER macro - so that might be causing the issue (looking for a non-existent module).

You may be able to confirm this is the issue by wrapping the code in a try/catch block, catching the CEGUI::Exception, and outputting the error message in there via the CEGUI::Exception::getMessage member (this returns a CEGUI::String).

CE

Posted: Sat May 31, 2008 12:09
by tobi11
Yeah, you're right:
An exception has occurred: DynamicModule::DynamicModule - Failed to load module 'CEGUIExpatParser': Unknown Error
I already thought that this can't be so easy with the config file every time :-)
I changed the XML Parser and now everything works.
thanks