Specific Bug Reports

Warlords 2.08

Build 1.30

Assert Failed

File: .\CvTeamAI.cpp
Line: 400
Expression: isHasMet((TeamTypes)iI)
Message:

I was moving my units, one space at a time, toward the north and after a number of moves, the game locked up.
 
Assert Failed

File: .\CvTeam.cpp
Line: 986
Expression: !(AI_isSneakAttackPreparing(eTeam))
Message:

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

Save attached. When China asks for Rifling, deny. He declares at that point and that's when the assert comes.
 
I fired up Warlords' Barbarians scenario. I bought my units and moved the entire group one tile and got the following:

Assert Failed

File: .\CvTeamAI.cpp
Line: 400
Expression: isHasMet((TeamTypes)iI)
Message:

I don't understand. This is the third time I tried to play and each time the assert is triggered sooner than the last time. Maybe the BetterAI is not meant to work with the scenarios. I also loaded my autosave, the one I attached, and could not duplicate the assert.
 

Attachments

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.)

This is an XML bug in firaxis xml. I would love it if some XML junkie could take a look at report the exact fix in this firaxis bug report.

-Iustus
 
I tried to start the Omens scenario and this is what happened while trying to load the game:

Assert Failed

File: .\CvCity.cpp
Line: 472
Expression: (0 < GC.getNumProjectInfos())
Message: GC.getNumProjectInfos() is not greater than zero but an array is being allocated in CvCity::reset

Now I will not try any more scenarios.
 
Here's a save which (hopefully) will help with a crash to desktop problem I've been having. The game is a build I've made in codeblocks of BetterAI (only); sorry I forget the revision number, 336 or 339 maybe.

The game crashes on hitting end turn.

