Problems with CvUnitInfo->getDomain() function

LoneTraveller

Warlord
Joined
Apr 30, 2008
Messages
283
Location
Montreal, Quebec
Hi,

I'm trying to merge the "Merged Mod 1.11" with AsioAsioAsio's WW2 mod for BTS and I'm encountering a problem.

The combined mod gets to the main screen fine. I can select which scenario to play, which country, etc. The problem arrives when I launch the game. I can that the progress bar loads all the way and (sometimes) I see the map with units and the city names being loaded.

At that point the game crashes. I have opened the dump file and the call stack states that the last function called is getDomain() in the class CvUnitInfo.

The call stack is the following :

Spoiler :

CvUnitInfo::getDomainType()
CvPlayerAI::AI_calculateUnitAIViability()
CvCityAI::AI_AI_chooseProduction()


I have added CvString variable representing the "Type" in UnitClassInfo and all accessor functions required to read the field from the XML file. Then I typed in a list of fprintf commands in the function in order to figure out at which unit is causing the problem. After letting the mod run for 45 minutes and writing a 450MB text file I saw that the unit causing the error is an "UnitClass_early_artillery" (for which no custom unit exists) and I could see in the file that many other units of this class were called upon before.

So I then decided to comment out that unit in the xml. This had no effect has the game crashes anyways.

Now I don't know what to do. It seems that for a unit somewhere the domain seems to have been misread but not for other units of the same class.

Has anybody ever encountered this type of thing ?

If so I'd like to know how you managed to fix it.

Thank you for your time
 
Could the problem be caused by something in Python? Python is used to load the map and GetDomainType is accessible from Python.
 
Top Bottom