Debugging Asserts

phungus420

Deity
Joined
Mar 1, 2003
Messages
6,296
Assert message:
File: CvCity.cpp
Line: 10587
Expression: eIndex >= 0
Message: eIndex expected to be >= 0

Now my game is modded, but CvCity.cpp is untouched from RevDCM 1.02

Any ideas what this assert failure is from, and how to fix it?


Mod In use during debugging:
http://www.moddb.com/mods/legends-of-revolution/downloads/legends-of-revolution

May it be related to this:
http://forums.civfanatics.com/showthread.php?t=319441
I added a trait effect where non state religions still produced culture, explained in that link, which also has the code I'm using.
 
Also getting another assert here:
Assert Failed

File: CvPlayer.cpp
Line: 6395
Expression: GC.getCivilizationInfo(getCivilizationType()).getCivilizationUnits(eUnitClass) == eUnit
Message:

CvPlayer is modified from default RevDCM 1.02.
 
This one only occurs when starting a new custom Game:

Assert Failed

File: CvGlobals.cpp
Line: 3538
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type NO_IMPROVEMENT not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
 
Assert message:


Now my game is modded, but CvCity.cpp is untouched from RevDCM 1.02

Any ideas what this assert failure is from, and how to fix it?


Mod In use during debugging:
http://www.moddb.com/mods/legends-of-revolution/downloads/legends-of-revolution

May it be related to this:
http://forums.civfanatics.com/showthread.php?t=319441
I added a trait effect where non state religions still produced culture, explained in that link, which also has the code I'm using.

It wouldn't have to be something in CvCity.cpp ... any call to check whether a city has a particular religion is a suspect, even in python. Most likely it's a case where you're checking if a city has a state religion, but the civ has no state religion so it's checking -1.

That's happened to me a few times.
 
Also getting another assert here:


CvPlayer is modified from default RevDCM 1.02.

I'd guess that's also rooted in Python though it could be in the SDK as well. Somewhere there's a check for whether a civ can build axemen for example, but it doesn't adapt for unique units.
 
Well the strange thing is these all ceased happening around 20 turns into the game...
 
Are you guys sure that religion failed assert isn't intrinsic to the Revolution mod? I've put breakpoints on all functions of mine that I've added, and that failed assert trips well before (and multiple times) before anything I've added trips a breakpoint.
 
OK I built a pure RevDCM 2.00 core, and still get this assert failure. So it's definatly a bug intrinsic to RevDCM.
 
Never seen this in Legends, but trying to reproduce the fatal hang reported in Bugs thread for pure revDCM ran into this turn one:
Code:
Assert Failed

File:  CvPlayerAI.cpp
Line:  5054
Expression:  ePlayer != getID()
Message:  shouldn't call this function on ourselves
Code:
Assert Failed

File:  CvPlayerAI.cpp
Line:  5068
Expression:  ePlayer != getID()
Message:  shouldn't call this function on ourselves
Code:
Assert Failed

File:  CvTeamAI.cpp
Line:  2750
Expression:  eTeam != getID()
Message:  shouldn't call this function on ourselves
Code:
Assert Failed

File:  CvTeamAI.cpp
Line:  926
Expression:  eTeam != getID()
Message:  shouldn't call this function on ourselves

These pop up first turn after going into AIAutoPlay when starting the game in future era. Don't know how I'm running into an assert with pure RevDCM I haven't seen in legends, but hey, figure I'd report it. Also I don't run AI autoplay much, and don't start Future era games much either when testing legends, so might be why.
 
Back
Top Bottom