I started this game purely in the hope it would crash so I have messed around in the worldbuilder, adding cities and units to stop the AI pestering me (I don't believe that should effect things).
 

Attachments

Assert occurred during AI move:

Assert Failed

File: .\CvTeam.cpp
Line: 1563
Expression: !(AI_isSneakAttackPreparing((TeamTypes)iI))
Message:

----------------------------------------------------------
 
Code:
cvplayer.cpp :
line xxxxx(modpack codeline is different)

    FAssertMsg(getUnitClassCount(eIndex) <= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances(), "getUnitClassCount is expected to be less than maximum bound of MaxPlayerInstances (invalid index)");

I'd love to hear some feedback if this is because of some XML got screwed up or maybe because we have just too many UU's in our mod
 
Code:
cvplayer.cpp :
line xxxxx(modpack codeline is different)

    FAssertMsg(getUnitClassCount(eIndex) <= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances(), "getUnitClassCount is expected to be less than maximum bound of MaxPlayerInstances (invalid index)");

I'd love to hear some feedback if this is because of some XML got screwed up or maybe because we have just too many UU's in our mod

That is for this function:
Code:
CvPlayer::isUnitClassMaxedOut(UnitClassTypes eIndex, int iExtra)

So the question is, do you know which unit you were getting this error for? Is it possible it is just your save that is corrupted? Did you place in worldbuilder more units than are allowed for that class? Perhaps you have a bug in your XML setting a limit for a unit class when you did not intend one.

You want to look in Civ4UnitClassInfos.xml.

It would be pretty easy to log which unitclass ID is triggering this error, to direct your search.

something like this:
Code:
if (GC.getLogging())
{
	TCHAR szOut[1024];
	sprintf(szOut, "unit class %S.\n", GC.getUnitClassInfo(eIndex).getDescription.getCString());
	gDLL->messageControlLog(szOut);
}

-Iustus
 
HI Iustus, thank you for your always wonderfull explanations!

I implement that code immediatly for the logging, it wasn't me who got that error but one of my teammembers, I already figured he might have added units through the worldbuilder..anyway, with logging it will be very easy to check on the unit causing this.

thank you for your always fast and very informative solutions to solve the riddle.
 
got this:

Assert Failed

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


then i put "ignore" like usual, and then i got this:

Assert Failed

File: .\CvGlobals.cpp
Line: 1897
Expression: eTechNum > -1
Message:

and after hitting "ignore" again zone alarm warned me:

Sid Maier's Civ is trying to launch
c:\WINDOWS\system32\dwwin.exe

and didn't matter what i do Civ4 crashes then.


good luck!
 
Do you play with the 1/30 build? As I understand this "eTechNum > -1" was a bug in former builds if you researched future technology.
 
Assert Failed

File: .\CvArtFileMgr.cpp
Line: 174
Expression: false
Message: get##name##ArtInfo: OVERLAY_ACTION_FORTIFY was not found

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

http://forums.civfanatics.com/uploads/23357/Montezuma_AD-1065.CivWarlordsSave

Action: end of turn, appears when barracks built and prompting for next build. Hit "Examine City"

If ignored, city view does not appear correctly.

Mods: Better AI, Balancer for Better AI, Look and Feel, Bad Ronald's flags.

Note--only started today, and happening frequently. I may have messed up something.
 
Iustus:
Saw your post here about the EFA Related bug. http://forums.civfanatics.com/showpost.php?p=5046142&postcount=116

This is on Vanilla Civ IV patched to 1.61
I am using the latest version of BetterAI, the 01/30/2007 build.
I am using ruff_hi's Cobbled ModPack which contains the EFA among other things. The thread for that mod is here:
http://forums.civfanatics.com/showthread.php?t=168783

After installing ruff's mod I got the crash and assert mentioned in the post above when using the EFA. I believe I had clicked on info and that invoked the crash and assert.
Anyways, I found the above post and I added the code you mentioned (to check for No Relgion) to my CvExoticForiegnAdvisor.py file.
After doing so when the game fires off, I have absolutely no interface. None at all.
If I go back into the .py file and comment out that line I get my interface back, BUT I get assert errors that are different than the codes that led you to this bug in the first place.
I have attached a screen shot of the assert and the game without interface.

Please note that I get this assert 2 times. The only difference between them is the line number. The second one calls out Line 3909.
Also these assert error screens will keep popping forever until I click Ignore Always.
After that the game seems to load fine, but I haven't spent any time playing with it after it loads.
I did however do this. After closing the assert error screens by clicking Ignore Always, I went into the game and brought up the options for ruff's mod. I then disabled the EFA, and closed the game.
When I restarted the game I still got the 2 assert errors. :dunno:

I am going to post in ruff_hi's thread and point him to this post, because I have no idea whose code is the culprit. :p
Seems like these 2 children do not like playing with each other. :lol:

I did some more troubleshooting and it looks like the problem is with ruff's cobbled modpack.
I totally removed it by deleting the CustomAssets folder and putting the BetterAI dll file in the original CustomAssets (after renaming it back).
No assert errors.

Might want to forward on to ruff_hi the following info, do not call AI_getAttitude on yourself:

3895: AI_getAttitude (which always calls the second one)
3909: AI_getAttitudeVal

That is the cause of this assert. Somewhere in his python code, he is looping over every player, and calling AI_getAttitude, well dont call it on yourself!

-Iustus

(note, edited to use vanilla line numbers)
 
Assert Failed

File: .\CvPlayer.cpp
Line: 2668
Expression: getNumSelectionGroups() <= getNumUnits()
Message: The number of Units is expected not to exceed the number of Selection Groups

----------------------------------------------------------
using 1/16 build

Load up the newest game and hit enter. These saved games are 2 player multiplayer game.

This should already be fixed in the 1/30 build.

-Iustus
 
"infinite loop(!!!!!)" in CvCityAI.cpp, line 5409 is back, you do not have to report that one, we will get it solved in the next build. It is harmless.

-Iustus

LOL, define "harmless"? sinceI cannot seem to play the game due to this bug I would not define it as harmless

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.

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.

Did this solve your problem?

If you are seeing the window pop up that says "Infinite loop!!!!", that means that it has already detected the loop, and dropped out of it. There is no way for that specific bug to cause it to spin forever. If you are spinning forever (and you do not have the assert window up somewhere) then this is a different bug, and I would like a save.

If you alt-tab out of the game, and there are two civ 'windows' displayed on your taskbar, one of them is probably the assert window. You will want to tab to that one, click ignore always, and then wait for the computer to finish its turn. This bug will cause the AI to take longer to complete its turn, so you just may not be waiting long enough.

-Iustus
 
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

I could not duplicate this. If you download your save, can you get it to happen again?

-Iustus
 
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.

This one turns out to just be a bit too liberal on asserting here. Since this assert was added by Firaxis, I am reluctant to remove it. You should only get it when someone is bribed into a war they did not wish to start. I will add a fix in the next build, but this one should be totally harmless.

-Iustus
 
Back
Top Bottom