View Full Version : Specific Bug Reports


Pages : [1] 2 3

Iustus
Jan 25, 2007, 04:19 PM
The purpose of this thread is to make specific and detailed bug reports.

Please do use this thread to report specific bugs in Better AI. Crashes, asserts, working the wrong plot, and other real mistakes should be reported here.

Please do not use this thread to make comments about questionable AI behavior. If you are not sure if it is a bug or intended behavior, report it in the questionable behavior thread (http://forums.civfanatics.com/showthread.php?t=204048).

Please do include save game files and pictures here. If you cannot include a save game file or a picture, then please reconsider whether your post belongs here or in a different thread. You want the save before the bug occurs, if possible.

Before uploading a save, please load that save yourself, and make sure you can repeat the bug. If you are uploading an autosave, it would be helpful if you first redo your actions, then do a save, so all we have to do is end turn to get the error (unless it is some specific action you take that causes the error, in that case, do a save prior to that action).

Often it is helpful to have a save a turn before, or even several turns before. Rather than guessing, post the save the turn that causes the problem you see, but make a copy of your autosave folder, so you have an archive of all your autosaves from the game you post. That way, if we ask for an earlier save, you still have it.

Thanks,

-Iustus

Iustus
Jan 25, 2007, 04:27 PM
this is a sample bug report, please try to follow this format

Version: 1/16/07 build

Clicking emphasize hammers causes a crash to desktop without an error message.

http://forums.civfanatics.com/uploads/95686/examplepic.jpg

In order to reproduce the problem, turn on the auto governor, then click the emphasize hammers button.

Enclosed is the save game file.

Iustus
Jan 25, 2007, 04:27 PM
--- reserved ---

Iustus
Jan 25, 2007, 08:25 PM
Assert Failed

File: .\CvPlot.cpp
Line: 1694
Expression: visiblePlotRegion.size() == oldVisibilityValues.size()
Message:

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


OK I got the Assert recreated.
From the game save move the warrior 2 spaces south east and then 1 south west and the infinite loop should happen. The only other action I did after restarting the game was to click on the grid, the resources for each square button, and the score button.

I was unable to duplicate this bug. I tried both the direction you described:
http://forums.civfanatics.com/uploads/95686/southeastfirst.jpg

And reversing east and west from what you said, which would explore more territory and might be what you meant:
http://forums.civfanatics.com/uploads/95686/southwestfirst.jpg

Which tech do you pick at the beginning of your save?

Could you post a screenshot of where you end up at the end of the moves?

I could not duplicate the assert with either the 1/16 build or the 1/25 build.

-Iustus

glokkonn
Jan 25, 2007, 10:38 PM
As per the other thread, pick Polytheism and go 3SW and 1SE.

In the brand new build the problem went away.

Nicely done fixing my bug before I even posted it :)

glokkonn
Jan 26, 2007, 12:51 AM
Different Game Bug:

I was just playing along and clicked I think to go into a city. I got just a black screen. Nothing I could do except turn the computer off and on. The sequence of events was:

Play game, get black screen of death.
Restart from lastest save to try and recreate it.
Did not get black screen of death where I had it before.
Get black screen of death in 4 or 5 more turns.

Enclosed are the 2 save games before each of the crashes.
I was building military units mostly, along with quite a few religious buildings. My workers mostly built roads along with a few tile upgrades.

In the second game I switched to Beaucracy once the research for Civil Service was completed. Though I doubt this had anything to do with the bug as it happened after the first crash and right before the second one.

I will be out of town this weekend, so I'll check back in Monday evening and if nothing has been found I'll see what I can do about recreating this problem.

Wodan
Jan 26, 2007, 08:26 AM
Version: 1/25/07 build, Asserts

Assert Failed

File: .\CvTeam.cpp
Line: 1612
Expression: iCount >= getAtWarCount(bIgnoreMinors)
Message:

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

To replicate, just end the turn.

Enclosed is the save game file.

ps I've gotten this Assert with the last build, 1/18 I think it was, but didn't report it because my computer locked, and then I saw the new build. So I tried with the new one in case it was fixed. But, I immediately got it the error with the 1/25 build.

Iustus
Jan 26, 2007, 08:59 AM
As per the other thread, pick Polytheism and go 3SW and 1SE.

In the brand new build the problem went away.

Nicely done fixing my bug before I even posted it :)

Actually, the bug was not fixed, just the checks were removed. This bug will be fixed in the next build thanks to your report. Thank you.

-Iustus

cymru_man
Jan 26, 2007, 09:10 AM
Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

I have attached a save game - move the chariot southeast and end turn, you should get the infinite loop. This is the newest build (25 Jan).

I made a new thread and attached the save there, apparently you cannot attach the same file to more than one post (or I don't know how) here is a link to the thread (http://forums.civfanatics.com/showthread.php?t=204177)

marioflag
Jan 26, 2007, 10:02 AM
Same as cymru man
Better AI 07-01-25
Assert Failed

File:.\CvCity.cpp
Line:5374
Expression: false
Message: infinite loop

My specs:
AMD 3500+
ATI X800XT CATALYST 7.1
2GB RAM

http://forums.civfanatics.com/uploads/63726/AutoSave_a._C._-_0600.CivWarlordsSave

The crash happened just 2-3 turns after in 570 AC

Iustus
Jan 26, 2007, 10:13 AM
Version: 1/25/07 build, Asserts

Assert Failed

File: .\CvTeam.cpp
Line: 1612
Expression: iCount >= getAtWarCount(bIgnoreMinors)
Message:

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

To replicate, just end the turn.

Enclosed is the save game file.

ps I've gotten this Assert with the last build, 1/18 I think it was, but didn't report it because my computer locked, and then I saw the new build. So I tried with the new one in case it was fixed. But, I immediately got it the error with the 1/25 build.

This specific one looks like it was left over from the old bug, that is to say its fixed, but your save already was 'corrupted' by the bug.

The bug was caused when someone declared war on someone else, who was already the agressor in a war. In that case, the agressor would lose his warplan for his old war.

Try going back to the save before you declared war on Alexander. You will notice from your save, even before you end turn, if you turn on chipotle:
http://forums.civfanatics.com/uploads/95686/unplannedwar.jpg

There should never be an 'unplanned' war. This is the bug. If you have a save from before you declared on him, it is likely either a limited war or a total war. The bug caused by the 1/8 and 1/16 build changed it to an unplanned war, which the 1/25 build is correctly reporting is an error, but it did not cause it, it was caused prior to your save.

Please confirm this if you have an earlier save. If anyone else gets this assert, in a case where it is not left over from a previous save (it is easy to check a save under chipotle to see if its already broken, just look for an unplanned war), I want to know about it.

-Iustus

Wodan
Jan 26, 2007, 10:20 AM
Try going back to the save before you declared war on Alexander.
I'll give it a shot and let you know if I find anything. I'm just screwing around in this game anyway so it might be just as well to start a new game with the new build from the get-go. I usually trash all old games whenever I get an update but it's difficult with the frequent builds. :)

Wodan

marioflag
Jan 26, 2007, 12:50 PM
I have some qustions about this Assert version.Is it meant to be a beta for new content? Because strangely it seems to me a lot more unstable than previous versions of Better AI.

mshipton
Jan 26, 2007, 01:13 PM
Got an Assert Failed with 1/25 build. Have included save game and error message. Just end turn to reproduce.

Thanks.


Assert Failed
File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

Iustus
Jan 26, 2007, 01:15 PM
Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

I have attached a save game - move the chariot southeast and end turn, you should get the infinite loop. This is the newest build (25 Jan).

I made a new thread and attached the save there, apparently you cannot attach the same file to more than one post (or I don't know how) here is a link to the thread (http://forums.civfanatics.com/showthread.php?t=204177)

Same as cymru man
Better AI 07-01-25
Assert Failed

File:.\CvCity.cpp
Line:5374
Expression: false
Message: infinite loop

My specs:
AMD 3500+
ATI X800XT CATALYST 7.1
2GB RAM

http://forums.civfanatics.com/uploads/63726/AutoSave_a._C._-_0600.CivWarlordsSave

The crash happened just 2-3 turns after in 570 AC

I am looking into this issue. In the meantime, you can just click the "Ignore Always" button, with no serious harmful effects. (The autogovernor gets in a loop trying to choose between 3 plots, cycling between them, eventually giving up).

-Iustus

Iustus
Jan 26, 2007, 01:27 PM
I have some qustions about this Assert version.Is it meant to be a beta for new content? Because strangely it seems to me a lot more unstable than previous versions of Better AI.

No, it is intended to catch the last few bugs for our 1.0 release.

It depends on your definition of 'unstable'. If what you mean, as I suppose you do, is that you get a lot more messages than in the other builds, then you are correct.

But this is not the traditional definition of unstable.

The non-assert version is failing in exactly the same ways as the assert version, it just is not reporting it. Potentially it could be doing something very wrong, or it could be relatively minor.

For example, in the case of the governor 'infinite loop' assert, this is relatively harmless. It is something that we will fix, but it is not causing any real problem, the game will play fine with that bug, the governor is just having a hard time picking between two almost equal plots. It eventually does pick one.

On the other hand, in the case of that war plan bug, the war plans are getting corrupted either way. Prior to reporting it, it was happening but no one was noticing it. That could lead to quite a few problems.

There are some asserts that will fire when a crash is coming, but most are something much more subtle.

If you clicked "Ignore Always" every time an assert comes up, you would effectively be running the non-assert version. When you click ignore, it goes on to do what it would have done in the non-assert version.

This brings us to some terminology. Some people are refering to the assert window as a "crash". This is not using that word correctly. A "crash" is when the game halts completely, either 'crashing to desktop' meaning the game quits, but you can continue, or possibly causing your machine to restart. Some people refer to a 'hang' as a crash, which is somewhat acceptible. A 'hang' is when the machine locks up, you cannot do anything at all (sometimes ctrl-alt-del works, sometimes it doesnt).

Asserts are neither crashes or hangs. They are simply warnings that something doesnt seem quite right. Very often you can play the game fine past that point.

I hope this clears that up a bit.

-Iustus

marioflag
Jan 26, 2007, 01:45 PM
Thanks for the clarification.

Quagga
Jan 26, 2007, 09:22 PM
07-01-25 Build
Press Enter to see behavior

Assert Failed

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

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

The M'Hael
Jan 26, 2007, 10:26 PM
Another Assert

Assert Failed

File: .\CvPlayer.cpp
Line: 3101
Expression: iI != getID()
Message:

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


Just end the turn. Happens after Shaka finishes his turn. All I did that turn was change research from 90 to 80. Damn, it is too big... will be back with a link...

http://rapidshare.com/files/13577525/Napoleon_AD-1280.CivWarlordsSave.html

glokkonn
Jan 27, 2007, 04:42 AM
My computer is crashing (2 different games, with saves from the earlier game).

Screen goes black and all I can do is turn the machine off and on.

Any ideas?

I need to get the Asserts put back in, and also I will put in the cheat codes that you mentioned. Then I will monitor all these cheat code values and see if I can find anomolies.

Well when I get energetic.
Road trip for the weekend cancelled, so I should have time to work on this tomorrow or Sunday.

By the way I am VERY enthused about the new version you released :)
It is very awesome :)

Arlborn
Jan 27, 2007, 04:53 AM
My computer is crashing (2 different games, with saves from the earlier game).

Screen goes black and all I can do is turn the machine off and on.

Any ideas?

I need to get the Asserts put back in, and also I will put in the cheat codes that you mentioned. Then I will monitor all these cheat code values and see if I can find anomolies.

Well when I get energetic.
Road trip for the weekend cancelled, so I should have time to work on this tomorrow or Sunday.

By the way I am VERY enthused about the new version you released :)
It is very awesome :)

Not any kind of memory allocation error? And by the way, what is your memory ram?

Arlborn
Jan 27, 2007, 06:25 AM
Assert Failed

File: .\CvTeam.cpp
Line: 1612
Expression: iCount >= getAtWarCount(bIgnoreMinors)
Message:

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

In last version.
It was an old game, probably 2 versions behind when I played it. I just got the last save and pressed enter...

