Page 1 of 1

Can't catch loadScheme() exception

Posted: Sat Dec 20, 2008 20:01
by Fake Moustache
I recently had a bug in my code that caused CEGUI to throw an AlreadyExistsException from loadScheme(). The answer was, obviously, because I was accidently loading my .scheme twice. However, the exception never get's caught by my try block, instead my program just terminates.

It seems that the exception is getting thrown from a callback from expat. I'm guessing that since C++ can't propagate the exception through C, it just kills the process instead. Here's a backtrace:

Code: Select all

#0  0x90047dac in kill ()
#1  0x9012d7b4 in abort ()
#2  0x94c79078 in __gnu_cxx::__verbose_terminate_handler ()
#3  0x94c76c08 in __gxx_personality_v0 ()
#4  0x94c76c6c in std::terminate ()
#5  0x94c76eac in __cxa_throw ()
#6  0x002bdaf4 in CEGUI::Scheme_xmlHandler::elementGUISchemeStart ()
#7  0x002be850 in CEGUI::Scheme_xmlHandler::elementStart ()
#8  0x0475e998 in CEGUI::ExpatParser::startElement ()
#9  0x0477eecc in doContent ()
#10 0x0477f9c4 in contentProcessor ()
#11 0x0478025c in doProlog ()
#12 0x04781714 in prologProcessor ()
#13 0x04779d60 in XML_Parse ()
#14 0x0475eb50 in CEGUI::ExpatParser::parseXMLFile ()
#15 0x002c4228 in CEGUI::Scheme::Scheme ()
#16 0x002c54d0 in CEGUI::SchemeManager::loadScheme ()


I'm using the Mac binaries.

Posted: Mon Dec 22, 2008 09:30
by CrazyEddie
Hi, and welcome

Thanks for the report, I'll investigate soon, though you're probably correct about the C issue.

CE