Hi. I'm just learning how to use your very comprehensive GUI system. While writing my layout, I accidentally added a comma to separate XML attributes (too much Lua coding, I think). I spent a long afternoon wondering why only some of my layout was being drawn before noticing it.
I checked the code, and it looks like in the TinyXMLDocument constructor CEGUITinyXML::TiXmlDocument::parse() is called without checking the return value. Checking for NULL and throwing makes sure errant commas won't bother me again.
I suspect that fixing this could save a lot of headaches for other CEGUI newbies.
(I am only using 0.5, but I checked trunk in the SVN browser and it would appear to have the same problem)
TinyXMLParser failure to parse reports no error
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
-
- Quite a regular
- Posts: 74
- Joined: Mon Apr 28, 2008 23:21
- Location: Australia
Just some food for thought here:
This is the comment for the parse function that is now being checked:
Therefore (as i found when i updated) not having a blank line at the end of a valid layout will make it throw an error which i believe is far more likely to burn noobies
.
Based on that comment I'm not sure that checking the return value for validity is correct usage. I have been wrong before though
ER.
This is the comment for the parse function that is now being checked:
Code: Select all
/* Attribute parsing starts: first letter of the name
returns: the next char after the value end quote
*/
Therefore (as i found when i updated) not having a blank line at the end of a valid layout will make it throw an error which i believe is far more likely to burn noobies

Based on that comment I'm not sure that checking the return value for validity is correct usage. I have been wrong before though

ER.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
-
- Quite a regular
- Posts: 74
- Joined: Mon Apr 28, 2008 23:21
- Location: Australia
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 12 guests