Specific Bug Reports

Vanilla build 1/30

Assert Failed

File: .\CvSelectionGroupAI.cpp
Line: 179
Expression: false
Message:

----------------------------------------------------------

Assert Failed

File: .\CvGlobals.cpp
Line: 1237
Expression: eUnitNum < GC.getNumUnitInfos()
Message:

----------------------------------------------------------

After the second Assert Civ4 either hangs and prevents me from properly tabbing to the asert window (but not the task manager), or crashes to desktop.

The save is below, just hit enter:

http://forums.civfanatics.com/uploads/109335/DoubleAssertthenCrash.Civ4SavedGame
 
probably same bug (warlords 1/30):
Assert Failed

File: .\CvGlobals.cpp
Line: 1236
Expression: eUnitNum > -1
Message:

no assert info before
can't publish save game, because this is happened in our TR devel version (merged with BetterAI 1/30 (ie rev. 338))

EDIT:
when setting more log messages into code, i found that game crashed in CvUnitAI::AI_update method
which is called at line 203 in CvSelectionGroupAI::AI_update
here is code with my debug messages (from CvSelectionGroupAI.cpp):
Spoiler :

// else pick AI action
else
{
pHeadUnit = getHeadUnit();

if (pHeadUnit == NULL)
{
break;
}
gDLL->logMsg("SDK.log","selgroupAI::AI_Update before resetPath");
resetPath();
gDLL->logMsg("SDK.log","selgroupAI::AI_Update after resetPath, before pHeadUnit->AI_update()");
if (pHeadUnit->AI_update())
{
gDLL->logMsg("SDK.log","selgroupAI::AI_Update after true pHeadUnit->AI_update()");
// AI_update returns true when we should abort the loop and wait until next slice
break;
}
gDLL->logMsg("SDK.log","selgroupAI::AI_Update after false pHeadUnit->AI_update()");
}

when crash occurred, game never pass pHeadUnit->AI_update()
last message in log file is: selgroupAI::AI_Update after resetPath, before pHeadUnit->AI_update()

i hope this will help you find a problem
meanwhile i start debugging CvUnitAI::AI_update(), if i found something new, i will update this post

EDIT2:
more tests in AI_update pointed to AI_exploreMove()

EDIT3:
AI_exploreMove -> AI_travelToUpgradeCity() , there never pass through getPathEndTurnPlot() function

EDIT4, last:
getPathEndTurnPlot generate CTD, because there is no path generated! (pNode is NULL inside this function)

problem is in AI_travelToUpgradeCity()
Code:
		// can we path to the upgrade city?
		int iUpgradeCityPathTurns;
[B]		bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);[/B]
		CvPlot* pThisTurnPlot = getPathEndTurnPlot();

		// if we close to upgrade city, head there 
		if (bCanPathToUpgradeCity && (pClosestCity == pUpgradeCity || iUpgradeCityPathTurns < 4))
		{
			getGroup()->pushMission(MISSION_MOVE_TO, pThisTurnPlot->getX_INLINE(), pThisTurnPlot->getY_INLINE());
			return true;
		}

in my game, generatePath return false, because there is no route to own city - exploring unit (in my case it is warrior) is somewhere in land, but there is other civ which is blocked his way to home

suggested solution:
Code:
		// can we path to the upgrade city?
		int iUpgradeCityPathTurns;
		bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
//		CvPlot* pThisTurnPlot = getPathEndTurnPlot(); //old code
		// New code
[I]		CvPlot* pThisTurnPlot;
		if(bCanPathToUpgradeCity)
		{
			pThisTurnPlot = getPathEndTurnPlot();
		}
[/I]		// end of new code
		// if we close to upgrade city, head there


(heh..it look like my previous bug is not linked to this one :) - i will try fix this and then re-run assert code to check this assert)

ok, when fixed this as descrbed above, game running fine (pass through this problematic point), now i will recompile with assert support and re-run to check assert message from start
Mexico
 
What do you mean you cannot play? Just because the assert is flagged up does not mean the bug is having a significant effect..

The timer just spins and spins and the game won't continue. I think that is a pretty significant effect.
 
The timer just spins and spins and the game won't continue. I think that is a pretty significant effect.

When I've had that happen with the Asserts build its usually meant that I just have to alt-tab out of the game and 'ignore' that Assert. For some reason the pop-up isnt appearing 'in game' but it hasnt been a problem to continue the game after dismissing the Assert.
 
Build 1/30

Assert Failed

