I changed the call
Code: Select all
CEGUI::OgreRenderer& renderer_ = CEGUI::OgreRenderer::bootstrapSystem();
by its equivalent to see how the app crashes
Code: Select all
if (CEGUI::System::getSingletonPtr())
throw CEGUI::InvalidRequestException("OgreRenderer::bootstrapSystem: "
"CEGUI::System object is already initialised.");
CEGUI::OgreRenderer& renderer = CEGUI::OgreRenderer::create();
CEGUI::OgreResourceProvider& rp = CEGUI::OgreRenderer::createOgreResourceProvider();
CEGUI::OgreImageCodec& ic = CEGUI::OgreRenderer::createOgreImageCodec();
CEGUI::System::create(renderer, &rp, static_cast<CEGUI::XMLParser*>(0), &ic);
And I notice that it crashes on the last line, with the call :
Code: Select all
CEGUI::System::create(renderer, &rp, static_cast<CEGUI::XMLParser*>(0), &ic);
The problem seems to be the XML parser but I don't really know why. I don't see any exception throw in that code. And the logger was create but nothing inside except a message CEGUI::Logger singleton created. (01D0EF80)
So if i look into this method, it call new System(...). I give you the code of the function
Code: Select all
System::System(Renderer& renderer,
ResourceProvider* resourceProvider,
XMLParser* xmlParser,
ImageCodec* imageCodec,
ScriptModule* scriptModule,
const String& configFile,
const String& logFile)
: [....]
// Start out by fixing the numeric locale to C (we depend on this behaviour)
// consider a UVector2 as a property {{0.5,0},{0.5,0}} could become {{0,5,0},{0,5,0}}
setlocale(LC_NUMERIC, "C");
// Instantiate logger first (we have no file at this point, but entries will
// be cached until we do)
//
// NOTE: If the user already created a logger prior to calling this
// constructor, we mark it as so and leave the logger untouched. This allows
// the user to fully customize the logger as he sees fit without fear of
// seeing its configuration overwritten by this.
#ifdef CEGUI_HAS_DEFAULT_LOGGER
if (d_ourLogger)
new DefaultLogger();
#endif
Logger& logger(Logger::getSingleton());
// create default resource provider, unless one was already provided
if (!d_resourceProvider)
{
d_resourceProvider = new DefaultResourceProvider;
d_ourResourceProvider = true;
}
// handle initialisation and setup of the XML parser
setupXMLParser();
// now XML is available, read the configuration file (if any)
Config_xmlHandler config;
if (!configFile.empty())
{
try
{
d_xmlParser->parseXMLFile(config, configFile,
config.CEGUIConfigSchemaName,
"");
}
catch(...)
{
// cleanup XML stuff
d_xmlParser->cleanup();
delete d_xmlParser;
throw;
}
}
// Initialise logger if the user didn't create a logger beforehand
if (d_ourLogger)
config.initialiseLogger(logFile);
// if we created the resource provider we know it's DefaultResourceProvider
// so can auto-initialise the resource group directories via the config
if (d_ourResourceProvider)
config.initialiseResourceGroupDirectories();
// get config to update XML parser if it needs to.
config.initialiseXMLParser();
// set up ImageCodec
config.initialiseImageCodec();
if (!d_imageCodec)
setupImageCodec("");
// initialise any default resource groups specified in the config.
config.initialiseDefaultResourceGroups();
initialiseVersionString();
outputLogHeader();
// beginning main init
logger.logEvent("---- Begining CEGUI System initialisation ----");
// [After, I don't care because I haven't that line in my cegui logger]
So, as I have a logger, I know that the problem is'nt that.
Next, I give a ResourceProvider to the method so it's not that too.
And then, there is the call of
setupXMLParser(). I don't know if it's the problem, but after, there is a throw but I don't care because configFile is empty so that code is'nt executed.