Runtime exception with CeGUI 0.7.5-8

Found a bug? Report it here.

Moderator: PPS-Leaders

Post Reply
User avatar
fmauro
Noxonian Grollknom
Posts: 7
Joined: Sun Oct 02, 2011 6:30 pm

Runtime exception with CeGUI 0.7.5-8

Post by fmauro » Tue Mar 12, 2013 11:39 am

Compiling with this newer version of CeGUI works fine, but the game crashes upon start with the following in stdout:

Code: Select all

Info: Creating render window...
Info: Ogre config file has changed, but no level was started since then. Displaying config dialogue again to verify the changes.
Info: Initializing all resource groups...
Info: Loading user interface...
Error (internal): [cegui] Scheme_xmlHandler::elementStart: Unknown element encountered: <>ր
Error: Received signal SIGSEGV
Error: Try to write backtrace to file orxonox_crash.log
And the crashlog:

Code: Select all

=======================================================
= time: Tue Mar 12 12:29:41 2013
=======================================================
Program received signal SIGSEGV, Segmentation fault.
0xb6a0a276 in free () from /lib/i386-linux-gnu/libc.so.6
(gdb) 
#0  0xb6a0a276 in free () from /lib/i386-linux-gnu/libc.so.6
#1  0xb6c0151f in operator delete(void*) ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#2  0xb6c0157b in operator delete[](void*) ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#3  0xb53ba248 in CEGUI::OgreResourceProvider::unloadRawDataContainer(CEGUI::RawDataContainer&) () from /usr/lib/libCEGUIOgreRenderer-0.7.5.so
#4  0xaf7a4085 in CEGUI::TinyXMLDocument::TinyXMLDocument(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) ()
   from /usr/lib/libCEGUITinyXMLParser-0.7.5.so
#5  0xaf7a4372 in CEGUI::TinyXMLParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) ()
   from /usr/lib/libCEGUITinyXMLParser-0.7.5.so
#6  0xb59d4baa in CEGUI::Scheme_xmlHandler::Scheme_xmlHandler(CEGUI::String const&, CEGUI::String const&) () from /usr/lib/libCEGUIBase-0.7.5.so
#7  0xb5457184 in ?? () from /usr/lib/libCEGUILuaScriptModule-0.7.5.so
#8  0xb63e99ae in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#9  0xb63f47fd in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#10 0xb63e9dc8 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#11 0xb63e4150 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#12 0xb63e907e in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#13 0xb63e9fa0 in ?? () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#14 0xb63e5733 in lua_pcall () from /usr/lib/i386-linux-gnu/liblua5.1.so.0
#15 0xb5fd48d0 in orxonox::LuaState::doString (this=0x849da68, code=..., 
    sourceFileInfo=...)
    at /home/fmauro/orxonox/trunk/src/libraries/core/LuaState.cc:188
#16 0xb5fd456b in orxonox::LuaState::doFile (this=0x849da68, filename=...)
    at /home/fmauro/orxonox/trunk/src/libraries/core/LuaState.cc:135
#17 0xb60412ef in orxonox::GUIManager::GUIManager (this=0x86487b0, 
    mousePosition=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /home/fmauro/orxonox/trunk/src/libraries/core/GUIManager.cc:325
#18 0xb602ea96 in orxonox::Core::loadGraphics (this=0x811f760)
    at /home/fmauro/orxonox/trunk/src/libraries/core/Core.cc:372
#19 0xb5fa36b0 in orxonox::Game::loadGraphics (this=0x811f528)
    at /home/fmauro/orxonox/trunk/src/libraries/core/Game.cc:530
#20 0xb5fa3c51 in orxonox::Game::loadState (this=0x811f528, name=...)
    at /home/fmauro/orxonox/trunk/src/libraries/core/Game.cc:591
#21 0xb5fa15f6 in orxonox::Game::updateGameStateStack (this=0x811f528)
    at /home/fmauro/orxonox/trunk/src/libraries/core/Game.cc:256
#22 0xb5fa0ffc in orxonox::Game::run (this=0x811f528)
    at /home/fmauro/orxonox/trunk/src/libraries/core/Game.cc:177
#23 0xb707789a in orxonox::main (strCmdLine=...)
    at /home/fmauro/orxonox/trunk/src/orxonox/Main.cc:108
#24 0x0804b838 in main (argc=1, argv=0xbfce0b64)
    at /home/fmauro/orxonox/trunk/src/Orxonox.cc:85
(gdb) 
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
(gdb) 
We are trying to package orxonox on Ubuntu 12.04 precise and the older package version is no longer maintained in the repos.
The Jo has already filed a bug in CeGUI and the response was to consider another XML parser.
http://www.cegui.org.uk/mantis/view.php?id=928

