Allocating zero or less memory in... ?

thomas.berubeg

Wandering the World
Joined
Aug 21, 2006
Messages
9,083
Location
Ft. Lauderdale

what does this mean? it happened during the removal of all normal techs in favor of a new tech tree for the arda mod. any ideas on how to fix this? please?
 
I do not know exactly, but likely this was caused by other files (civics, buildings, units, etc) referencing techs that no longer exist.

There is a disable value you can set to 1 for techs which disables them. You can also move them to very far away in the techtree by changing the X and Y coordinates.

In any case, that may not be the solution, but maybe it will help!
 
I did a bit of code-diving and found the following:

CvCivicInfo::read(XML...) does the following six calls:
Code:
pXML->SetVariableListTagPair(&m_pabHurry, "Hurrys", sizeof(GC.getHurryInfo((HurryTypes)0)), GC.getNumHurryInfos());
pXML->SetVariableListTagPair(&m_pabSpecialBuildingNotRequired, "SpecialBuildingNotRequireds", sizeof(GC.getSpecialBuildingInfo((SpecialBuildingTypes)0)), GC.getNumSpecialBuildingInfos());
pXML->SetVariableListTagPair(&m_pabSpecialistValid, "SpecialistValids", sizeof(GC.getSpecialistInfo((SpecialistTypes)0)), GC.getNumSpecialistInfos());

pXML->SetVariableListTagPair(&m_paiBuildingHappinessChanges, "BuildingHappinessChanges", sizeof(GC.getBuildingClassInfo((BuildingClassTypes)0)), GC.getNumBuildingClassInfos());
pXML->SetVariableListTagPair(&m_paiBuildingHealthChanges, "BuildingHealthChanges", sizeof(GC.getBuildingClassInfo((BuildingClassTypes)0)), GC.getNumBuildingClassInfos());
pXML->SetVariableListTagPair(&m_paiFeatureHappinessChanges, "FeatureHappinessChanges", sizeof(GC.getFeatureInfo((FeatureTypes)0)), GC.getNumFeatureInfos());

Now, SetVariableListTagPair has the strange(?) property to show an error message if the fourth parameter is zero or less. Looking at the GC.getNum... calls I would guess that you removed not only all technologies but something more like buildings or specialists.
What I think is strange is that it would really not be necessary for setVariableListTagPair to give an error as long as the tag is empty... If you are changing the SDK files you could try to change the line 1969 in CvXMLLoadUtilitySet.cpp from
Code:
if (0 > iInfoBaseLength)
{ ...
to
Code:
if (0 >= iInfoBaseLength)
{ ...
But I don't guarantee that this will work (and I don't even know if I'm right with my initial assumption).
 
I haven't changed anything besides XML. (i have gotten rid of some buildings, but no specialists,...)
 
Do you have logging enabled?

; Enable the logging system
LoggingEnabled = 1

in My Documents\My Games\Warlords\CivilizationIV.ini

and then look in xml.log. This should point to where the parsing failed.

Typically only the 1st failure is valid since 1 bad tag confuses the parsing, so everything after is hosed too.
 
Top Bottom