[BTS] "There are more siblings than memory allocated for them in CvXMLLoadUtility::SetVariableListTagPair"

SuperXANA

Chieftain
Joined
Aug 19, 2009
Messages
30
Hello everyone!

I'm trying to merge a mod I have altered (to add more leader choices) with the AdvancedCiv mod, to gain the AI improvements and other changes, and I am not having good luck with it right now.

What does the error message mean? I have a lot of XML values to check and I want to narrow it down, if I can!

EDIT: The issue is solved! The problem was that I accidentally copied some of the new Memory Attitude Percents into the Memory Decays section of the XML of only two leaders (out of the 60+ in the file). It counted those as over the memory limit, apparently, and provided this error message that didn't really tell me how to fix it. What a daunting problem this was...

Spoiler Old Issue Text :
I am receiving the quoted error message on my modified/merged Civ4LeaderHeadInfos.xml file (as it says that's the current file in the error popup) and I simply cannot find the error that it's asking me to correct.
I directly copied over the new AdvancedCiv mod tags into my modified leaders and changed the number values to suit the AI personalities, so that's why I am at my wits end trying to figure out what went wrong.

I have looked the file over many times now to determine if I accidentally duplicated an entry under one of the prime suspect tags (MemoryDecays or MemoryAttitudePercents) and I'm just not seeing where I messed up!
They are my suspected tags for this error, because they have the most changes from the AdvancedCiv mod compared with my original non-merged version.


EDIT: I deleted the file because the issue is fixed.


There are 60+ leaders in my Civ4LeaderHeadInfos.xml file now, so it takes a long time to recheck my work when I get an error message. My game loads fine otherwise, and the leaders all show up as available for play, it's just that I would like to fix this error so my game can be error free.

I would really appreciate it if you can help me out! Another set of eyes on this issue should help me figure out where the issue is.
 
Last edited:
When checking for problems in XML I use the Caveman2Cosmos utility C2CXmlValidator. It looks at the XML, finds the schema you have defined at the top of the XML, then checks your XML against that schema. It might help you.
 
"There are more siblings than memory allocated for them in CvXMLLoadUtility::SetVariableListTagPair"
I know the problem has been solved, but I will still explain this error message because it's unlikely the last time anybody will see it.

The problem is when you add a list to xml. Say it's a list of free promotions. The game will allocate a list with allocated memory for each promotion. However if you for some reason write a list in xml with more list elements than the number of promotions, this error will show up. This will in most cases be an issue with the xml file because for normal use it makes no sense to make the list too long. What will you add to a list of free promotions after having mentioned all promotions?

This issue applies to all lists. I just mentioned free promotions because it's a simple example and easy to understand. The problem was apparently in Memory Decay, which requires more knowledge of the game mechanics to understand, but it's the same DLL code, hence the same principle of the cause of the problem.

provided this error message that didn't really tell me how to fix it. What a daunting problem this was...
That's one of the issues I hate about vanilla. Whenever something goes wrong in xml reading, it will throw an error, but most of them helps very little towards understanding the cause of the problem. I have lost count of how many times I have used a debugger to identify which xml file is causing some issue. I have rewritten M:C to provide better error messages, like contents of Type and which tag it went wrong with. However to get this to work, the code is so heavily modded that it's unlikely that it will be copied to other mods. In fact I have come this far and is now considering writing my own xml reading code and not use the vanilla one at all. I'm half way there already, if not further than that.
 
Top Bottom