Specific Bug Reports

I don't know Iustus whether you know this assert yet:




Placing a spy unit through worldbuilder into fogged ai cities and then looking at the spy always give this assert

You can check this in this save but i think it's common.

Emphasis is mine.

When you worldbuilder in more than the legal number of units (ie more than 3 spies) it triggers that assert. I don't view it as a bug in any way, just always ignore it (if indeed you get the state via worldbuilder meddling).
 
Pshaw. That's not that close. Wasn't enough to hamper development of either city.

But hampered their expansion possibilities. (they have 2 cities in midgame)
Starting points might have been better distributed.
 
Emphasis is mine.

When you worldbuilder in more than the legal number of units (ie more than 3 spies) it triggers that assert. I don't view it as a bug in any way, just always ignore it (if indeed you get the state via worldbuilder meddling).

Quite logical.
Was really stupid not to think about that :)
 
But hampered their expansion possibilities. (they have 2 cities in midgame)
Starting points might have been better distributed.

Dunno...looked like Rome hampered them both more than each other... :goodjob:
 
New build 1/29 is out. Please verify with your own save that it fixes your problem. (Note that the war count issue is already saved into your save, so that one will require peace to solve. -- you could go into worldbuilder, and force peace then force war to fix it, just be sure to declare with the same aggressor to be 'fair').

-Iustus
 