File: .\CvTeam.cpp
Line: 963
Expression: (isHuman() || isMinorCiv() || GET_TEAM(eTeam).isMinorCiv() || isBarbarian() || GET_TEAM(eTeam).isBarbarian() || AI_isSneakAttackReady(eTeam) || (GET_TEAM(eTeam).getAtWarCount(true) > 0) || !(GC.getGameINLINE().isFinalInitialized()) || gDLL->GetWorldBuilderMode() || getVassalCount() > 0 || isAVassal() || GET_TEAM(eTeam).getVassalCount() > 0 || GET_TEAM(eTeam).isAVassal() || getDefensivePactCount() > 0)
Message: Possibly accidental AI war!!!

----------------------------------------------------------

Action: Just bribe Mehmet to declare war on Catherina.
 

Attachments

Build 1/30

File: .\CvCityAI.cpp
Line: 5409
Expression: false
Message: infinite loop(!!!!!)

Just hit enter. I suspect it has to do with the Greek AI choosing what to build in Machu Picchu (sp), which it just took from me (in a move it never would have made in vanilla - nice work!)

http://forums.civfanatics.com/uploa...0700_CiyAI.cpp_Assert_failure.CivWarlordsSave

Edit: And the same thing after ending turn in this game, although without the same city conditions (that the player can see, anyway) - could be something different altogether:
http://forums.civfanatics.com/uploads/68411/AutoSave_AD-0425.CivWarlordsSave
 
EDIT4, last:
getPathEndTurnPlot generate CTD, because there is no path generated! (pNode is NULL inside this function)

problem is in AI_travelToUpgradeCity()
Code:
		// can we path to the upgrade city?
		int iUpgradeCityPathTurns;
[B]		bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);[/B]
		CvPlot* pThisTurnPlot = getPathEndTurnPlot();

		// if we close to upgrade city, head there 
		if (bCanPathToUpgradeCity && (pClosestCity == pUpgradeCity || iUpgradeCityPathTurns < 4))
		{
			getGroup()->pushMission(MISSION_MOVE_TO, pThisTurnPlot->getX_INLINE(), pThisTurnPlot->getY_INLINE());
			return true;
		}

in my game, generatePath return false, because there is no route to own city - exploring unit (in my case it is warrior) is somewhere in land, but there is other civ which is blocked his way to home

suggested solution:
Code:
		// can we path to the upgrade city?
		int iUpgradeCityPathTurns;
		bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
//		CvPlot* pThisTurnPlot = getPathEndTurnPlot(); //old code
		// New code
[I]		CvPlot* pThisTurnPlot;
		if(bCanPathToUpgradeCity)
		{
			pThisTurnPlot = getPathEndTurnPlot();
		}
[/I]		// end of new code
		// if we close to upgrade city, head there

I confirm this.
This error occurs in Revision 339 (Latest at this time).

Matze
 
Assert Failed

File: .\CvPlayer.cpp
Line: 7365
Expression: getNumOutsideUnits() >= 0
Message:

----------------------------------------------------------

Build 07-01-30. Save attached. Call up Washington, ask for Capitulation and Facism. Freaks at that point.
 
Assert Failed

File: .\CvGlobals.cpp
Line: 2743
Expression: strcmp(szType, "NONE")==0
Message: info type EFFECT_WEAPON_IRONCLAD_CANNON_01, not found, Current XML file is: Misc/Civ4TutorialInfos.xml

----------------------------------------------------------

Got this when my Battleship attacked an Ironclad. I'd post a save, but I made many moves on this turn before this happened. Doubt I can duplicate, unless it happens every time somebody attacks an Ironclad. (In that case, a save shouldn't be needed.)
 
not sure if this one been reported yet:
Assert Failed

File: CvPlot.cpp
Line: XXXX - not same as your lines
Expression: getCulture(eIndex) >= 0
Message:

----------------------------------------------------------
 
I found the following thread rather interesting for those with the desire to squash the OOS problems for Multiplayer games with the BetterAI update.

http://forums.civfanatics.com/showthread.php?t=188460&highlight=Enable+synchronization+logging

Blake had mentioned setting "Logging Enabled" and "RandLog" to be on, but it looks like turning on "SynchLog" will also help.

I am going to see if I can debug these problems since the OOS errors have happened frequently, beginning with the 12/21 build.
 
Not sure if this is Better AI bug or bug that was always there. I have a trade going with the Indians, spices for cash per turn. Mongols ask me to stop trading with them & I agree. Now in this same turn I want to declare war on the Indians but when I go to contact them the only thing it says is Farewell. So I can't go into the typical "Lets Discuss Something Else" where I normally declare war. The only way I can declare war is invade their territory or attack one of their guys.
 