(was using Blake's handicap.)

Arlborn
Jan 27, 2007, 06:57 AM
25-1 version. My scout just got attacked by 2 babrbarian animals, killed them, then I pressed enter for next turn and this, again, gives an assert.

Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop





Save:

col
Jan 27, 2007, 10:34 AM
25-1 version. I'm not at war - but France and Korea are.

Assert Failed

File: .\CvTeamAI.cpp
Line: 1843
Expression: GET_TEAM(eWarTeam).isAlive()
Message: GET_TEAM(eWarTeam).isAlive is expected to be true

bolt144
Jan 27, 2007, 10:39 AM
Using the 1/25 build, my friend and I were playing against 6 AI's. At about the 8th turn into a new game (3760 BC), we got an OOS error. We played it as a mod and had deleted the DLL from the CustomAssets folder. All that we had going on were some scouts that were exploring the land. We were not doing anything special at the time. At so early of a point, there is not much one can do. I uploaded the autosaves (enabled for every turn) from the turn before "OOS 1 AutoSave_BC-3790" and the turn after "OOS 1 AutoSave_BC-3760" the OOS error.

We then tried a new game after that, but not playing it as a mod and playing it with the DLL in the CustomAssets folder. We got another OOS error but on the 7th turn this time at 3790 BC. I uploaded the autosaves from the turn before "OOS 2 AutoSave_BC-3820" and the turn after "OOS 2 AutoSave_BC-3790" the OOS error.

We then tried a new game after that (same parameters as before), using the 12/12 build and played for about 4 hours with no problems.

All games were played via DirectIP over the Internet.

In previous builds in January, we usually could get much further into a game like maybe around 600 AD, before we would see an OOS error. With the 1/25 build, this is by far the earliest we have seen it.

If Blake or Iustus or someone wants to try this with me via the Internet, send me a message and we can coordinate something. Maybe they can run the debug version on their system while playing me to see what really is going on.

Iustus
Jan 27, 2007, 11:32 AM
Different Game Bug:

I was just playing along and clicked I think to go into a city. I got just a black screen. Nothing I could do except turn the computer off and on. The sequence of events was:

Play game, get black screen of death.
Restart from lastest save to try and recreate it.
Did not get black screen of death where I had it before.
Get black screen of death in 4 or 5 more turns.

Enclosed are the 2 save games before each of the crashes.
I was building military units mostly, along with quite a few religious buildings. My workers mostly built roads along with a few tile upgrades.

In the second game I switched to Beaucracy once the research for Civil Service was completed. Though I doubt this had anything to do with the bug as it happened after the first crash and right before the second one.

I will be out of town this weekend, so I'll check back in Monday evening and if nothing has been found I'll see what I can do about recreating this problem.

I was unable to duplicate this one.

The save did help me track down the stack only partial attacks then gives up bug though, so it did some good :)

-Iustus

Iustus
Jan 27, 2007, 11:36 AM
I received the following assert:

Assert Failed

File: .\CvPlayer.cpp
Line: 3092
Expression: iI != getID()
Message:

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


(from the old BetterAI thread)

Thanks, this was just a case of an erroneous assert. Everything was ok, the assert was checking the wrong thing. I believe this one was a Firaxis assert, they made the typo ;)

fixed for next release


I kept the save game and reloaded it twice and could not reproduce the assert. So, my question for Iustus is, should I post asserts that occur that aren't reproducable? I have the save game for this if you want it but I don't want to waste your time or space on this board by attaching it if it isn't wanted.

Yes. Please report any asserts you see, reproducable or not.

-Iustus

Iustus
Jan 27, 2007, 12:05 PM
Assert Failed

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

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

Here the savegame, the error happens right after the tech message and crashes the game when you click ignore on the error message
146604

Edit: I had continued to play from a prior save and then noticed that the same Assert happens when Ecology is discovered by me later in the game, i.e. the link to future tech seems to be problematic.

Nansen

(from the old BetterAI thread)

Thanks, it will be fixed in the next release.

-Iustus

Iustus
Jan 27, 2007, 12:19 PM
Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

I have attached a save game - move the chariot southeast and end turn, you should get the infinite loop. This is the newest build (25 Jan).

I made a new thread and attached the save there, apparently you cannot attach the same file to more than one post (or I don't know how) here is a link to the thread (http://forums.civfanatics.com/showthread.php?t=204177)

Got an Assert Failed with 1/25 build. Have included save game and error message. Just end turn to reproduce.

Thanks.


Assert Failed
File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

Same as cymru man
Better AI 07-01-25
Assert Failed

File:.\CvCity.cpp
Line:5374
Expression: false
Message: infinite loop

My specs:
AMD 3500+
ATI X800XT CATALYST 7.1
2GB RAM

http://forums.civfanatics.com/uploads/63726/AutoSave_a._C._-_0600.CivWarlordsSave

The crash happened just 2-3 turns after in 570 AC

25-1 version. My scout just got attacked by 2 babrbarian animals, killed them, then I pressed enter for next turn and this, again, gives an assert.

Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop



These infinite loop asserts have been fixed for the next build. No need to report it if you get the assert on line 5374 of CvCityAI.cpp, "infinite loop".

In the meantime, you should be able to click "Ignore Always" with no harmful effect.

-Iustus

Iustus
Jan 27, 2007, 12:25 PM
Assert Failed

File: .\CvTeam.cpp
Line: 1612
Expression: iCount >= getAtWarCount(bIgnoreMinors)
Message:

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

In last version.
It was an old game, probably 2 versions behind when I played it. I just got the last save and pressed enter...

(was using Blake's handicap.)

As I reported in this post previously in this thread (http://forums.civfanatics.com/showpost.php?p=5029760&postcount=11), this is a case of corruption that was caused by the previous 1/8 or 1/16 build, which is carried over in your save file.

If you have chipotle on, you can alt over Genghis Khan and see that he has a unplanned war with Isabella. There should never be an unplanned war. The bug is in your save at the point you posted it.

Once that one war is over, all further wars should behave correctly.

If I am mistaken that you did not already have this bug in a save that was made with an earlier version, please let me know.

-Iustus

Arlborn
Jan 27, 2007, 12:37 PM
As I reported in this post previously in this thread (http://forums.civfanatics.com/showpost.php?p=5029760&postcount=11), this is a case of corruption that was caused by the previous 1/8 or 1/16 build, which is carried over in your save file.

If you have chipotle on, you can alt over Genghis Khan and see that he has a unplanned war with Isabella. There should never be an unplanned war. The bug is in your save at the point you posted it.

Once that one war is over, all further wars should behave correctly.

If I am mistaken that you did not already have this bug in a save that was made with an earlier version, please let me know.

-Iustus

I dont know if I had. Becuase that was a rather paused game for too long, then I decided to load it with the new version, clicked enter and got this hehe.
That is OK, I already was playing other.

Iustus
Jan 27, 2007, 12:37 PM
My computer is crashing (2 different games, with saves from the earlier game).

Screen goes black and all I can do is turn the machine off and on.

Any ideas?

I need to get the Asserts put back in, and also I will put in the cheat codes that you mentioned. Then I will monitor all these cheat code values and see if I can find anomolies.

Well when I get energetic.
Road trip for the weekend cancelled, so I should have time to work on this tomorrow or Sunday.

By the way I am VERY enthused about the new version you released :)
It is very awesome :)

If you take out BetterAI does it run fine?

Can you start a new game ok?

It sounds like perhaps you have some problem unrelated to BetterAI. Perhaps you have some bad RAM? Perhaps your video card has some bad VRAM? Or perhaps your video card is overheating?

-Iustus

Quagga
Jan 27, 2007, 01:03 PM
Better AI 07-01-25
Press Enter; Assert happens during French attack

Assert Failed

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

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

Iustus
Jan 27, 2007, 01:35 PM
07-01-25 Build
Press Enter to see behavior

Assert Failed

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

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

Do you have the save from one turn before this? Hannibal's Exploring Axeman "20" to the north of Hippo is outside his borders, and yet somehow his outside border count is zero.

I would like to see the save when that expolorer was inside the border, probably the previous turn or two.

This is not something that Blake or I has really changed, so this may actually be a bug in the regular 2.08 Warlords code.

-Iustus

darrelljs
Jan 27, 2007, 01:40 PM
File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

I have uploaded the last autosave I have, I will try and see what to do to get to this point from there and edit my post if I find out. My only action was to end a turn.

Darrell

The M'Hael
Jan 27, 2007, 02:08 PM
File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

I have uploaded the last autosave I have, I will try and see what to do to get to this point from there and edit my post if I find out. My only action was to end a turn.

Darrell

Iustus has already fixed this... Just so you know :P

Iustus
Jan 27, 2007, 02:18 PM
25-1 version. I'm not at war - but France and Korea are.

Assert Failed

File: .\CvTeamAI.cpp
Line: 1843
Expression: GET_TEAM(eWarTeam).isAlive()
Message: GET_TEAM(eWarTeam).isAlive is expected to be true

Do you happen to have the save from one turn prior to the one you posted?

-Iustus

icemanjsg
Jan 27, 2007, 02:19 PM
Assert Failed

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

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


I got this one it happens in 3 turns latter when Russia declare war on the Incans

when i press ignore all the game crashes

darrelljs
Jan 27, 2007, 04:15 PM
Iustus has already fixed this... Just so you know :P

Sweet! Has he fixed this one ? ;)

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

Darrell

mrgenie
Jan 27, 2007, 05:12 PM
Darrelljs, that looks to me like a XML problem, not a betterAI issue

Quagga
Jan 27, 2007, 06:26 PM
Do you have the save from one turn before this? Hannibal's Exploring Axeman "20" to the north of Hippo is outside his borders, and yet somehow his outside border count is zero.

I would like to see the save when that expolorer was inside the border, probably the previous turn or two.

I've attached the two turns prior. Don't know what one has to do to provoke the bug. I guess it has something to do with Hannibal, so the human's actions probably don't matter.

darrelljs
Jan 27, 2007, 06:33 PM
Here's another one:

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

This one happens luckily enought right off of an autosave, just load the attached and hit <enter>, then try to select a tech to research after the discovery pop-up.

Darrell

P.S. If you have any questions please PM me rather than replying in this thread, as I probably won't be reading it.

darrelljs
Jan 27, 2007, 06:36 PM
Darrelljs, that looks to me like a XML problem, not a betterAI issue


Hmm...could be I really don't know. The only mod I am using is better AI, but I am using the new handicaps. If I see it again I'll try to get a save.

Darrell

col
Jan 27, 2007, 06:45 PM
Do you happen to have the save from one turn prior to the one you posted?

-Iustus

I'll have a look - probably not.

update no - That was the turn before it occurred.

mrgenie
Jan 27, 2007, 07:06 PM
Hmm...could be I really don't know. The only mod I am using is better AI, but I am using the new handicaps. If I see it again I'll try to get a save.

Darrell

well i had this message you get, and out of index also some time later, because some XML tag was worng and so got initialized wrong by the SDK...fixing the xml solved that problem, do a TXT search for the missing TAG in your XML files...you might have some corrupted XML entry somewhere

mrgenie
Jan 27, 2007, 07:18 PM
Assert Failed

File: CvCityAI.cpp
Line: 10740
Expression: iHippyFactor >= 0
Message:

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

this is an error im getting, merged the code into the VISA mod though...but might still be just an error with that code? or maybe you know what i did wrong with the merging :)

Uncle_Joe
Jan 27, 2007, 07:21 PM
iHippyFactor

Now thats an amusing variable name. I'm guessing it has something to do with War Weariness? :)

mrgenie
Jan 27, 2007, 07:55 PM
Now thats an amusing variable name. I'm guessing it has something to do with War Weariness? :)

no, absolutely not, sorry :)

int iHippyFactor = ((GC.getFeatureInfo(pPlot->getFeatureType()).getHealthPercent() * -healthRate(false, 5)));
FAssert(iHippyFactor >= 0);

I think somewhere a bonus has a negative healthrate in the XML, multiplied with -=positive..that's causing the error..might just also be an XML error, but havent looked at it, because of something else im tracking, so maybe till i found it, Iustus already might have confirmed my assumptions or even found there is indeed a bug in the code

Iustus
Jan 27, 2007, 09:10 PM
Assert Failed

File: CvCityAI.cpp
Line: 10740
Expression: iHippyFactor >= 0
Message:

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

this is an error im getting, merged the code into the VISA mod though...but might still be just an error with that code? or maybe you know what i did wrong with the merging :)

no, absolutely not, sorry :)

int iHippyFactor = ((GC.getFeatureInfo(pPlot->getFeatureType()).getHealthPercent() * -healthRate(false, 5)));
FAssert(iHippyFactor >= 0);

I think somewhere a bonus has a negative healthrate in the XML, multiplied with -=positive..that's causing the error..might just also be an XML error, but havent looked at it, because of something else im tracking, so maybe till i found it, Iustus already might have confirmed my assumptions or even found there is indeed a bug in the code

Hmm, do jungles in ViSA give hammers like forests? Or are there some new jungle builds?

Anyway, added in some new checks, since you are somehow getting there with a jungle:

int iFeatureHealthPercent = GC.getFeatureInfo(pPlot->getFeatureType()).getHealthPercent();
if (iFeatureHealthPercent > 0)
{
int iHippyFactor = ((iFeatureHealthPercent * -healthRate(false, 5)));
iHippyFactor += (pPlot->isBeingWorked() ? 300 : 0);

iValue *= (400 - iHippyFactor);
iValue /= 400;
iValue = max(0, iValue);
}


That change is commited, if you just want to do an update.

-Iustus

Quagga
Jan 27, 2007, 09:35 PM
Build 07-01-25
Happened just as I learned Flight from the Internet, leaving only Future Tech.
The attached save is from the turn prior. I doubt that you have to do anything in particular to make the problem happen, but I haven't tried replaying.

EDIT: Went back to the game, Ingoring the Assert and got Crash to Desktop. Picked up again from this save. Gave Alex Fiber Optics and said Sorry to Hannibal. Got Assert again and CTD too. Going to run it from here with a previous build because I'm close-on to winning a Space Race. Alex could get a Domination or Diplomatic Victory first.

2nd EDIT: Took out the Better AI dll and ran until I selected Future Tech to research. Saved and put the dll back. Was able to play the game out. Alex came up 4 votes shy of a Diplo Victory just before I launched. I didn't think I had any chance to win this game, but the warring between the AIs, staying out of it, and going for the Internet are the factors that allowed my victory.


Assert Failed

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

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

Iustus
Jan 27, 2007, 11:06 PM
Build 07-01-25
Happened just as I learned Flight from the Internet, leaving only Future Tech.
The attached save is from the turn prior. I doubt that you have to do anything in particular to make the problem happen, but I haven't tried replaying.

EDIT: Went back to the game, Ingoring the Assert and got Crash to Desktop. Picked up again from this save. Gave Alex Fiber Optics and said Sorry to Hannibal. Got Assert again and CTD too. Going to run it from here with a previous build because I'm close-on to winning a Space Race. Alex could get a Domination or Diplomatic Victory first.

2nd EDIT: Took out the Better AI dll and ran until I selected Future Tech to research. Saved and put the dll back. Was able to play the game out. Alex came up 4 votes shy of a Diplo Victory just before I launched. I didn't think I had any chance to win this game, but the warring between the AIs, staying out of it, and going for the Internet are the factors that allowed my victory.


Assert Failed

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

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

This one (CvGlobals.cpp 1897), is also fixed. This one often causes a crash, I am sorry to say. It only occurs when trying to suggest a tech when the only choice is future tech (including when it can only give 1 suggestion, instead of the two suggestions it prefers).

This is one case where you can avoid the crash by running the version without asserts, the bug is actually in some code that is only done in the assert version. (It tries to get the string of the tech it picked, when it picks nothing, the code fails).

-Iustus

Iustus
Jan 27, 2007, 11:07 PM
I'll have a look - probably not.

update no - That was the turn before it occurred.

Do you happen to recall what actions you took on your turn? I would like to duplicate what you did, more or less exactly.

If you take that save, and repeat your actions, does it occur for you again?

-Iustus

col
Jan 28, 2007, 05:13 AM
As far as I recall, I was just going through building motions. I'd had a war that had just ended, and made peace with France and its vassals. Korea was at war with France and rightly or wrongly I got the impression that the announcement was triggered by events bewtween Korea / France and France's vassals.


edit: here s a 1766save. f you press shift-retrun you get the error.

shadyforce
Jan 28, 2007, 07:05 AM
Assert Failed

File: .\CvPlayer.cpp
Line: 11483
Expression: isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0)
Message:

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

This is the second time I got this. I didn;t have frequent enough auto-saves last time, so I'm just posting this one.

It always appears between turns (while the AI is presumably moving). It's non-recreatable unfortunately.

Here (http://forums.civfanatics.com/uploads/96162/Brian-Fractal.CivWarlordsSave) is a save before the assert failure.

I made my moves the first time and hit enter and it froze between turns. (I had to minimize the window to see the assert.)

The second time (trying to recreate it) I just loaded the save and hit enter. It didn't get the assert.

The third time, I loaded the save, duplicated my original moves, and hit enter. Again I didn't get the assert.

The moves I made were:
-Promote all cannons outside istanbul to CR2
-Launch all the non-critically-injured cannons into Istanbul
-Then attack with all the Infantry on the same tile.
-Using the bombers in Alexandria, attack Edrine, then the unused ones into the Mehmed's other city (can't remember name.)
-Set all infantry in Alexandria to heal (for one turn).
-Then move all the other bombers into Alexandria
-Then hit enter.

It should be noted that both repeat attempts, on the new turn, Frederick offered me 830 gold for Democracy. That didn't happen the original time I got the assert. I don't know if that's significant or not.

mrgenie
Jan 28, 2007, 07:37 AM
Hi Iustus,

i merged the betterAI code into ViSa, and i pretty much checked everything so many times now, i doubt i made a mergign error, but i get random CTD, sometimes turn 1, sometimes turn 300...

the game just quiets without Asserts Failure report, I enabled the Debug option in Civilization4.ini, but that debug screen that normally comes up, doesn't even spawn, the game completely stops...all in a sudden...

Iustus, i know this is not your problem, but do you have ANY, really, just ANY idea where the game might corrupt? because without error messages, im searching in a black dark area.

col
Jan 28, 2007, 08:11 AM
ssert Failed

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


Occurs at the end of this turn when I finish researching Biology

mrgenie
Jan 28, 2007, 08:12 AM
bool CvPlayer::isUnitClassMaxedOut(UnitClassTypes eIndex, int iExtra)
{
FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
FAssertMsg(eIndex < GC.getNumUnitClassInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");

if (!isNationalUnitClass(eIndex))
{
return false;
}

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

return ((getUnitClassCount(eIndex) + iExtra) >= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances( ));
}


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

in the CvPLayer.cpp Iustus, might also be just because i disabled alot of XML to test if the XML is causing the CTD

mrgenie
Jan 28, 2007, 08:20 AM
Assert Failed

File: CvCity.cpp
Line: 7831
Expression: getSpecialistCommerce(eIndex) >= 0
Message:

----------------------------------------------------------
Assert Failed

File: CvCity.cpp
Line: 7643
Expression: m_aiCommerceRate[eIndex] >= 0
Message:

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

got these at late ages, finally passed the CTD point! :) the linenumbers are not correct because of ViSa merges...but you can search the Fassert messages

mrgenie
Jan 28, 2007, 08:21 AM
Assert Failed

File: CvPlayer.cpp
Line: 11997
Expression: isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0)
Message:

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


could it be, once i got 1 error, the errors are cumulative?

mrgenie
Jan 28, 2007, 08:29 AM
Assert Failed

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

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

next one, very late in game

---------------------------------------------------------
-------------- ADD --------------
---------------------------------------------------------
btw, im not playing, i let the AI play for me...this might cause some different codes to be executed than regular human control, but at least im getting through the turns at mega speed to catch the bugs :)

MWAAAHAAA
Jan 28, 2007, 09:32 AM
Version: 1/25/07 build for Civ4 Vanilla 1.61

Infinite loop after conquering enemy city:


Assert Failed

File: .\CvCityAI.cpp
Line: 5327
Expression: false
Message: infinite loop

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


In order to reproduce the problem, end the turn.

Enclosed is the save game file.

cymru_man
Jan 28, 2007, 12:18 PM
Bug with version 25/1

http://www.sharemation.com/Welshie/Civ4ScreenShot0001.JPG

The governer wishes the city to remain stagnant while it could grow (using the sea tiles, it has a lighthouse). I have not pressed the emphasise buttons or anything, this is the default governer.

If it's of any interest, I've received the assert to do with the governer cycling between different plots and putting itself in an infinite loop and pressed always ignore.

I don't normally pay much attention to the city governer, but this does seem to be a bug to me. I'd take a citizen off the plains mine and put him in the water, and keep on until all the water tiles were worked.

I am attaching a saved game.

Roland Johansen
Jan 28, 2007, 12:33 PM
The governer wishes the city to remain stagnant while it could grow (using the sea tiles, it has a lighthouse). I have not pressed the emphasise buttons or anything, this is the default governer.

The screenshot is a bit small, but it looks as if the city is at the health and happy cap, so growing wouldn't do it any good.

mrgenie
Jan 28, 2007, 01:58 PM
The screenshot is a bit small, but it looks as if the city is at the health and happy cap, so growing wouldn't do it any good.

Yes, first thing i looked on too and thought:"this city growing would be a bad idea" :) no bug, it is as the governer should govern the city, maxed out till you hit boundaries where it would become unhealthy or unhappy...thank god blake or Iustus made this cap! :)

anyway, im playing now AUTO AI, but standard Civ4 without betterAI doesnt give me this errors, since auto AI is a official option from firaxis, i do consider the messages i got by playing auto AI bugs from the betterAI mod, and not just because im playing AUTO AI..

hwoever, the bug with the units and classes thing is 100% a wrong XML issue, i fixed that...so disregard that bug report..the rest are still to be considered bugs, i do state once again, either better AI itself, or a ViSa mod bug...but since Iustus helped me a great deal on solving my previous bugs, including the CTD i had, i hope he will continue looking at the code helping me out to merge the betterAI bugfree into our SDK :)


thank you Iustus and Blake!!!

Iustus
Jan 28, 2007, 02:31 PM
Assert Failed

File: CvCity.cpp
Line: 7831
Expression: getSpecialistCommerce(eIndex) >= 0
Message:

----------------------------------------------------------
Assert Failed

File: CvCity.cpp
Line: 7643
Expression: m_aiCommerceRate[eIndex] >= 0
Message:

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

got these at late ages, finally passed the CTD point! :) the linenumbers are not correct because of ViSa merges...but you can search the Fassert messages

Does ViSa have a specialist that gives negative gold, research, or culture? Some assumptions are being made which it looks like are inaccurate.

Assert Failed

File: CvPlayer.cpp
Line: 11997
Expression: isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0)
Message:

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

could it be, once i got 1 error, the errors are cumulative?

This is the error you get when you completely run out of money. It is firing because, at least in theory, it should not happen to computer AIs. This is one you can probably ignore, as the right thing should happen in this case, if you are sure that the AI really should have ran out of money, even at 0% research rate.

-Iustus

Blake
Jan 28, 2007, 03:12 PM
The screenshot is a bit small, but it looks as if the city is at the health and happy cap, so growing wouldn't do it any good.

This is exactly the case.
Also building a wonder means the governor puts less weight on commerce - it recognizes that growing and working a "-1,0,2" tile (3f eaten by the unhealthy pop) is NOT going to complete that wonder faster... you probably don't ever really want to make a 1f for 2c trade off either, it doesn't hurt to grow in general cases because you can just whip the unhealthy pop but whips don't work well on wonders.

col
Jan 28, 2007, 03:31 PM
Assert Failed

File: .\CvCityAI.cpp
Line: 5374
Expression: false
Message: infinite loop

cymru_man
Jan 28, 2007, 03:54 PM
Well spotted guys, I knew there had to be a reason -.-. I was running slavery though, doesn't that usually grow the city to cap +1? (something which often annoys me by the way). Sorry to have wasted time.

Roland Johansen
Jan 28, 2007, 04:47 PM
Well spotted guys, I knew there had to be a reason -.-. I was running slavery though, doesn't that usually grow the city to cap +1? (something which often annoys me by the way). Sorry to have wasted time.

As Blake already said, whipping is not that efficient for wonder building. Wonders have a production penalty when pop rushing (or gold rushing) is used. If I recall correctly, wonders are 50% to 300% more expensive for rushing purposes.

Also, whipping is not that good in a large city with good production tiles that can be used to stop the growth of the city. But I don't know if the governor takes that into account.

mrgenie
Jan 28, 2007, 04:56 PM
Hi Iustus, as with the SPecialist were we had indeed a negative value at 1 spot, as with the Terrain info, where we indeed have an extra jungle, you are right again, we have! :) thanks for your info, so i can fix those values.

mrgenie
Jan 28, 2007, 05:03 PM
Hi Blake, Iustus, my teammate asked me about the starting plot of the settler.

Indeed, randomly, the settler starts not at a blue circled plot.

I saw you changed something somewhere on the routine to estimate the optimal plot to found a city, did you also consider to use the same change to the placement of settlers upon map generation?

We used custom game, continents, rest default when you select the custom game option to start a new game.

btw thanks for the great support you guys are giving!!

Uncle_Joe
Jan 28, 2007, 05:18 PM
I noticed the Settlers not always starting on a blue circle either. I chalked it up to not having total vision over the starting 'fat cross' that would be provided by the starting spot. I have never actually tested that theory though (ie, by exploring a bit before building the capital and seeing if that would put a circle on the original starting spot).

mrgenie
Jan 28, 2007, 05:33 PM
well. I found the starting plot to be of the most important decision in all your game, sometimes i get a spot where i build barracs from start in 20turns, the next time i need 90turns to build them, a huge disadvantage of course...the routine to decide the starting plot, should:
1) see everything of the map, also what's beneath the FoW, to decide your best spot
2) all players should start around the same places, because really, the spot where you start is all it's about...i sometimes just restart 3 or 4 times just to get a nice spot :)

should be included in the betterAI to just get our settlers at the optimal spot, which should be coloured blue :) or maybe the first plot even get a complete different colour, like purple, to point out, in your nearest area, this is above all other plots the optimal plot to start your first city..that's something i like to see in the betterAI

jkp1187
Jan 28, 2007, 06:01 PM
Although I switched to Nationhood, I find that I am unable to use the "draft" function in any city, regardless of size or culture. Or am I missing/forgetting something?

1/25 build/small map/techtonics/8 civs

See attached.

JMaltman
Jan 28, 2007, 06:37 PM
Version: 1/25/07 build for Civ4 Vanilla 1.61

Infinite loop after conquering enemy city:



In order to reproduce the problem, end the turn.

Enclosed is the save game file.

Just got the exact same one. It was his capital, if that means anything else.

mrgenie
Jan 28, 2007, 07:39 PM
Assert Failed

File: CvPlayer.cpp
Line: 10486
Expression: getUnitClassCount(eIndex) <= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances( )
Message: getUnitClassCount is expected to be less than maximum bound of MaxPlayerInstances (invalid index)

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


next one i got..btw your info did indeed solve the other Fassert messages..fixed them now by editing the XML properly ..

Iustus
Jan 28, 2007, 08:40 PM
Better AI 07-01-25
Press Enter; Assert happens during French attack

Assert Failed

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

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

Assert Failed

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

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


I got this one it happens in 3 turns latter when Russia declare war on the Incans

when i press ignore all the game crashes

Both fixed. (Actually two different bugs, although they triggered the same assert.) (One was caused by transport stacks trying to bombard the wrong city, the other was caused by lakes that are next to the ocean but unreachable).

Keep the bug reports coming.

-Iustus

Iustus
Jan 28, 2007, 09:37 PM
07-01-25 Build
Press Enter to see behavior

Assert Failed

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

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

I've attached the two turns prior. Don't know what one has to do to provoke the bug. I guess it has something to do with Hannibal, so the human's actions probably don't matter.

Actually, you posted saves for the wrong bug. Sorry I did not get back to you until now, I didnt catch that until my last past through, when I decided to revisit this one.

I need a save one turn before your 710 game, not the ones in the 1800s, that bug is already fixed.

Thanks again

-Iustus

Pellanor
Jan 28, 2007, 10:36 PM
Hotseat Game.
07-01-25 Build

Assert Failed

File: .\CvCity.cpp
Line: 6123
Expression: getBuildingBombardDefense() >= 0
Message:

----------------------------------------------------------
Error is generated when I take the barbarian city of Olmec using my one Grenadier directly to the north.

On a side note, I never saw the error message when I was running fullscreen mode. It would just freeze the game.

And completely unrelated to bugs, it looks like Brennus is planning to backstab me, despite our +22 friendly relations. Thats what I get for feeding him all my Military techs.

JMaltman
Jan 28, 2007, 11:09 PM
07-01-25 Build
Assert Failed

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

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

I have just Scientific Method left to research. Do you need the save, or is that enough?

Whoa!

Right after I typed this in, the game crashed. Before that I just had to tab over to the assert, then tab back. :(

So all you should have to do is end turn. :(

Iustus
Jan 28, 2007, 11:34 PM
Hi Blake, Iustus, my teammate asked me about the starting plot of the settler.

Indeed, randomly, the settler starts not at a blue circled plot.

I saw you changed something somewhere on the routine to estimate the optimal plot to found a city, did you also consider to use the same change to the placement of settlers upon map generation?

We used custom game, continents, rest default when you select the custom game option to start a new game.

btw thanks for the great support you guys are giving!!

I noticed the Settlers not always starting on a blue circle either. I chalked it up to not having total vision over the starting 'fat cross' that would be provided by the starting spot. I have never actually tested that theory though (ie, by exploring a bit before building the capital and seeing if that would put a circle on the original starting spot).

There are two slightly different versions of what is the best plot to found a city.

One is used at game start, to find the best starting plot for each civ. This one takes into account things like how far you are from the other civs, dont start on a goody hut, etc. This is what is used to determine where to put your starting settler. This one knows everything about every plot on the map.

The second thing is what is used during the game, to decide both where to put the blue circles. This one only knows what you have explored.

Now, until BetterAI, the blue circles were always out of date with what you had recently explored. You would have to wait a turn to see the new info. Now, we show you live the actual best value, with what you explore.

These different ways of valuing things mean that the plot you start on might not be the one that shows a blue circle. It is still probably best to found on your starting plot, as it knew things that the blue circle code doesnt know (like perhaps where some iron is, etc).

-Iustus

mrgenie
Jan 29, 2007, 05:02 AM
cool Iustus, yeah i saw you changed the code to draw the blue circles instantly! :) still, you might wanna consider putting a red coloured circle on the starting plot to point out to the players that this is the best starting plot because it considers also hidden area and hidden resources,including a little help info when players move over the settler located on the red circle.

if you can't do this in SDK, i think for ViSa im considering a popup to explain players this fact that betterAI just does the math instantly, therefore the blue circle is located different then your starting plot of the settler..but a nice red circle would be a better way to explain users. :)

Great job on the instantly showing updated blue circles!!!

gnome
Jan 29, 2007, 07:05 AM
Version: 1/25/07 build, Asserts

Assert Failed

File: .\CvPlayer.cpp
Line: 11064
Expression: isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0)
Message:

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

Questions:

- Should I report errors with similar expressions that have already been reported?
- Should I include a savegame if it's already reported?

Civ 4 Vanilla
To duplicate: Move all units into recently captured barbarian city
End turn

(no gameplay issue noticeable by player)

A thought: Perhaps to have the assert failed message include info like patch & mod version?

gnome
Jan 29, 2007, 07:07 AM
Hrm. It doesn't let me include the savegame, because it's too large even zipped.

mrgenie
Jan 29, 2007, 07:57 AM
I reported that already, I think Iustus response to it is that it isn't really a bug, just a notification that the player just had less then 0gold and research on 0 already...meaning, he must disband units..

i can imagine a scenario where this happens when the AI is in a war, has alot of units, then looses 3 or 4cities with their income, but still having this mega huge army costing him just too much..

anyway..it is right the AI does not delete the units at that point, because the units are his only chance of survival in that scenario...

but yeah, i think Iustus or Blake should have a look at it, since this happend now 3times already in my games....im running autoAI mode almost constantly, so im running like 4 complete games/day :) autoAI does everything on the background so :) pretty nice way to test for bugs.

Raki
Jan 29, 2007, 08:59 AM
Seems there is a problem with the Hall of Fame function of CIV IV Warlords together with Better AI.

I started a game with the 01/08 release, then switched for some turns to the 01/25 one (imagine why?) and then back to 01/08 (too many assert messages). Consequence - my victory at the end of the game does not show up in the Hall of Fame and the Replay file is zero byte size.

Not too tragic obviously but still annoying. Next time I'll stick to the same Better AI version all the game and hope this doesn't happen anymore.

Quagga
Jan 29, 2007, 09:32 AM
Actually, you posted saves for the wrong bug. Sorry I did not get back to you until now, I didnt catch that until my last past through, when I decided to revisit this one.

Oops. Sorry about that. No longer have the autosaves.

Iustus
Jan 29, 2007, 09:41 AM
25-1 version. I'm not at war - but France and Korea are.

Assert Failed

File: .\CvTeamAI.cpp
Line: 1843
Expression: GET_TEAM(eWarTeam).isAlive()
Message: GET_TEAM(eWarTeam).isAlive is expected to be true

Thanks. This one turns out to be a firaxis bug with vassals.

It will be fixed in the next build.

-Iustus

mrgenie
Jan 29, 2007, 09:51 AM
Next time I'll stick to the same Better AI version all the game I'm not sure if i'm following you, but playing 2 different DLL's in one and the same savegame is not a bug report! you're in the wrong section.

too many asserts messages Duhhh, if you load a savegame with a different DLL...

Iustus
Jan 29, 2007, 01:18 PM
Assert Failed

File: .\CvPlayer.cpp
Line: 11483
Expression: isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0)
Message:

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

This is the second time I got this. I didn;t have frequent enough auto-saves last time, so I'm just posting this one.

It always appears between turns (while the AI is presumably moving). It's non-recreatable unfortunately.

Here (http://forums.civfanatics.com/uploads/96162/Brian-Fractal.CivWarlordsSave) is a save before the assert failure.

I made my moves the first time and hit enter and it froze between turns. (I had to minimize the window to see the assert.)

The second time (trying to recreate it) I just loaded the save and hit enter. It didn't get the assert.

The third time, I loaded the save, duplicated my original moves, and hit enter. Again I didn't get the assert.

The moves I made were:
-Promote all cannons outside istanbul to CR2
-Launch all the non-critically-injured cannons into Istanbul
-Then attack with all the Infantry on the same tile.
-Using the bombers in Alexandria, attack Edrine, then the unused ones into the Mehmed's other city (can't remember name.)
-Set all infantry in Alexandria to heal (for one turn).
-Then move all the other bombers into Alexandria
-Then hit enter.

It should be noted that both repeat attempts, on the new turn, Frederick offered me 830 gold for Democracy. That didn't happen the original time I got the assert. I don't know if that's significant or not.

I responded here on the questionable actions thread (http://forums.civfanatics.com/showpost.php?p=5041541&postcount=60)

-Iustus

Iustus
Jan 29, 2007, 01:34 PM
Although I switched to Nationhood, I find that I am unable to use the "draft" function in any city, regardless of size or culture. Or am I missing/forgetting something?

1/25 build/small map/techtonics/8 civs

See attached.

This is a fun one, but not a bug (at least not in BetterAI).

What we have here is you have managed to get yourself into a tech pickle, you cannot build any units that are valid for drafting:

http://forums.civfanatics.com/uploads/95686/techpickle.jpg

Because you researched rocketry so early, SAM Infantry prevents you from building riflemen, which was the only unit you could build that was draftable. Once you research Assembly Line, and you can build infantry, you should be able to draft.

This is a new one for me, I have never seen a late game case of no draftable units. Perhaps Firaxis should prevent SAM Infantry from obsoleting Riflemen (it would be an XML change).

-Iustus

jkp1187
Jan 29, 2007, 01:49 PM
This is a fun one, but not a bug (at least not in BetterAI).

What we have here is you have managed to get yourself into a tech pickle, you cannot build any units that are valid for drafting:
Because you researched rocketry so early, SAM Infantry prevents you from building riflemen, which was the only unit you could build that was draftable. Once you research Assembly Line, and you can build infantry, you should be able to draft.

This is a new one for me, I have never seen a late game case of no draftable units. Perhaps Firaxis should prevent SAM Infantry from obsoleting Riflemen (it would be an XML change).

-Iustus


Thanks for the explanation, Iustus. I was afraid I was going mad there for a moment. I will post this over in the general bug reports....

Iustus
Jan 29, 2007, 02:04 PM
Hotseat Game.
07-01-25 Build


Error is generated when I take the barbarian city of Olmec using my one Grenadier directly to the north.

On a side note, I never saw the error message when I was running fullscreen mode. It would just freeze the game.

And completely unrelated to bugs, it looks like Brennus is planning to backstab me, despite our +22 friendly relations. Thats what I get for feeding him all my Military techs.

Hmm, interesting. The barbarian city has both walls and a castle, but internally, it only has a max defense of 25, not the 50 it should be. I know barbarians get some free stuff, did he always have the castle walls? Was this city recently founded? Do you happen to recall what the city defense was before you started bombarding the walls? was it 25 or 50?

If anyone else notices castle walls not seeming to add to defense, please point it out (dont think this is a betterai bug, but it could be a firaxis bug).

-Iustus

Iustus
Jan 29, 2007, 02:10 PM
Seems there is a problem with the Hall of Fame function of CIV IV Warlords together with Better AI.

I started a game with the 01/08 release, then switched for some turns to the 01/25 one (imagine why?) and then back to 01/08 (too many assert messages). Consequence - my victory at the end of the game does not show up in the Hall of Fame and the Replay file is zero byte size.

Not too tragic obviously but still annoying. Next time I'll stick to the same Better AI version all the game and hope this doesn't happen anymore.

I'm not sure if i'm following you, but playing 2 different DLL's in one and the same savegame is not a bug report! you're in the wrong section.

Duhhh, if you load a savegame with a different DLL...

Switching versions should be ok. But you could just switch to the 1/25 non-assert version, rather than going back to the more buggy 1/8 version. Unless of course you crashing after the asserts.

One of the goals of BetterAI is that we do not muck with the savefile format, so we should be compatable switching between versions of BetterAI, or taking BetterAI in and out.

Has anyone else seen a problem with the Hall of Fame or Replay files?

-Iustus

Iustus
Jan 29, 2007, 04:46 PM
Well, I have addressed in some form every report to this point. We should get a new build out today with these fixes.

-Iustus

kettyo
Jan 29, 2007, 04:57 PM
I don't know Iustus whether you know this assert yet:

Assert Failed

File: .\CvPlayer.cpp
Line: 10012
Expression: getUnitClassCount(eIndex) <= GC.getUnitClassInfo(eIndex).getMaxPlayerInstances( )
Message: getUnitClassCount is expected to be less than maximum bound of MaxPlayerInstances (invalid index)


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.

mrgenie
Jan 29, 2007, 05:04 PM
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.

i got it on all my test runs, actually, i was tracking down the whole ViSa XML's for this one, but now you also report it, i guess it's not a failure in our XML...so, i second this bug report! :)

---- ADD ------
oh btw, while im playing autoAI, i cannot access the worldbuilder, so there must be something else then just placing a unit by the worldbuilder into fogged cities triggering this.


----ADD2-----
switching between version corrupts always my savegames Iustus...don't ask me why, but i have a hard time on switching between different versions :( maybe it is because i always change alot in the ini settings and XML settings..but normally, even if the game runs after loading a savegame with changes settings, normally it bugs me at some point :(

---aDD3---
hall of fame looks ok on my end..at least at first sight..

kettyo
Jan 29, 2007, 06:09 PM
Iustus

As you can see in my savegame attachment few posts above England and Persia had a really close start.

Here are some images:

jkp1187
Jan 29, 2007, 06:38 PM
Iustus

As you can see in my savegame attachment few posts above England and Persia had a really close start.

Here are some images:

Pshaw. That's not that close. Wasn't enough to hamper development of either city.

jkp1187
Jan 29, 2007, 06:40 PM
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.]

Blake
Jan 29, 2007, 07:14 PM
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).

kettyo
Jan 29, 2007, 07:23 PM
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.

kettyo
Jan 29, 2007, 07:27 PM
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 :)

jkp1187
Jan 29, 2007, 08:04 PM
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:

kettyo
Jan 29, 2007, 08:22 PM
Dunno...looked like Rome hampered them both more than each other... :goodjob:

Surely :D
But i haven't throw a single brick towards them.
They were just in the way of my own expansion (needed a stone res.)

Iustus
Jan 29, 2007, 09:06 PM
New build 1/29 (http://sourceforge.net/project/showfiles.php?group_id=178407)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

mrgenie
Jan 30, 2007, 05:07 AM
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

Blake
Jan 30, 2007, 06:08 AM
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.

jkp1187
Jan 30, 2007, 08:47 AM
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.

Iustus
Jan 30, 2007, 12:31 PM
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

Roland Johansen
Jan 30, 2007, 12:49 PM
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.

Iustus
Jan 30, 2007, 01:07 PM
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 (http://forums.civfanatics.com/showthread.php?t=204909), if someone can follow up with the line of the XML file that has the error.

-Iustus

jkp1187
Jan 30, 2007, 01:20 PM
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?

Arlborn
Jan 30, 2007, 01:50 PM
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..

Iustus
Jan 30, 2007, 03:18 PM
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

Iustus
Jan 30, 2007, 03:56 PM
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:

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:

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 (http://forums.civfanatics.com/showpost.php?p=5046178&postcount=176)as well, but I do not know if anyone is still maintaining that component.

-Iustus

col
Jan 30, 2007, 04:17 PM
A couple of games completed (1/29) and

NO ASSERTS FAILED !!!

Roland Johansen
Jan 30, 2007, 05:06 PM
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:

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:

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 (http://forums.civfanatics.com/showpost.php?p=5046178&postcount=176)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.

Iustus
Jan 30, 2007, 05:06 PM
New build posted 1/30 (http://sourceforge.net/project/showfiles.php?group_id=178407)which fixes the bombard crash bug, and a bit more (http://forums.civfanatics.com/showpost.php?p=5046396&postcount=26).

-Iustus

jkp1187
Jan 30, 2007, 05:49 PM
Awesome. Thanks, Iustus!

gnome
Jan 31, 2007, 07:07 AM
Build 1/30

Assert Failed

File: .\CvGameCoreUtils.cpp
Line: 784
Expression: iTemp < MAX_INT
Message:

Unable to post save due to size exceeds 500kb. Able to email on request.

Action: Attacking a barbarian adjacent to a city.

JMaltman
Jan 31, 2007, 01:01 PM
Looks like my - "only one tech to research"-related assert didn't come back in the 29th build. :D

Iustus
Jan 31, 2007, 01:04 PM
"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

Iustus
Jan 31, 2007, 01:09 PM
Build 1/30

Assert Failed

File: .\CvGameCoreUtils.cpp
Line: 784
Expression: iTemp < MAX_INT
Message:

Unable to post save due to size exceeds 500kb. Able to email on request.

Action: Attacking a barbarian adjacent to a city.

I would like to see this save please.

-Iustus

Elhoim
Jan 31, 2007, 04:26 PM
Unable to post save due to size exceeds 500kb.

Use the Upload tab between Chat and FAQ.

JBConquests
Jan 31, 2007, 06:00 PM
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.

Mannu
Jan 31, 2007, 06:44 PM
Nevermind. I see that Iustus said I did not need to report 5409. That's what this was...

gnome
Feb 01, 2007, 05:53 AM
I would like to see this save please.

-Iustus

http://forums.civfanatics.com/uploads/23357/AutoSave_AD-1834.zip

Thanks :)

Iustus
Feb 01, 2007, 03:11 PM
Build 1/30

Assert Failed

File: .\CvGameCoreUtils.cpp
Line: 784
Expression: iTemp < MAX_INT
Message:

Unable to post save due to size exceeds 500kb. Able to email on request.

Action: Attacking a barbarian adjacent to a city.

http://forums.civfanatics.com/uploads/23357/AutoSave_AD-1834.zip

Thanks :)

Hmm. Interesting bug. Now I know why I could not see how it could occur, you were running with vanilla, and I was looking at the warlords code. As it turns out, this was a bug in vanilla that was fixed in warlords. I will propogate the fix back to our vanilla version for the next build.

-Iustus

Wodan
Feb 01, 2007, 05:03 PM
This may be a bug, but I'm not sure.

I would swear that you used to be able to automate two workboats. The first would go for one of your un-netted resources. The second would go for a different un-netted resource.

With the 1/30 build, I'm seeing both boats go for the same resource. They don't figure it out until they actually get there.

Am I losing my mind, or is this correct? (don't answer the first part). If this is correct, then we lost something in the boat automation. (And, potentially, in the worker automation too, though they at least are cumulative so that shouldn't matter as much.)

Wodan

Blake
Feb 01, 2007, 05:16 PM
This may be a bug, but I'm not sure.

I would swear that you used to be able to automate two workboats. The first would go for one of your un-netted resources. The second would go for a different un-netted resource.

With the 1/30 build, I'm seeing both boats go for the same resource. They don't figure it out until they actually get there.

Am I losing my mind, or is this correct? (don't answer the first part). If this is correct, then we lost something in the boat automation. (And, potentially, in the worker automation too, though they at least are cumulative so that shouldn't matter as much.)

Wodan
Oops! I know what caused this.

Originally of course it would only ever use 1 worker to improve a resource - by extension this meant it would only send 1 workboat to improve a resource. When I allowed the workers to team up to improve strategic resources that must have also allowed workboats to do the same. It wont be hard to fix.

PieceOfMind
Feb 02, 2007, 12:05 AM
I can't remove an item from a city build queue when there's only one remaining. I could have sworn I used to be able to do this so it must be a bug. I'm using the Warlords Asserts 1/30 build.

Also, in a recent game I saw the build governor in a coastal city build a workboat when there were no sea resources to improve (that weren't already improved). Moreover, the city was neighboured on both sides by a rival civ with closed borders so the boat couldn't even go anywhere outisde the city radius. There was a clam inside the radius but it was already worked. I assume this is a bug - not questionable AI behaviour.
I can't remember exactly but pretty sure this was Vanilla Civ with the 1/30 build.

http://img402.imageshack.us/img402/1539/civ4screenshot0175gr5.th.jpg (http://img402.imageshack.us/my.php?image=civ4screenshot0175gr5.jpg)

GameSave AD-1385 (http://forums.civfanatics.com/uploads/80491/AutoSave_AD-1385.Civ4SavedGame)



EDIT: Attached screenshot, and savegame from one or two turns earlier.

ori
Feb 02, 2007, 03:28 AM
not sure if this is questionable behavior or a bug but anyway: work boats are afraid of land based enemies. The screenshot is obviously worldbuilded but I have noticed this in a couple of games with the 1/30 build: an automated work boat won't pass a land based enemy to improve a ressource:

http://img104.imageshack.us/img104/3328/betterai1mf0.th.jpg (http://img104.imageshack.us/my.php?image=betterai1mf0.jpg)

Matt_G
Feb 02, 2007, 10:40 AM
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:

Matt_G
Feb 02, 2007, 11:15 AM
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.

JBConquests
Feb 02, 2007, 03:36 PM
Build 1/30

Assert Failed

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

The save is an auto save done done at 1415AD. When I hit enter to end turn during 1420AD, I got the assert. However, I reloaded 1415AD and tried to reproduce the assert and couldn't.

I've got more saves going back if you need them.

Edit: Okay, I just started to continue playing this game and reproduced this at turn 1435AD.

Sam_Yeager
Feb 02, 2007, 05:18 PM
Build 1/30

Assert Failed

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


See this post (http://forums.civfanatics.com/showpost.php?p=5049728&postcount=123). ;)

JBConquests
Feb 02, 2007, 07:01 PM
Oh, sorry, didn't see that.

Really, the 1/30 build is pretty good. I played through 1 1/2 games now and only had this one assert.

CivCorpse
Feb 02, 2007, 07:17 PM
"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

cymru_man
Feb 02, 2007, 07:41 PM
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..

Topher
Feb 02, 2007, 10:05 PM
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

Mexico
Feb 03, 2007, 09:00 AM
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):

// 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()

// can we path to the upgrade city?
int iUpgradeCityPathTurns;
bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
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:

// can we path to the upgrade city?
int iUpgradeCityPathTurns;
bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
// CvPlot* pThisTurnPlot = getPathEndTurnPlot(); //old code
// New code
CvPlot* pThisTurnPlot;
if(bCanPathToUpgradeCity)
{
pThisTurnPlot = getPathEndTurnPlot();
}
// 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

CivCorpse
Feb 03, 2007, 09:38 AM
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.

Uncle_Joe
Feb 03, 2007, 10:24 AM
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.

Ralgar
Feb 03, 2007, 10:37 AM
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.

BeefontheBone
Feb 03, 2007, 02:42 PM
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/uploads/68411/BeefontheBone_BC-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

MatzeHH
Feb 03, 2007, 03:14 PM
EDIT4, last:
getPathEndTurnPlot generate CTD, because there is no path generated! (pNode is NULL inside this function)

problem is in AI_travelToUpgradeCity()

// can we path to the upgrade city?
int iUpgradeCityPathTurns;
bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
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:

// can we path to the upgrade city?
int iUpgradeCityPathTurns;
bool bCanPathToUpgradeCity = generatePath(pUpgradeCity->plot(), 0, true, &iUpgradeCityPathTurns);
// CvPlot* pThisTurnPlot = getPathEndTurnPlot(); //old code
// New code
CvPlot* pThisTurnPlot;
if(bCanPathToUpgradeCity)
{
pThisTurnPlot = getPathEndTurnPlot();
}
// 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

Quagga
Feb 03, 2007, 04:34 PM
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.

Quagga
Feb 03, 2007, 05:36 PM
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.)

mrgenie
Feb 03, 2007, 06:59 PM
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:

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

bolt144
Feb 04, 2007, 11:49 AM
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.

Chris Withers
Feb 04, 2007, 01:00 PM
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.

ori
Feb 04, 2007, 02:31 PM
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 ;)

cf_nz
Feb 04, 2007, 04:36 PM
@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.

rev063
Feb 04, 2007, 08:35 PM
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.

Chris Withers
Feb 05, 2007, 12:42 PM
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!

Blaukrieger
Feb 05, 2007, 01:39 PM
My bug report (version from 1/31 with handicaps)

BrooklynDad
Feb 05, 2007, 08:51 PM
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/uploads/68411/BeefontheBone_BC-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(!!!!!)

Cyrus_the_Great
Feb 05, 2007, 09:14 PM
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.

bolt144
Feb 05, 2007, 09:17 PM
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.

Cyrus_the_Great
Feb 06, 2007, 01:27 AM
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.

Quagga
Feb 06, 2007, 05:48 AM
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.

Cyrus_the_Great
Feb 06, 2007, 08:14 PM
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.

Iustus
Feb 06, 2007, 09:09 PM
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 (http://forums.civfanatics.com/showthread.php?t=204909).

-Iustus

Cyrus_the_Great
Feb 06, 2007, 10:07 PM
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.

cf_nz
Feb 06, 2007, 11:42 PM
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).

jkp1187
Feb 07, 2007, 12:01 AM
Assert occurred during AI move:

Assert Failed

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

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

mrgenie
Feb 07, 2007, 12:50 AM
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

Iustus
Feb 07, 2007, 03:08 AM
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:
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:

if (GC.getLogging())
{
TCHAR szOut[1024];
sprintf(szOut, "unit class %S.\n", GC.getUnitClassInfo(eIndex).getDescription.getCStr ing());
gDLL->messageControlLog(szOut);
}


-Iustus

mrgenie
Feb 07, 2007, 05:23 AM
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.

mynystry
Feb 07, 2007, 07:58 AM
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!

Ralgar
Feb 07, 2007, 10:30 AM
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.

gnome
Feb 07, 2007, 10:30 AM
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.

mynystry
Feb 07, 2007, 11:00 AM
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.

i downloaded it on 2007-1-25

Iustus
Feb 07, 2007, 12:07 PM
i downloaded it on 2007-1-25

Please go back and download the latest build (1/30), and try again, that bug should be gone.

-Iustus

Iustus
Feb 07, 2007, 12:26 PM
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)

Iustus
Feb 07, 2007, 12:34 PM
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

Iustus
Feb 07, 2007, 12:39 PM
"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

Iustus
Feb 07, 2007, 12:49 PM
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

Iustus
Feb 07, 2007, 01:16 PM
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

Iustus
Feb 07, 2007, 01:30 PM
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:

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

You are trying to set the culture value on a plot to a negative value. This feels like an XML error where you have some building or something which has a negative culture value in error.

This one would be easy to track down with the debugger, but otherwise, you may have to add a bunch of logging to find it. If you can get it with a regular BetterAI build, I would love to see the save.

-Iustus

Topher
Feb 07, 2007, 01:35 PM
Uh, I posted the wrong save :blush: (75 BC instead of 75 AD)

This is the right save, I downloaded it and checked to be sure:

147671

Sorry about the mix up.

Iustus
Feb 07, 2007, 01:37 PM
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/uploads/68411/BeefontheBone_BC-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

As reported before, this bug should be harmless, just click ignore always. It will make your turns go a tiny bit slower.

This is caused by the city governor not knowing which plot to work (a few being almost equally good). It does this 'juggle' function, switching one, and then checking again, well it gets into a loop, cycling between 3 plots. After about 20 tries, it gives up, reporting this error.

It will be fixed in the next build, but for now, ignore it. Since it is caused by the city governor (which the AI uses), many events can trigger it.

-Iustus

gnome
Feb 07, 2007, 01:42 PM
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.

This error is getting more and more perplexing. I am getting this error every time I try to examine a city now. I even uninstalled and reinstalled all of civ and warlords, and reinstalled the same mods I was using yesterday, but I'm still getting these overlay errors. :mad: I'm wondering what I've done to my setup to cause this.

Iustus
Feb 07, 2007, 01:45 PM
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.

Do you happen to have a save a few turns earlier? Washington has a worker over in Ragnar's territory, but his outside unit count is zero. I would like to know how this occured.

This is starting to look to me like a firaxis bug. (The only effect of which is that the unit costs you pay for units outside your territory might be sometimes off a bit).

-Iustus

Quagga
Feb 07, 2007, 02:01 PM
^^^ Sorry, no. That happened three days ago. I save only 10 autosaves. I know I manage more than 3.3 turns per day! ;)

Iustus
Feb 07, 2007, 03:04 PM
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.

Thank you for your post.

I made a post with instructions (http://forums.civfanatics.com/showthread.php?t=206303)on what needs to be done to look into these sync issues.

We need to look at the MPLogs from both computers. I do not have sync log enabled on my machine, so I do not believe that is needed. The problem is that if you quit the game, the MPLog file may be deleted. So you need to have everyone alt tab out and make a copy of the file right away. Then send them all to one person to do a comparison.

There were definitely some fogbusting errors, but we fixed all of those we could find. There is still quite a bit of extra logging from the explore code, but this does not mean that is the cause for the sync errors. The explore code does use random more than most things, so is more likely to 'discover' a problem that was caused by something else.

That said, I suspect the problem is something else, based on my own testing. If we can find a difference in the MPLogs, we can track it down. (If the logs are identical, then we may need to add some more logging of other things, until we can track down what it is that is different). We do have a way to do a build that generates an enormous logfile, with almost everything tracked, if someone wishes to test with it. (The file will get to be hundreds of megs if you play for a while).

-Iustus

gnome
Feb 07, 2007, 04:14 PM
Update on Overlay error: score another one for the methodical approach.

I tested a game after loading each mod component... and found that the Look and Feel mod is incompatible with the Title Screen Mod that gives you back the Earth and "Baba Yetu" song--at least if you combine them into a single mod.

Brings up the question of "why?" but makes it a much more low priority issue... whew.

Iustus
Feb 07, 2007, 04:17 PM
My bug report (version from 1/31 with handicaps)

FAssert(isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0));


As I said previously, this is caused when an AI goes into strike (which should almost never happen). In this case, it turned out to be a real problem that I could fix.

Wang Kon was fine financially. However, he had just spent some money I suspect (perhaps upgrading to longbows), and was down to 4 gold. Well, he decided to change civics, which is fine, but that put him into anarchy, changing his +12 gold per turn into -5 gold per turn. (Trade deals are still active during anarchy, and he had a 5 gold per turn going out in trade deals). Since he only had 4 gold, the -5/turn during the 1 turn of anarchy put him into strike.

This is not good. The fix is that AIs will wait a turn before changing civics or religion, if it will cause anarchy, if they do not have enough gold in the bank to cover their trade deals.

I would really like to see Firaxis change the behavior under anarchy so that you do not strike. I could do this, but it would be a gameplay change, so I am not going to do so.

-Iustus

Ralgar
Feb 07, 2007, 06:26 PM
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.

Thanks for the feedback on every bug report. I found it rather strange how very long the query in my assert was.

Iustus
Feb 07, 2007, 06:33 PM
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.

Do you have a save game from this? I have seen this before, but I was unable to duplicate it.

-Iustus

KHSOLO
Feb 07, 2007, 07:20 PM
I have a bug to report and plainy replicable, have saved game also.

The only thing i dont have is a place to upload the saved game cause the uploading screen says files smaller than 500 Kb when my save is almost 900 Kb.

Pls someone point me to a place where i can upload this file, thanxs.

Iustus
Feb 07, 2007, 08:37 PM
I have a bug to report and plainy replicable, have saved game also.

The only thing i dont have is a place to upload the saved game cause the uploading screen says files smaller than 500 Kb when my save is almost 900 Kb.

Pls someone point me to a place where i can upload this file, thanxs.

You want to click the red Easy Upload System button when making a post:
http://forums.civfanatics.com/uploads/95686/uploadbutton.jpg

That should let you upload a file that is larger (you will want to make a zip of it).

-Iustus

Iustus
Feb 07, 2007, 08:40 PM
^^^ Sorry, no. That happened three days ago. I save only 10 autosaves. I know I manage more than 3.3 turns per day! ;)

Next time, when you report a bug, make a copy on your own hard drive of the whole autosave folder (just copy and paste it). Then, if we need an earlier save, you have that folder. You can give the folder a date if you wish, so you can then delete it in a couple weeks if we dont need it.

-Iustus

Iustus
Feb 07, 2007, 08:41 PM
Uh, I posted the wrong save :blush: (75 BC instead of 75 AD)

This is the right save, I downloaded it and checked to be sure:

147671

Sorry about the mix up.

Thank you for following up. This was a good bug! Both problem with how stacks were attacking and also a crash bug.

(both fixed in next build)

-Iustus

Iustus
Feb 07, 2007, 08:42 PM
Shooting for a build tomorrow, which addresses all known issues. If you are sitting on a bug report, try to post it asap so we can try to get a fix in by tomorrow.

-Iustus

Mexico
Feb 08, 2007, 03:00 AM
Shooting for a build tomorrow, which addresses all known issues. If you are sitting on a bug report, try to post it asap so we can try to get a fix in by tomorrow.

-Iustus

as reported earlier in http://forums.civfanatics.com/showpost.php?p=5060449&postcount=142 and checked in rev.350, this bug is still present
when AI want move unti to city for upgrade, but path is blocked, game crashed

shadyforce
Feb 08, 2007, 06:17 AM
I found a bug (assert) last night but I never got around to reporting it. Basically, I have 1/30 installed in CustomAssets. Then I started a game of the Chinese Unification Scenario. When the game was loading, it froze as an assert popped up in the background. It also popped up the next time I loaded the scenario to continue the save. Oh and if I hit ignore once, the assert appears again instantly. I just hit ignore always after that.

I don't have the text or the save as I'm at work. but I just wanted to mention it now (before the new build) as the assert seems easily recreatable.

jray
Feb 08, 2007, 08:31 AM
Build 1/30

File: .\CvGlobals.cpp
Line: 1081
Expression: eLeaderHeadNum > -1
Message:

This one only happens when using my jrayUGH (http://forums.civfanatics.com/showthread.php?t=204958) mod (v208b). Hit End Turn to recreate. I don't know if it's within your scope to troubleshoot mod-specific asserts, but if you happen to find a problem with my mod, I'd appreciate it if you let me know. Thanks :).

Wodan
Feb 08, 2007, 11:35 AM
Assert Failed

File: .\CvPlot.cpp
Line: 3906
Expression: eRiverDir == CARDINALDIRECTION_WEST || eRiverDir == CARDINALDIRECTION_EAST || eRiverDir == NO_CARDINALDIRECTION
Message: invalid parameter

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

got this as soon as I started the Earth scenario

Wodan

Wodan
Feb 08, 2007, 11:50 AM
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

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

this one came from trying Omens

Wow, a 2fer....

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

Assert Failed

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

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

Iustus
Feb 08, 2007, 03:35 PM
as reported earlier in http://forums.civfanatics.com/showpost.php?p=5060449&postcount=142 and checked in rev.350, this bug is still present
when AI want move unti to city for upgrade, but path is blocked, game crashed

Woops. Thank you for catching this one. I looked into this, but I saw this code:


if (bCanPathToClosestCity && iClosestCityPathTurns < iUpgradeCityPathTurns)
{
pThisTurnPlot = getPathEndTurnPlot();


So, I thought Blake already checked in a fix.

Of course, thats further down in the code.

Fixed now.

-Iustus

Cyrus_the_Great
Feb 08, 2007, 03:53 PM
Iustus, sorry but I don't have a save anymore for my Barbarians assert. It seems like I can't duplicate the error anyway. I will wait for the next build and go back and try it again. I'll be sure to post a save game.

Thanks to you and Blake, for making this version of Civ so much more appealing, with all your efforts.

Iustus
Feb 08, 2007, 04:21 PM
Regarding all scenarios...

I am not sure that it makes sense to 'remove' all the asserts that you get on Warlords scenarios.

The no projects in the list one is pretty easy to remove, but that does not deal with some of the others.

Some default python code is asking for units of type "GUN" and type "ARMOR" which does not exist in some of the scenarios. In this case, the only way to 'fix' it would be to either change the python code (out of scope of this project), or to never report when someone tries to get a type that does not exist (which I think would be bad).

In every case I have found so far, just ignoring the assert seems to work.

I would still like to see people report asserts they recieve in scenarios though. It is just that most of them are harmless.

The issue is that Firaxis put all these asserts in there, and I am reluctant to remove the Firaxis asserts just because Firaxis scenarios trigger them.

I will run through all the scenarios to see if I find any real problems.

Anyone have any thoughts on this?

-Iustus

Wodan
Feb 08, 2007, 04:31 PM
Regarding all scenarios...

In every case I have found so far, just ignoring the assert seems to work.

Anyone have any thoughts on this?
Well, the real question is...

If we have a no-Assert build of BetterAI (like, the real/final v.1.0), what are the ramifications? Is it "ignore all" by default? Is Joe Newbie going to crash, or is he going to be fine?

If it ignores and everything's fine, then there you have your answer, methinks.

Wodan

shadyforce
Feb 08, 2007, 05:15 PM
This looks like the one you were referring to.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

----------------------------------------------------------
I'm half way through the scenario and after ignoring the assert, there have been no problems.

mrgenie
Feb 08, 2007, 05:22 PM
Hi Iustus, Blake anyone, else playing betterAI..did anyone play with RAGING BARBARIANS options enabled? i get a CTD either on map creation or first couple of turns..can anyone second this?

shadyforce
Feb 08, 2007, 06:58 PM
Assert Failed

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

----------------------------------------------------------
Another assert, this time towards the end of the setup after starting a new Rome Scenario.

Iustus
Feb 08, 2007, 07:22 PM
Well, the real question is...

If we have a no-Assert build of BetterAI (like, the real/final v.1.0), what are the ramifications? Is it "ignore all" by default? Is Joe Newbie going to crash, or is he going to be fine?

If it ignores and everything's fine, then there you have your answer, methinks.

Wodan

Yes, a non-assert build is basically ignore all by default. (It actually never even does the check).

My concern is that people will fail to report asserts in scenarios, because they get that spew of them at the start, and some during.

I would like to see all asserts continue to be reported, even though some are Firaxis bugs in the scenarios (or in their python code) which I am not going to fix.

-Iustus

KHSOLO
Feb 08, 2007, 07:45 PM
Ok here is trhe assert error:


http://img165.imageshack.us/img165/4073/nuevaimagenho5.jpg

Here is the saved game:

http://forums.civfanatics.com/uploads/66541/GUILLERMO_SCHMIDT_AD-2363.zip

Just start the save and click for next turn.

Thanxs for the hard work amigo, your work is really invaluable and very close to the communitys needs, congrats and S!!

bolt144
Feb 08, 2007, 08:29 PM
Following the directions from Iustus, I was able to capture logs from an OOS error. I ran WinDiff and a screen shot is below of where the first non-Asynch difference was. I will attach the logs too.

Iustus
Feb 09, 2007, 02:41 PM
Following the directions from Iustus, I was able to capture logs from an OOS error. I ran WinDiff and a screen shot is below of where the first non-Asynch difference was. I will attach the logs too.

Fantastic, thank you. I believe I have found the source of the problem. The next build (sorry held it a day for this), should have the fix.

-Iustus

bolt144
Feb 09, 2007, 02:54 PM
Fantastic, thank you. I believe I have found the source of the problem. The next build (sorry held it a day for this), should have the fix.

-Iustus

Excellent. Looking forward to trying it out. Thanks!

Iustus
Feb 09, 2007, 04:49 PM
New build posted 2/09 (http://sourceforge.net/project/showfiles.php?group_id=178407)

These are known issues with this build (I should have put this in the release notes as well):

- Some scenarios will trigger harmless asserts (UNITCOMBAT_GUN, UNITCOMBAT_ARMOR, etc). These are caused by python code asking for things that do not exist. Please continue to report asserts, unless you are certain that your specific one was already reported. When you get one of these, you should be able to click ignore always and continue to play.

- Ironclads trigger two asserts when used. This is caused by an XML bug which Firaxis needs to fix (the sound effect seems to be missing or have a typo). You can click ignore always.

Please continue to report all asserts you see, but remember that many of them are harmless. Often the intent of the XML based asserts is to indicate to the Scenario developer that they have an error they need to fix. I only wish that the Firaxis developers had run their own assert build more often to fix these issues. The game should run fine though.

You can always download the non-assert version of BetterAI to compare results, but clicking "Ignore" should have the same effect as just running the non-assert version.

-Iustus

gnome
Feb 09, 2007, 06:21 PM
2/9 release

Assert Failed

File: .\CvPlayerAI.cpp
Line: 4018
Expression: ePlayer != getID()
Message: shouldn't call this function on ourselves

----------------------------------------------------------
(after ignoring)

Assert Failed

File: .\CvPlayerAI.cpp
Line: 4032
Expression: ePlayer != getID()
Message: shouldn't call this function on ourselves

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


Occurred when reloading save. Also occurred on previous build.

Mods (combined)
Better AI Handicaps
Look & Feel
Bad Ronald's Flags

Iustus
Feb 10, 2007, 03:44 AM
2/9 release

Assert Failed

File: .\CvPlayerAI.cpp
Line: 4018
Expression: ePlayer != getID()
Message: shouldn't call this function on ourselves

----------------------------------------------------------
(after ignoring)

Assert Failed

File: .\CvPlayerAI.cpp
Line: 4032
Expression: ePlayer != getID()
Message: shouldn't call this function on ourselves

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


Occurred when reloading save. Also occurred on previous build.

Mods (combined)
Better AI Handicaps
Look & Feel
Bad Ronald's Flags

This looks like a bug from one of those python mods. Someone is calling AI_getAttitude on themselves. I am guessing the "Look & Feel" mod, but I am not familiar with it. You want to look for a loop over every player calling AI_getAttitude. It should not call this on itself, it should skip the active player ID.

Edit: I found the trouble lines, in autologEventManager.py, as reported here in the Look & Feel thread (http://forums.civfanatics.com/showpost.php?p=5087528&postcount=28).

-Iustus

gnome
Feb 10, 2007, 08:42 AM
Thanks, you rock!

herwin
Feb 10, 2007, 09:27 AM
Assert Failed

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

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

Unclear why...

WarISgood
Feb 10, 2007, 04:38 PM
Hello, I like all the changes being made in this *mod

I have a saved game that crashes me to desktop as soon as I end my turn. It does this repeatedly. I have no clue what could be causing it or I would say. It's a great game though that I'd love to continue.

Edit: Supposedly my saved game it too large at 828 kb. All I can add is that there are no other mods running, this is on vanilla civ with latest patch. I have a permanent alliance just recently started with Mao and there are a couple of wars going on. Rifling is about to be discovered on the NEXT (rifling has 1 turn to go before the crash) turn.


Thanks cf nz,

Here is the save
http://forums.civfanatics.com/uploads/20110/Latest.Civ4SavedGame

Edit: I am sorry if I bothered anyone with what turned out to be a simple fix. I needed to get rid of everything in my custom assets folder. Good day B-)

cf_nz
Feb 10, 2007, 05:35 PM
Supposedly my saved game it too large at 828 kb.Use the Easy Upload system. See image for link locations.

Ambreville
Feb 10, 2007, 06:27 PM
Finally got the dll file installed properly and is now running with Modern Warfare mod -- but got two asserts, as follows:

Assert Failed

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


Assert Failed

File: .\CvGame.cpp
Line: 6050
Expression: getBuildingClassCreatedCount(eIndex) <= GC.getBuildingClassInfo(eIndex).getMaxGlobalInstan ces()
Message: Index is expected to be within maximum bounds (invalid Index)


Both occurred while loading the mod and my scenario, after selecting the empire to be played on Warlord's menu. I had launched the game directly from my WB file.

Iustus
Feb 10, 2007, 10:57 PM
Finally got the dll file installed properly and is now running with Modern Warfare mod -- but got two asserts, as follows:

Assert Failed

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


This one is caused by a negative player index for a tech. Check your scenario file, you must have a typo on the player number you are giving a tech to.


Assert Failed

File: .\CvGame.cpp
Line: 6050
Expression: getBuildingClassCreatedCount(eIndex) <= GC.getBuildingClassInfo(eIndex).getMaxGlobalInstan ces()
Message: Index is expected to be within maximum bounds (invalid Index)

Both occurred while loading the mod and my scenario, after selecting the empire to be played on Warlord's menu. I had launched the game directly from my WB file.

The second one is cased by having more buildings than are legal for the XML. So, for example, if you give two civs the Pentagon, since in XML it says there should be only one. To avoid this error, you either need to change the XML, to make it legal to have more buildings, or change your scenario to only have the legal number of each building.

Take a look in Civ4BuildingClassInfos.xml

-Iustus

Iustus
Feb 10, 2007, 10:59 PM
Assert Failed

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

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

Unclear why...

Are you using the 1/30 build or the 2/9 build?

-Iustus

phungus420
Feb 10, 2007, 11:44 PM
The second one is cased by having more buildings than are legal for the XML. So, for example, if you give two civs the Pentagon, since in XML it says there should be only one. To avoid this error, you either need to change the XML, to make it legal to have more buildings, or change your scenario to only have the legal number of each building.

Take a look in Civ4BuildingClassInfos.xml

-Iustus

When the happens does it screw up the AI's logic then, or does the game just go on?

Iustus
Feb 11, 2007, 02:18 AM
When the happens does it screw up the AI's logic then, or does the game just go on?

To the extent that the AI might have some wrong thinking, it should be minor. It is entirely possible that there would be no problems at all, but I could not guarantee it.

The main thing with wonders, is whether you can build them or not, and in such a case, where you just gave multiple people the same wonder, it would still be the case that no one could build another. So that part should be working fine.

Now, if a city that has one gets razed, the right thing should happen, and I think it does, but that is the kind of problem you run into when you construct an invalid scenario.

I would say there is a 95% chance you are totally fine by placing more wonders than are valid, but there is still that 5% chance that something weird could happen.

Wonders are both tracked by how many are currently active and how many have ever been built. I am not sure to what extent that information is in the WB scenario file (there is definitely a lot of information lost going from a save game to a WB scenario file). If it is in the scenario file, you will want to be careful about adding and then removing wonders in worldbuilder, so this number gets out of sync, if you want the players to be able to build that wonder.

The best solution would be to mod the XML, but if you want to make a stand alone scenario, without its own XML, but using existing XML mod, I can see why this would not be an option.

I do not know what happens if you capture a city that has a 'world wonder' with a global effect (like the pentagon or statue of liberty) when you already possess such a wonder, but I suspect that you get a doubling of the effect (at least in some cases). The Three Gorges Dam would not have an doubling effect, because power is on or off, but having two pentagons might give you double the experience bonus.

This is the one purpose of each civ wonders, such as Wall Street or Oxford. These will be automatically destroyed when you capture an enemy city, so you do not get a double effect. If you are creating your own XML, then perhaps what you really want is a new each player wonder that has the same effect as an existing world wonder.

From the AI perspective, for the most part, the only consideration when looking at a city is whether it has active wonders, not much evaluation beyond that when picking a city target, so nothing should go wrong there.

Now if you want the AI to be smart enough to know it can raze a city with the Three Gorges Dam because it already has the bonus, it will likely see the city has an active wonder and probably keep the city.

-Iustus

Mannu
Feb 11, 2007, 11:54 AM
Assert Failed

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

----------------------------------------------------------
Click the Upgrade to Longbow button in the selected stack and then end the turn.

Mannu
Feb 11, 2007, 01:23 PM
I forgot to mention in my previous post, I am playing with jayrugh's unaltered gameplay mod. If this turns out to be a cause of the assert, I'll switch back to standard warlords, at least until the first stable release comes out.

Assert Failed

File: .\CvGlobals.cpp
Line: 1983
Expression: iDiplomacyNum > -1
Message: Index out of bounds

----------------------------------------------------------
To duplicate:
1) Trade Peace Treaty and Capitulation from Mansa Musa
2) Without closing the diplomacy window, click on Silk in the Trade items from Mansa.

jkp1187
Feb 11, 2007, 06:38 PM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11155
Expression: !(pBestPlot->isImpassable())
Message:



Occurs on 1982AD turn during AI movement.
Can't upload b/c exceeds forum limit -- will email upon request.

Iustus
Feb 11, 2007, 06:59 PM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11155
Expression: !(pBestPlot->isImpassable())
Message:



Occurs on 1982AD turn during AI movement.
Can't upload b/c exceeds forum limit -- will email upon request.

Can you post the save using the easy upload system?
http://forums.civfanatics.com/uploads/95686/uploadbutton.jpg

-Iustus

Golden Dragon
Feb 11, 2007, 09:42 PM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11040
Expression: !(pBestPlot->isImpassable())
Message:

----------------------------------------------------------
2/9 build

Iustus
Feb 12, 2007, 12:47 AM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11155
Expression: !(pBestPlot->isImpassable())
Message:



Occurs on 1982AD turn during AI movement.
Can't upload b/c exceeds forum limit -- will email upon request.

I have not seen the save yet, but this one is caused by a spy trying to path over a peak (or some feature marked impassible, like ice).

Assert Failed

File: .\CvUnitAI.cpp
Line: 11040
Expression: !(pBestPlot->isImpassable())
Message:

----------------------------------------------------------
2/9 build

This one is nearly the same, except is a missionary trying to path over a peak (or some impassable feature such as ice).

Are you playing with some other mod in addition? One that either adds some impassable features or that allows some units to path over peaks? Some mod which causes ice to form where it did not exist before? A new zamboni unit?

I really would like a save that does this, especially if you are not using any other mod.

-Iustus

Iustus
Feb 12, 2007, 01:54 AM
Hi Iustus, Blake anyone, else playing betterAI..did anyone play with RAGING BARBARIANS options enabled? i get a CTD either on map creation or first couple of turns..can anyone second this?

I tested for some time with the 2/9 build, no problems with raging barbarians.

-Iustus

jkp1187
Feb 12, 2007, 06:17 AM
Can you post the save using the easy upload system?
http://forums.civfanatics.com/uploads/95686/uploadbutton.jpg

-Iustus

http://forums.civfanatics.com/uploads/50676/AutoSave_AD-1981.CivWarlordsSave

gnome
Feb 12, 2007, 06:26 AM
Build 2/9, Warlords
Mods:
Better AI Balancer
Look & Feel (fixed python code from previous error)
Bad Ronald's Flags

Assert Failed

File: .\CvGlobals.cpp
Line: 1081
Expression: eLeaderHeadNum > -1
Message:

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

http://forums.civfanatics.com/uploads/23357/Elizabeth_AD-1474.CivWarlordsSave

Action: End Turn

herwin
Feb 12, 2007, 08:27 AM
Are you using the 1/30 build or the 2/9 build?

-Iustus

1/30 build. I've since upgraded to 2/9.

Golden Dragon
Feb 12, 2007, 11:18 AM
This one is nearly the same, except is a missionary trying to path over a peak (or some impassable feature such as ice).

Are you playing with some other mod in addition? One that either adds some impassable features or that allows some units to path over peaks? Some mod which causes ice to form where it did not exist before? A new zamboni unit?

I really would like a save that does this, especially if you are not using any other mod.

-Iustus


I am not using a mod, end turn to get error. Here is the save:

http://forums.civfanatics.com/uploads/110389/Golden_Dragon_1.CivWarlordsSave

Iustus
Feb 12, 2007, 04:48 PM
Assert Failed

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

----------------------------------------------------------
Click the Upgrade to Longbow button in the selected stack and then end the turn.

This one is caused by a flaw in the CIV4DiplomacyInfos.xml that is part of jrayUGH mod. It is actually missing the AI_DIPLOCOMMENT_OFFER_VASSAL diplomacy info entry. This means that the AI tries to offer someone to be their vassal (not in war), and it fails because the XML does not have that sort of diplomacy info.

I forgot to mention in my previous post, I am playing with jayrugh's unaltered gameplay mod. If this turns out to be a cause of the assert, I'll switch back to standard warlords, at least until the first stable release comes out.

Assert Failed

File: .\CvGlobals.cpp
Line: 1983
Expression: iDiplomacyNum > -1
Message: Index out of bounds

----------------------------------------------------------
To duplicate:
1) Trade Peace Treaty and Capitulation from Mansa Musa
2) Without closing the diplomacy window, click on Silk in the Trade items from Mansa.

This one is similar, this time USER_DIPLOCOMMENT_VASSAL_TRIBUTE is missing from the same file.

It appears in both cases that someone converted the Vanilla file to Warlords without adding in the new diplomacy trades possible with warlords. If you run these mods, you will never get spontaneous offers for vassalship or capitulation, because the diplomacy infos for them do not exist. (They will try, but it fails along the way).

This is from the file, giving the people to contact for a fix:
Part of: jrayActualQuotes-v208a (diplomacy text with actual quotes from leaders)
jrayUGH-v208b (jray's Unaltered Gameplay Hodgepodge)
Based on: ActualQuotes(Willowmound)-v3.5 ("Diplomacy text: ActualQuotes for Warlords", http://forums.civfanatics.com/showthread.php?t=181857)


-Iustus

jray
Feb 12, 2007, 04:57 PM
This is from the file, giving the people to contact for a fix:
-Iustus

Got it, thanks. I'll try to fix it in my next jrayUGH version. Nice to see folks using my modpack, but sorry for the extra traffic in asserts :).

FYI, I was just about to report the same thing. When this happens, the AI still contacts you, but all you see is their generic greeting (as if you had just clicked on their name to contact them). But if you know what's going on, you will notice the Vassal State option is enabled.

I haven't gotten around to testing whether this occurs without Better AI-- I'm curious, have you determined that?

Iustus
Feb 12, 2007, 05:12 PM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11155
Expression: !(pBestPlot->isImpassable())
Message:

Occurs on 1982AD turn during AI movement.
Can't upload b/c exceeds forum limit -- will email upon request.

http://forums.civfanatics.com/uploads/50676/AutoSave_AD-1981.CivWarlordsSave

I could not duplicate this. Did you accept the war declaration or deny it? What other actions did you take? If you can load your save, and duplicate the problem, please upload a save that is right before end turn, so I can get the same behavior. (Or describe what you did, exactly, in the order of each unit you moved).

-Iustus

Iustus
Feb 12, 2007, 05:32 PM
Got it, thanks. I'll try to fix it in my next jrayUGH version. Nice to see folks using my modpack, but sorry for the extra traffic in asserts :).

FYI, I was just about to report the same thing. When this happens, the AI still contacts you, but all you see is their generic greeting (as if you had just clicked on their name to contact them). But if you know what's going on, you will notice the Vassal State option is enabled.

I haven't gotten around to testing whether this occurs without Better AI-- I'm curious, have you determined that?

It should still happen without BetterAI, as it is clearly missing XML. You just will not get any warning. (Running the same save without BetterAI probably wont do it in the same place, unless you really lucky and the randoms line up).

It seems clear that the new diplomacy infos are missing, someone converted from a Vanilla mod and left them out. It probably would not be a bad idea to use a comparison utility like WinMerge to check all your XML files vs the default ones in Warlords to see if something new was left out.

There is at least one new thing in warlords in python as well, the gold from pillaging is now in python, so you might want to check people that mod that python file to make sure they included the changes as well.

-Iustus

Iustus
Feb 12, 2007, 05:34 PM
Build 2/9, Warlords
Mods:
Better AI Balancer
Look & Feel (fixed python code from previous error)
Bad Ronald's Flags

Assert Failed

File: .\CvGlobals.cpp
Line: 1081
Expression: eLeaderHeadNum > -1
Message:

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

http://forums.civfanatics.com/uploads/23357/Elizabeth_AD-1474.CivWarlordsSave

Action: End Turn

I could not duplicate this error with just the LookAndFeel mod and BetterAI. Could you post your mod somewhere? In any case, I suspect something in your mod is causing this.

In the future, I would suggest you rename your mod folder, if you are going to make changes (so rather than naming your combo mod LookAndFeel mod, name it gnomeMod or something).

-Iustus

Iustus
Feb 12, 2007, 05:57 PM
Assert Failed

File: .\CvUnitAI.cpp
Line: 11155
Expression: !(pBestPlot->isImpassable())
Message:



Occurs on 1982AD turn during AI movement.
Can't upload b/c exceeds forum limit -- will email upon request.

As I said before, I could not duplicate this one, but I suspect it is caused by the same thing, considering the year, and what I found with the following one.

Assert Failed

File: .\CvUnitAI.cpp
Line: 11040
Expression: !(pBestPlot->isImpassable())
Message:

----------------------------------------------------------
2/9 build

I am not using a mod, end turn to get error. Here is the save:

http://forums.civfanatics.com/uploads/110389/Golden_Dragon_1.CivWarlordsSave

This turns out to be a harmless assert, I am just going to remove the assert, it does not seem to be serving a purpose. The assert is triggered when a submarine with a unit aboard goes under ice.

-Iustus

Iustus
Feb 12, 2007, 05:58 PM
Hello, I like all the changes being made in this *mod

I have a saved game that crashes me to desktop as soon as I end my turn. It does this repeatedly. I have no clue what could be causing it or I would say. It's a great game though that I'd love to continue.

Edit: Supposedly my saved game it too large at 828 kb. All I can add is that there are no other mods running, this is on vanilla civ with latest patch. I have a permanent alliance just recently started with Mao and there are a couple of wars going on. Rifling is about to be discovered on the NEXT (rifling has 1 turn to go before the crash) turn.


Thanks cf nz,

Here is the save
http://forums.civfanatics.com/uploads/20110/Latest.Civ4SavedGame

Nice to see some people are making use of the vanilla version, even if it is slightly more effort for me to run the saves. Good report, this was a crashing bug in both Warlords and Vanilla (although tricky to generate).

-Iustus

Uncle_Joe
Feb 12, 2007, 06:01 PM
For whatever reason, renaming the LookAndFeel folder to anything else seems to introduce all sorts of problems. I tried doing it and eventually gave up and went back to the default name. Something in the included .ini file might be trying to reference that exact directory.

Iustus
Feb 12, 2007, 06:52 PM
New build posted 2/12 (http://forums.civfanatics.com/showpost.php?p=5096738&postcount=38)

-Iustus

Iustus
Feb 12, 2007, 06:58 PM
For whatever reason, renaming the LookAndFeel folder to anything else seems to introduce all sorts of problems. I tried doing it and eventually gave up and went back to the default name. Something in the included .ini file might be trying to reference that exact directory.

You might want to report this to the LookAndFeel developers. This is something that they could certainly fix, if they desired to do so.

-Iustus

Willowmound
Feb 12, 2007, 08:07 PM
It appears in both cases that someone converted the Vanilla file to Warlords without adding in the new diplomacy trades possible with warlords. If you run these mods, you will never get spontaneous offers for vassalship or capitulation, because the diplomacy infos for them do not exist. (They will try, but it fails along the way).


A fix for this is now available here (http://forums.civfanatics.com/downloads.php?do=file&id=4145).

gnome
Feb 12, 2007, 09:04 PM
You might want to report this to the LookAndFeel developers. This is something that they could certainly fix, if they desired to do so.

-Iustus

I don't believe the original developer is still working on it. He pieced it together from two other major interface/graphics mods, because he found he could do so quickly.

He's been helpful on various issues but whether he wants to perform any further maintenance is for him to say of course :) I love the mod... I'd take over but I don't know any xml and python.

I will post a copy of my mod folder from home for you to examine.

Cyrus_the_Great
Feb 12, 2007, 09:22 PM
Warlords 2.08
Single Player
Continents
Temperate
Low
Standard
---------------------
Carthaginian Empire
Diff: warlord
Speed: normal

580AD: I moved my Numidian Cavaly next to my workers on the hill to the SE. At that moment the PC locked up.

Assert Failed

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

I selected 'Ignore Once' and continued to play. I forgot that the autosave deletes the oldest save as you continue to play and trigger more autosaves. Because of this, I only have the 600AD autosave, which is after the assert. I will be more careful to report soon after the restart of my game.

gnome
Feb 13, 2007, 06:42 AM
I could not duplicate this error with just the LookAndFeel mod and BetterAI. Could you post your mod somewhere? In any case, I suspect something in your mod is causing this.

In the future, I would suggest you rename your mod folder, if you are going to make changes (so rather than naming your combo mod LookAndFeel mod, name it gnomeMod or something).

-Iustus

Here it is, you'll need winzip 10...

Access 'Shared ' on my Xdrive (http://plus.xdrive.com/u/1216143066/370376119GgYGQAzdhgZdifI08cJ)

Extract to C:\ root directory with "Use folders" checkmarked and it will place it in its required mod directory.