Iustus, i have just a question about c++, if you have just brackets inside a function
like:
void CvCityAI::AI_BestPLotBuild(xxxxx)
{
code
if
{
code
}
{

}
}
how does the compiler handle that? like the last { } don't exist i assume?
-----------------------------------------------------------
happens here:
//clear jungle
//if (eBestBuild == NO_BUILD)
{
if (pPlot->getFeatureType() != NO_FEATURE)
{
-----------------------------------------------------------
I guess it's no bug anyway, since i expect a decend compiler to just look
away like these obsolete {} don't exist, but if it's treated different, you might have a look on that code
 
Brackets like that can be used for scope - any variables declared inside the brackets will be restricted to that scope (and there are other uses for such scope such as profiling). It can also be used to organize code (it indicates all the code inside the brackets would be something that might deserve an if to make it situational). It's somewhere between harmless and useful.
 
ASsert from the 1/29 build (small map, 9 civs, techtonics, noble)

Assert Failed

File: .\CvUnitAI.cpp
Line: 10141
Expression: pBombardCity != NULL
Message:

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

Attached is most recent autosave file. This happened during AI movement. After hitting "ignore once" on the assert window, the game crashed to the desktop.
 
ASsert from the 1/29 build (small map, 9 civs, techtonics, noble)

Assert Failed

File: .\CvUnitAI.cpp
Line: 10141
Expression: pBombardCity != NULL
Message:

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

Attached is most recent autosave file. This happened during AI movement. After hitting "ignore once" on the assert window, the game crashed to the desktop.

Ugh, this is a nasty bug (and a new one that I just introduced).

Expect a build in the next couple days to fix this one, and thanks for the report. Until then, you might want to avoid maps that have a lot of water, as assault stacks with units that can bombard are going to be very likely to cause this crash.

-Iustus
 
Assert Failed

File: .\CvPlayer.cpp
Line: 6410
Expression: eReligion != NO_RELIGION
Message: Religion is not assigned a valid value

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


Assert Failed

File: .\CvGame.cpp
Line: 6366
Expression: eIndex >= 0
Message: eIndex is expected to be non-negative (invalid Index)

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

These two asserts followed eachother. They might not have anything to do with the BetterAI mod. I have combined some other mods with the betterAI mod and they change other files . The asserts occured when I entered the Info tab of the Foreign Advisor and the Foreign Advisor is from the Exotic Foreign Advisor.

You can download the mod that I use here:

http://forums.civfanatics.com/uploads/31106/BetterAI.zip

And here is the savegame:

http://forums.civfanatics.com/uploads/31106/Roland_Johansen_BC-1270.CivWarlordsSave

In order to reproduce the problem, enter the foreign advisor and click the info tab.

My guess is that this version of the foreign advisor tries to get religion data which isn't available for one civ as it doesn't have a religion yet.
 
First assert I've noticed since using the Better AI.... (EDIT: Using 1/25 build)

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

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


Situation was:

Ramses (by far the strongest civ in the world) and his two vassals declared war on me (Ragnar) and my two vassals. His first action of the war was to attack one of my galleons with one of his ironclads; that's when the assert happened.

Uploaded the most recent save file. [EDIT: The war takes place in 1957, the turn after the save point.]

This is actually a Firaxis bug in their XML. (I guess no one has caught it yet). Any XML junkies able to track down the actual line in the XML code that is wrong? I will be making a post on the bug reports forum.

This is a link to my post in the bug reports forum, if someone can follow up with the line of the XML file that has the error.

-Iustus
 
Ugh, this is a nasty bug (and a new one that I just introduced).

Expect a build in the next couple days to fix this one, and thanks for the report. Until then, you might want to avoid maps that have a lot of water, as assault stacks with units that can bombard are going to be very likely to cause this crash.

-Iustus

Ouch. Is this playable from the save point, or is the game more or less trashed until the next build?
 
Ouch. Is this playable from the save point, or is the game more or less trashed until the next build?

Maybe you can take off the dll 2 turns or os before this crash and put again the next turn?

But without the dll their actions may change anyway..
 
Ouch. Is this playable from the save point, or is the game more or less trashed until the next build?

Maybe you can take off the dll 2 turns or os before this crash and put again the next turn?

But without the dll their actions may change anyway..

Yes, you can take out the DLL (or use the 1/25 DLL) for the turns where it is bombarding with ships.

I am shooting for getting a build out today to fix this.

-Iustus
 
Assert Failed

File: .\CvPlayer.cpp
Line: 6410
Expression: eReligion != NO_RELIGION
Message: Religion is not assigned a valid value

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

Assert Failed

File: .\CvGame.cpp
Line: 6366
Expression: eIndex >= 0
Message: eIndex is expected to be non-negative (invalid Index)

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


These are both called when the python Foreign Advisor is asking whether a player has the holy city for 'NO_RELIGION' (value is -1). This looks like a bug in the EFA. The first assert is the catch in hasHolyCity on the NO_RELIGION, the second is an internal call, where it uses that index into an array. This will cause a crash even without BetterAI.

Have people reported crashing with the EFA? This should be easy to fix.

This is lines 331-334 of the CvExoticForeignAdvisor.py:
Code:
if (gc.getPlayer(iLoopPlayer).hasHolyCity (nPlayerReligion)):
	szPlayerReligion = u"%c" %(objReligion.getHolyCityChar())
elif objReligion:
	szPlayerReligion = u"%c" %(objReligion.getChar())

You need to add a check for no religion:
Code:
if (nPlayerReligion != -1): # -1 == NO_RELIGON
	if (gc.getPlayer(iLoopPlayer).hasHolyCity (nPlayerReligion)):
		szPlayerReligion = u"%c" %(objReligion.getHolyCityChar())
	elif objReligion:
		szPlayerReligion = u"%c" %(objReligion.getChar())

This fixes the assert and crash. I posted this over on the EFA thread as well, but I do not know if anyone is still maintaining that component.

-Iustus
 
A couple of games completed (1/29) and

NO ASSERTS FAILED !!!
 
These are both called when the python Foreign Advisor is asking whether a player has the holy city for 'NO_RELIGION' (value is -1). This looks like a bug in the EFA. The first assert is the catch in hasHolyCity on the NO_RELIGION, the second is an internal call, where it uses that index into an array. This will cause a crash even without BetterAI.

Have people reported crashing with the EFA? This should be easy to fix.

This is lines 331-334 of the CvExoticForeignAdvisor.py:
Code:
if (gc.getPlayer(iLoopPlayer).hasHolyCity (nPlayerReligion)):
	szPlayerReligion = u"%c" %(objReligion.getHolyCityChar())
elif objReligion:
	szPlayerReligion = u"%c" %(objReligion.getChar())

You need to add a check for no religion:
Code:
if (nPlayerReligion != -1): # -1 == NO_RELIGON
	if (gc.getPlayer(iLoopPlayer).hasHolyCity (nPlayerReligion)):
		szPlayerReligion = u"%c" %(objReligion.getHolyCityChar())
	elif objReligion:
		szPlayerReligion = u"%c" %(objReligion.getChar())

This fixes the assert and crash. I posted this over on the EFA thread as well, but I do not know if anyone is still maintaining that component.

-Iustus

Thanks, Iustus for fixing a bug that wasn't even yours. While I have no programming background, I could still understand what went wrong after your explanation. I added the line and now I don't get the assert anymore. Thanks! :goodjob:

I also saw your post in the Exotic Foreign Advisor thread. It hasn't been updated for quite some time. Someone else created a Warlords version (post 165 in that thread) and it could be that the bug only exists in the Warlords version. But it's more probable that the bug was just copied from the vanilla version. I'm using the Warlords version.

The modcomponent is also used in the well known 'Hall of Fame mod'. I have no idea if they fixed it when they integrated the modcomponent in their mod.

I've used this mod for quite some time and have never experienced a crash. So the bug might not be too harmful.
 
Back
Top Bottom