EmperorFool
Deity
You eliminated the "bool hideAssert" argument.
Oh, that was unintentional. I modified my copy of CvGlobals.cpp which doesn't include RevDCM. My point was only to have Afforess add the parts I bolded in my posting.
You eliminated the "bool hideAssert" argument.
Oh, that was unintentional. I modified my copy of CvGlobals.cpp which doesn't include RevDCM. My point was only to have Afforess add the parts I bolded in my posting.
But the idea is to search the entire XML folder structure for the RELIGION_HELLENISTIC string.
Assert Failed
File: c:\program files (x86)\firaxis games\sid meier's civilization 4\beyond the sword\cvgamecoredll\CvInfos.h
Line: 93
Expression: false
Message: Override this
void copyNonDefaults(CvInfoBase* pClassInfo = NULL );
virtual void copyNonDefaultsReadPass2(CvInfoBase* pClassInfo = NULL ){ pClassInfo; FAssertMsg(false, "Override this"); }
LoadGlobalClassInfo(GC.getTechInfo(), "CIV4TechInfos", "Technologies", "Civ4TechInfos/TechInfos/TechInfo", true, &CvDLLUtilityIFaceBase::createTechInfoCacheObject);
void CvTechInfo::copyNonDefaultsReadPass2(CvTechInfo* pClassInfo)
{
// nothing to copy
}
Assert Failed
File: CvCity.cpp
Line: 1430
Expression: iCount == getBaseYieldRate((YieldTypes)iI)
Message:
void CvCity::doTurn()
{...
#ifdef _DEBUG
{
CvPlot* pPlot;
int iCount;
int iI, iJ;
for (iI = 0; iI < NUM_YIELD_TYPES; iI++)
{
FAssert(getBaseYieldRate((YieldTypes)iI) >= 0);
FAssert(getYieldRate((YieldTypes)iI) >= 0);
iCount = 0;
/*************************************************************************************************/
/** JOOYO_ADDON, Added by Jooyo, 06/17/09 */
/** */
/** */
/*************************************************************************************************/
for (iJ = 0; iJ < getNumCityPlots(); iJ++)
/*************************************************************************************************/
/** JOOYO_ADDON END */
/*************************************************************************************************/
{
if (isWorkingPlot(iJ))
{
pPlot = getCityIndexPlot(iJ);
if (pPlot != NULL)
{
iCount += pPlot->getYield((YieldTypes)iI);
}
}
}
for (iJ = 0; iJ < GC.getNumSpecialistInfos(); iJ++)
{
iCount += (GET_PLAYER(getOwnerINLINE()).specialistYield(((SpecialistTypes)iJ), ((YieldTypes)iI)) * (getSpecialistCount((SpecialistTypes)iJ) + getFreeSpecialistCount((SpecialistTypes)iJ)));
}
for (iJ = 0; iJ < GC.getNumBuildingInfos(); iJ++)
{
iCount += getNumActiveBuilding((BuildingTypes)iJ) * (GC.getBuildingInfo((BuildingTypes) iJ).getYieldChange(iI) + getBuildingYieldChange((BuildingClassTypes)GC.getBuildingInfo((BuildingTypes) iJ).getBuildingClassType(), (YieldTypes)iI));
}
iCount += getTradeYield((YieldTypes)iI);
iCount += getCorporationYield((YieldTypes)iI);
[B]FAssert(iCount == getBaseYieldRate((YieldTypes)iI));[/B]
}
for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
{
FAssert(getBuildingCommerce((CommerceTypes)iI) >= 0);
FAssert(getSpecialistCommerce((CommerceTypes)iI) >= 0);
FAssert(getReligionCommerce((CommerceTypes)iI) >= 0);
FAssert(getCorporationCommerce((CommerceTypes)iI) >= 0);
FAssert(GET_PLAYER(getOwnerINLINE()).getFreeCityCommerce((CommerceTypes)iI) >= 0);
}
for (iI = 0; iI < GC.getNumBonusInfos(); iI++)
{
FAssert(isNoBonus((BonusTypes)iI) || getNumBonuses((BonusTypes)iI) >= ((isConnectedToCapital()) ? (GET_PLAYER(getOwnerINLINE()).getBonusImport((BonusTypes)iI) - GET_PLAYER(getOwnerINLINE()).getBonusExport((BonusTypes)iI)) : 0));
}
}
#endif
...}
Assert Failed
File: CvCity.cpp
Line: 12179
Expression: eIndex >= 0
Message: eIndex expected to be >= 0
----------------------------------------------------------
int CvCity::getUnitCombatFreeExperience(UnitCombatTypes eIndex) const
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < GC.getNumUnitCombatInfos(), "eIndex expected to be < GC.getNumUnitCombatInfos()");
return m_paiUnitCombatFreeExperience[eIndex];
}
The second one is definitely a problem as it causes the code to read outside the valid array bounds--never a good thing. Check where that function is being called with an invalid UnitCombatTypes value (probably NO_UNITCOMBAT from a Worker or Settler).
If it has a valid UnitCombatTypes it shouldn't cause a problem as it will be inside the array bounds. Only -1 (UNITCOMBAT_NONE) or values higher than the maximum value will cause trouble if it's the array access that is causing problems.
You must check all code that calls this function to ensure that it checks there is a valid combat type before making the call. If they all do, the problem is somewhere else.
I just checked, all the functions that call it (And there aren't very many), all check for or cast to UnitCombatTypes first.
for (iI = 0; iI < GC.getNumUnitCombatInfos(); iI++)
{
changeUnitCombatFreeExperience(((UnitCombatTypes)iI), GC.getBuildingInfo(eBuilding).getUnitCombatFreeExperience(iI) * iChange);
}
As for trusting the Firaxis code is flawless, no code is flawless. Every program of sufficient complexity (more than one hundred lines?) will have bugs. I believe that if you build a Debug version of the stock BTS code and run it with the stock XML you'll get failed assertions, but don't quote me on that. I am nearly positive that WoC has failed assertions out-of-the-box.