Font XML Parsing Crash

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Malkyne
Just popping in
Just popping in
Posts: 9
Joined: Wed Jan 12, 2005 12:06
Location: Sydney, Australia

Font XML Parsing Crash

Postby Malkyne » Wed Aug 25, 2004 12:55

So, I've written up the beginnings of a Gambryo renderer (still quite primordial), and I scrapped together a little app to test my new code. I'm using the xml and media from Ogre Demo 7 to test with. After fixing a few problems I have, the program now tries to run, but then unceremoniously crashes on:

parser->parse(filename.c_str());

...in CEGUIFont.cpp. The exception is NOT an XML or SAX Parser exception, so it falls through to the final (...) case, which provides NO useful information at all. I can't step into the parser at all, it seems. As a desperation move, I commented out all of the exception handling around this statement, to see what the actual error was. This is what I saw:

Debug Error!

Program: C:\dev\guitest\Debug\guitest.exe
Module:
File: i386\chkesp.c
Line: 42

The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a funciton pointer declared with a different calling convention.


Er, hubuwha? I'm an old vet, and this is the first time I've ever seen this error. It looks like a DLL mismatch problem or something. Does anyone have any suggestions? Thanks!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Font XML Parsing Crash

Postby CrazyEddie » Wed Aug 25, 2004 13:29

The first thing I'd suggest is making sure the Font.xsd file has been properly updated (and also the imageset files etc, as described in the sticky topic at the top of this forum). However, this looks like it may not be this, so...

Are you using one of the precompiled dependecy library packages or did you compile your own? This is all obvious stuff, but if you compiled your own, ensure that everything is configured to use the same runtime setting - preferably as a 'dll' to eliminate cross-heap allocation/free issues on Win32.

Also, what does CEGUI.log say? (with the exception handling put back in ;) ).

CE.

User avatar
Malkyne
Just popping in
Just popping in
Posts: 9
Joined: Wed Jan 12, 2005 12:06
Location: Sydney, Australia

Font XML Parsing Crash

Postby Malkyne » Thu Aug 26, 2004 00:54

Thanks for the quick reply, Eddie!

I am using the precompiled dependency package. (I had originally tried to do things the hard way, but Boost was giving me the usual headaches.)

Here is my log:

26/07/2004 00:49:14 (InfL1) CEGUI::Logger singleton created.
26/07/2004 00:49:14 (InfL1) ---- Begining CEGUI System initialisation ----
26/07/2004 00:49:14 (InfL1) CEGUI::ImagesetManager singleton created
26/07/2004 00:49:14 (InfL1) CEGUI::FontManager singleton created.
26/07/2004 00:49:14 (InfL1) CEGUI::WindowFactoryManager singleton created
26/07/2004 00:49:14 (InfL1) CEGUI::WindowManager singleton created
26/07/2004 00:49:14 (InfL1) CEGUI::SchemeManager singleton created.
26/07/2004 00:49:14 (InfL1) CEGUI::MouseCursor singleton created.
26/07/2004 00:49:14 (InfL1) CEGUI::System singleton created.
26/07/2004 00:49:14 (InfL1) ---- CEGUI System initialisation completed ----
26/07/2004 00:49:14 (Error) Exception: Font::load - An unexpected error occurred while parsing Font file 'test_font.xml'.


There's the (...) exception I was talking about. :(

I'm going to poke at this some more. I'm not sure what's going on, but being on Australia, I usually have a long time to chew on things before anyone else wakes up.

Tess

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Font XML Parsing Crash

Postby CrazyEddie » Thu Aug 26, 2004 05:07

This definately looks like the Font.xsd issue. You didn't mention whether you'd updated these files, so my advice is to make sure all the files from XMLRefSchema are copied over the top of the ones in the demo. THe following thread has details about what you need to update and why ----->CLICKY<-----

HTH

CE.

User avatar
Malkyne
Just popping in
Just popping in
Posts: 9
Joined: Wed Jan 12, 2005 12:06
Location: Sydney, Australia

Font XML Parsing Crash

Postby Malkyne » Thu Aug 26, 2004 05:33

Oh, I wish it were that easy, but I did all that already. :(

Thanks for trying, anyway.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Font XML Parsing Crash

Postby CrazyEddie » Thu Aug 26, 2004 08:10

I don't see that it's an issue within the system itself, otherwise we'd all be having the same problem. Therefore I currently think that it's something in the code for your test app or the project settings for the test app. I've run out of straws to grab at now, so I'm going to have to see some code or something :)

Edit:
I forgot to ask, which compiler are you using? Thanks.

CE.

User avatar
Malkyne
Just popping in
Just popping in
Posts: 9
Joined: Wed Jan 12, 2005 12:06
Location: Sydney, Australia

Font XML Parsing Crash

Postby Malkyne » Thu Aug 26, 2004 08:36

Okay, I've figured out what was causing that problem. (I have none of the GUI stuff showing up, but having nothing showing up is better than having a big crash!)

It turns out that there was a tiny error in my renderer-specific Texture loadFromMemory() implementation.

The thing that made this hard to debug was the inability to step into the parsing process. The solution to this problem was to place breakpoints down in the Font_xmlHandler code, so that we could catch where the real problem was. Once I found it, it took seconds to fix.

To answer your question, the compiler is MSVC++.

Now, on to debugging, round two! 8)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Font XML Parsing Crash

Postby CrazyEddie » Thu Aug 26, 2004 10:06

Cool :) Glad you have it working. Well, at least, non-crashing, anyway ;)

User avatar
Emmeran
Quite a regular
Quite a regular
Posts: 46
Joined: Wed Jan 12, 2005 12:06
Location: Germany, near Nuremberg
Contact:

Font XML Parsing Crash

Postby Emmeran » Thu Aug 26, 2004 15:21


User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Font XML Parsing Crash

Postby CrazyEddie » Thu Aug 26, 2004 17:52

Malkyne is writing a custom renderer for the Gambryo system (www.gamebryo.com). The problem was related to the code in the custom renderer/texture classes rather than anything within the current renderers provided.

If you're having similar issues, please post, in another thread, so this one does not get hijacked, further information and some of the CEGUI.log so it may be possible to help diagnose your specific problem.

Thanks,

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 17 guests