Not sure if this is Better AI bug or bug that was always there. I have a trade going with the Indians, spices for cash per turn. Mongols ask me to stop trading with them & I agree. Now in this same turn I want to declare war on the Indians but when I go to contact them the only thing it says is Farewell. So I can't go into the typical "Lets Discuss Something Else" where I normally declare war. The only way I can declare war is invade their territory or attack one of their guys.

press "Alt" and click on the Leader's name in the Score board and you have declared war ;)
 
@Chris Withers

That's part of standard Civ4 AFAIK. The Indians are refusing to talk to you because you stopped trading with them (when asked). I don't think there's anything you can do until you are back on talking terms.
 
1/30 build, with handicap XML, fractal, Prince:

Assert Failed

File: .\CvTeamAI.cpp
Line: 3022
Expression: canDeclareWar((TeamTypes)iI)
Message:

Save attached -- end turn to trigger assert.

Another odd thing in this game: Huayna Capac has hardly expanded. He had only his capital for most of the game, and has only built one additional city since then. Although he has no Iron, he's chosen not to settle to the north of Cuzco to capture the iron there.
 
I am about halfway thru my 1st game with Better AI. Using the version from about 1/31 I think. No problems that I can tell, no crashes. AI seems to be playing a bit better vs non-better AI. Nothing massively jumping out as odd.

Playing Monarch, Warlords, Pangea, Normal map with one additional Civ added, Low water level, I am Louis XIV. Also playing Fast/Quick game. These are all about my typical settings. I am not using that extra mod file that lowers the AI bonuses (I think that's what that other optional file does).

So overall a successful test so far and a funner game. It's a bit harder for me to win, which is good; now I don't have to go to the ridiculous Emperor bonuses to get a competitive game. Keep up the good work!
 
My bug report (version from 1/31 with handicaps)
 

Attachments

  • Blaukaiser II n. Chr.-0580.CivWarlordsSave
    Blaukaiser II n. Chr.-0580.CivWarlordsSave
    153.3 KB · Views: 207
  • nC 0580.jpg
    nC 0580.jpg
    36.1 KB · Views: 230
Build 1/30

File: .\CvCityAI.cpp
Line: 5409
Expression: false
Message: infinite loop(!!!!!)

Just hit enter. I suspect it has to do with the Greek AI choosing what to build in Machu Picchu (sp), which it just took from me (in a move it never would have made in vanilla - nice work!)

http://forums.civfanatics.com/uploa...0700_CiyAI.cpp_Assert_failure.CivWarlordsSave

Edit: And the same thing after ending turn in this game, although without the same city conditions (that the player can see, anyway) - could be something different altogether:
http://forums.civfanatics.com/uploads/68411/AutoSave_AD-0425.CivWarlordsSave

This seems to be essentially the same bug. It happens after Cyrus takes the barbarian city of Chinook. It would make sense that something happened while Cyrus was determining what to build next. Just load this save: and hit “end turn” to trigger the assert. The text of the assert is as follows:

Assert Failed

File: .\CvCityAI.cpp
Line: 5409
Expression: false
Message: infinite loop(!!!!!)
 

Attachments

CivIV Warlords with 2.08

Build 1/30

Assert Failed

File: .\CvUnit.cpp
Line: 8566
Expression: getCombatUnit() != NULL
Message: getCombatUnit() is not expected to be equal with NULL

----------------------------------------------------------

I was playing on Chieftain and I tried to unload troops from a Galleon onto a land square with a barbarian worker. I received the msg that I had captured the worker, following by the msg my Macemen killed the worker, and then the game locked up with the troops showing but still on the ship.
 
I did some more testing with Mulitplayer and the OOS errors using Better AI 1/30. I attached the autosave from the turn before along with all of the logs. I finally got a MPLog file after turning on Sync logging in the INI file. An excerpt from it is below. Maybe it will be of use to someone.

Scout(Bolt Jenkins)[980]: AI_explorePlotValue (68, 16) using cache-> 0
Scout(Bolt Jenkins)[980]: AI_explorePlotValue (69, 15) using cache-> 0
Scout(Bolt Jenkins)[980]: AI_explorePlotValue (69, 14) using cache-> 0
Scout(Bolt Jenkins)[980]: AI_exploreRange MISSION TO-> (68, 16)

***** OUT OF SYNC! MY SYNC SEED = -653456736 : MY OPTIONS SEED = 26760276 *****

Rand = -1441652362 on 982 (Religion Spread)
Rand = -953261193 on 982 (Religion Spread)
Rand = 370723812 on 982 (Religion Spread)
Rand = -1928955827 on 982 (Religion Spread)

If I had to venture a guess, the bug is with some of the fogbusting code changes that were made about 3 weeks ago.
 

Attachments

Back
Top Bottom