How would we go about changing the XML parser for cegui? Is this the right way to go?

Cheers

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Runtime exception with CeGUI 0.7.5-8

Post by x3n » Tue Mar 12, 2013 8:05 pm

Looks almost like the error in this topic: http://forum.orxonox.net/viewtopic.php?p=4528#p4528

Without looking into CEGUI documentation: Usually, if you want to use a different parser, you have to change it at compile time (in this case at compile time of CEGUI). Maybe in your distribution of CEGUI other XML-parsers have already been activated, in which case those parsers whould be added as dependencies to CEGUI (hence you could look at the dependencies of your CEGUI package and search for XML-parsers). Then you could probably change them at runtime in Orxonox. Otherwise, I guess, you have to compile CEGUI manually.

I can't tell if this is the right way to go. I haven't seen this error with CEGUI 7.5 yet (on windows), however I probably have a different release than you and I guess something is messed up with your distribution which causes those problems...
Fabian 'x3n' Landau, Orxonox developer

User avatar
fmauro
Noxonian Grollknom
Posts: 7
Joined: Sun Oct 02, 2011 6:30 pm

Re: Runtime exception with CeGUI 0.7.5-8

Post by fmauro » Tue Mar 19, 2013 4:53 pm

Looks like I found a fix.

The problem was with CEGUI changing its default parser from Expat/Xerces to TinyXML. But the new version in Debian/Ubuntu still comes with all Parsers Compiled. It only took one line, setting the new XML Parser back to Expat right after the Singleton is created.

GUIManager.cc:310

Code: Select all

#ifdef ORXONOX_OLD_CEGUI
        guiSystem_ = new System(guiRenderer_, resourceProvider_, 0, scriptModule_);
        // Add functions that have been renamed in newer versions
        luaState_->doString("CEGUI.SchemeManager.create = CEGUI.SchemeManager.loadScheme");
        luaState_->doString("CEGUI.Window.getUnclippedOuterRect = CEGUI.Window.getUnclippedPixelRect");
        luaState_->doString("CEGUI.ImagesetManager.createFromImageFile=
                CEGUI.ImagesetManager.createImagesetFromImageFile");
#else
        guiSystem_ = &System::create(*guiRenderer_, resourceProvider_, 0, imageCodec_, scriptModule_);
#endif

>       CEGUI::System::getSingleton().setXMLParser("ExpatParser");
>
        // Align CEGUI mouse with OIS mouse
        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);

        // Initialise the Lua framework and load the schemes
        orxout(user_info) << "Loading user interface..." << endl;
        this->luaState_->doFile("InitialiseGUI.lua");

I have only tested this in my Ubuntu VM, so I'll wait and test it on the tardis machines to see if we have to add some preprocessor directives to exclude it there.

The game runs fine with this fix. We should be able to package it for newer Debian/Ubuntu versions.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Runtime exception with CeGUI 0.7.5-8

Post by x3n » Tue Mar 19, 2013 8:25 pm

Nice. I think the windows dependencies are compiled with tinyxml though, so I guess we should enable this line only for linux (or maybe you can retrieve a list of supported parsers from cegui and enable expat only if it is supported?)
Fabian 'x3n' Landau, Orxonox developer

User avatar
fmauro
Noxonian Grollknom
Posts: 7
Joined: Sun Oct 02, 2011 6:30 pm

Re: Runtime exception with CeGUI 0.7.5-8

Post by fmauro » Tue Mar 19, 2013 8:41 pm

I can certainly try. Although I have yet to build it for windows.
I'll have a go at it next week and will let you know how it goes.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Runtime exception with CeGUI 0.7.5-8

Post by x3n » Wed Mar 20, 2013 9:29 pm

I can try it on Windows, no problem. Just commit it and if it doesn't work, I can still remove it or add a preprocessor condition
Fabian 'x3n' Landau, Orxonox developer

User avatar
fmauro
Noxonian Grollknom
Posts: 7
Joined: Sun Oct 02, 2011 6:30 pm

Re: Runtime exception with CeGUI 0.7.5-8

Post by fmauro » Tue Apr 02, 2013 10:55 am

The change is in trunk and it compiles without a hitch. (I have not run it yet as I haven't been on a tardis machine last week)

Give it a shot on Windows if you want.

Cheers

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Runtime exception with CeGUI 0.7.5-8

Post by x3n » Thu Apr 04, 2013 6:40 pm

I did and I already added a small enhancement for windows (and other systems without xerces) :)
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests