Repeated xml sections question

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

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Repeated xml sections question

Postby jays » Mon May 24, 2010 19:21

Good afternoon,
I'm working on porting the new 0.7 version of CEGUI and have a question.
For testing I'm using the configuration xml files from the source code samples release.

The code is throwing an assert here:

Code: Select all

    void Falagard_xmlHandler::elementImagerySectionStart(const XMLAttributes& attributes)
    {
        assert(d_imagerysection == 0);
        d_imagerysection = new ImagerySection(attributes.getValueAsString(NameAttribute));

        CEGUI_LOGINSANE("-----> Start of definition for imagery section '" + d_imagerysection->getName() + "'.");
    }


When it tries to parse a second <ImagerySection> tag. The documentation shows multiple sections as being valid
http://www.cegui.org.uk/wiki/index.php/The_Beginners_Guide_to_Falagard_skinning_-_Part_I
Am I using the wrong docs and sample configuration files?

Thanks :)
-- Doctor Doctor, it hurts when I ....

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Repeated xml sections question

Postby Jamarr » Mon May 24, 2010 19:45

I have to post the obligatory link to the Forum Guidelines and ask you to post your CEGUI.log file. While I have not heard of this issue before, there are several revisions of v0.7 with numerous bugs and it is important to clarify which revision you are using. Also, when posting xml-related questions it is important to actually include the xml in question (even if from the samples) :wink:

In any case, I am far from being a Falagard expert, so I cannot be of much help. However, I will confirm that multiple ImagerySection elements are legal. My first assumption would be that you have used the same name (attribute) for both elements? Again, it would help if we could see the actual xml in question. Thanks.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Repeated xml sections question

Postby jays » Mon May 24, 2010 20:24

I'm on version 0.7.1.

Here's my log:

Code: Select all

24/05/2010 14:01:55 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
24/05/2010 14:01:55 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
24/05/2010 14:01:55 (Std)    +                          (http://www.cegui.org.uk/)                         +
24/05/2010 14:01:55 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

24/05/2010 14:01:55 (Std)    CEGUI::Logger singleton created. (0A912F60)
24/05/2010 14:01:55 (Std)    
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    * Important:                                                                   *
24/05/2010 14:01:55 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
24/05/2010 14:01:55 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
24/05/2010 14:01:55 (Std)    *     support being given; please do not waste our time.                       *
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    ---- Version 0.7.1 (Build: May 24 2010 Static Microsoft Windows g++ 3.4.5 (mingw-vista special r3) 32 bit) ----
24/05/2010 14:01:55 (Std)    ---- Renderer module is: CEGUI::NeLRenderer - Official NeL based 2nd generation renderer module. ----
24/05/2010 14:01:55 (Std)    ---- XML Parser module is: CEGUI::RapidXMLParser - RapidXML based parser module for CEGUI ----
24/05/2010 14:01:55 (Std)    ---- Image Codec module is: NeLImageCodec - Integrated ImageCodec using the NeL engine. ----
24/05/2010 14:01:55 (Std)    ---- Scripting module is: None ----
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
24/05/2010 14:01:55 (Std)    ********************************************************************************
24/05/2010 14:01:55 (Std)    
24/05/2010 14:01:55 (Std)    ---- Begining CEGUI System initialisation ----
24/05/2010 14:01:55 (Std)    CEGUI::ImagesetManager singleton created (0C0829A8)
24/05/2010 14:01:55 (Std)    CEGUI::FontManager singleton created. (0AA03148)
24/05/2010 14:01:55 (Std)    CEGUI::WindowFactoryManager singleton created
24/05/2010 14:01:55 (Std)    CEGUI::WindowManager singleton created (0C0825F8)
24/05/2010 14:01:55 (Std)    CEGUI::SchemeManager singleton created. (0AA033B0)
24/05/2010 14:01:55 (Std)    CEGUI::MouseCursor singleton created. (0C082E98)
24/05/2010 14:01:55 (Std)    CEGUI::GlobalEventSet singleton created. (0AA03560)
24/05/2010 14:01:55 (Std)    CEGUI::WidgetLookManager singleton created. (0C082C00)
24/05/2010 14:01:55 (Std)    CEGUI::WindowRendererManager singleton created (0AA03670)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'DefaultWindow' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'DefaultWindow' windows added. (0C082650)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'DragContainer' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'DragContainer' windows added. (0AA03990)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'ScrolledContainer' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'ScrolledContainer' windows added. (0AA03AF0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'ClippedContainer' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'ClippedContainer' windows added. (0AA04050)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Checkbox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (0AA04300)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/PushButton' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (0AA044A8)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/RadioButton' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (0AA046C0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Combobox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (0AA04768)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ComboDropList' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (0AA048C8)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Editbox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (0AA04AF0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/FrameWindow' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (0AA04B98)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ItemEntry' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (0AA04F30)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Listbox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (0AA05148)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ListHeader' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (0AA051F0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (0AA05408)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Menubar' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (0AA05718)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/PopupMenu' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (0AA057C0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/MenuItem' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (0AA05920)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/MultiColumnList' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (0AA059C8)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (0AA05C18)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ProgressBar' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (0AA05D78)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ScrollablePane' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (0AA05ED8)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Scrollbar' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (0AA06038)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Slider' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (0AA060E0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Spinner' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (0AA062F8)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/TabButton' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (0AA063A0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/TabControl' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (0AA06670)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Thumb' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (0AA067D0)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Titlebar' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (0AA06878)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Tooltip' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (0AA06920)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/ItemListbox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (0AA06B38)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/GroupBox' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (0AA06C98)
24/05/2010 14:01:55 (Std)    Created WindowFactory for 'CEGUI/Tree' windows.
24/05/2010 14:01:55 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (0AA06DF8)
24/05/2010 14:01:55 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
24/05/2010 14:01:55 (Std)    CEGUI::System singleton created. (0A7EDD28)
24/05/2010 14:01:55 (Std)    ---- CEGUI System initialisation completed ----
24/05/2010 14:01:55 (Std)    
24/05/2010 14:01:55 (Std)    CEGUI::SchemeManager singleton created. (0AA03488)
24/05/2010 14:01:55 (Std)    Started creation of Scheme from XML specification:
24/05/2010 14:01:55 (Std)    ---- CEGUI GUIScheme name: TaharezLook
24/05/2010 14:01:55 (Std)    Started creation of Imageset from XML specification:
24/05/2010 14:01:55 (Std)    ---- CEGUI Imageset name: TaharezLook
24/05/2010 14:01:55 (Std)    ---- Source texture file: TaharezLook.png in resource group: (Default)
24/05/2010 14:01:55 (Std)    Started creation of Font from XML specification:
24/05/2010 14:01:55 (Std)    ---- CEGUI font name: DejaVuSans-10
24/05/2010 14:01:55 (Std)    ----       Font type: FreeType
24/05/2010 14:01:55 (Std)    ----     Source file: DejaVuSans.ttf in resource group: (Default)
24/05/2010 14:01:55 (Std)    ---- Real point size: 10
24/05/2010 14:01:55 (Std)    ===== Falagard 'root' element: look and feel parsing begins =====
-- Doctor Doctor, it hurts when I ....

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Repeated xml sections question

Postby jays » Mon May 24, 2010 20:29

The xml file is too large to post in the forum. It's the unmodified file "CEGUI-0.7.1\datafiles\looknfeel\TaharezLook.looknfeel" from the 0.7.1 download. I can post any portion of it you'd like to see.

Reading the code it doesn't seem that the name is checked before the assert is thrown.

Thanks for trying to help
-- Doctor Doctor, it hurts when I ....

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Repeated xml sections question

Postby Jamarr » Mon May 24, 2010 22:54

Thanks for the extra info, I'm sure someone (CE) will be able to use that. Looking at my own log, I noticed that none of the Falagard code is logged by default. So, it may be helpful to turn on additional logging output prior to initializing CEGUI via:

Code: Select all

   new CEGUI::DefaultLogger();
   CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Insane);


I also noticed you are using a custom xml-parser, among other things. Have you tried any of the supported parsers (tinyxml, expat, etc.)? Ruling out the parser would be one of the first things to try. If the supported parsers work, then it is most certainly an issue with the RapidXML wrapper.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Repeated xml sections question

Postby jays » Tue May 25, 2010 03:38

Thanks for the logging code, I'll certainly give that a whirl.
I'm testing the rapidxml as part of the port but it's probably a good idea to minimize the variables.
-- Doctor Doctor, it hurts when I ....

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

Re: Repeated xml sections question

Postby CrazyEddie » Tue May 25, 2010 10:20

You will find this issue is another instance of the copy/paste issue from before (but for end element).

For info, a tested, debugged and working version of your RapidXML parser now exists in the CEGUI svn tree - both branches/v0-7 and trunk :)

CE.

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Repeated xml sections question

Postby jays » Tue May 25, 2010 22:36

Wow :)

I'll drop my contribution in the box later tonight...
-- Doctor Doctor, it hurts when I ....

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

Re: Repeated xml sections question

Postby CrazyEddie » Wed May 26, 2010 08:33

Thanks very much, it's most appreciated :)

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests