View Full Version : Specific Bug Reports


Pages : [1] 2

Iustus
Jan 25, 2007, 03: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, 03: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, 03:27 PM
--- reserved ---

Iustus
Jan 25, 2007, 07: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, 09: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 25, 2007, 11:51 PM
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, 07: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, 07: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, 08: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, 09: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, 09: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, 09: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, 11:50 AM
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, 12: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, 12: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, 12: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, 12:45 PM
Thanks for the clarification.

Quagga
Jan 26, 2007, 08: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, 09: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, 03: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, 03: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, 05: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, 05: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, 09: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, 09: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, 10: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, 10: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, 11:05 AM
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, 11:19 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)

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, 11: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.)

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, 11:37 AM
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, 11:37 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 :)

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, 12: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, 12: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, 12: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, 01: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, 01: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, 01: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, 03: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, 04:12 PM
Darrelljs, that looks to me like a XML problem, not a betterAI issue

Quagga
Jan 27, 2007, 05: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, 05: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, 05: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, 05: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, 06: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, 06: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, 06:21 PM
iHippyFactor

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

mrgenie
Jan 27, 2007, 06: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, 08: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, 08: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, 10: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, 10: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, 04: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, 06: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, 06: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, 07: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, 07: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, 07: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, 07: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, 07: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, 08: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, 11:18 AM
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, 11:33 AM
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, 12: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, 01: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, 02: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, 02:31 PM
Assert Failed

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

cymru_man
Jan 28, 2007, 02: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, 03: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, 03: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, 04: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, 04: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, 04: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, 05: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, 05: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, 06: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, 07: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, 08: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, 09: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, 10: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, 10: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, 04: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, 06: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, 06:07 AM
Hrm. It doesn't let me include the savegame, because it's too large even zipped.

mrgenie
Jan 29, 2007, 06: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, 07: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, 08: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, 08: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, 08: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, 12: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, 12: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, 12: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, 01: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, 01: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, 03: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, 03: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, 04: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, 05: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, 05: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, 05: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, 06: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, 06: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, 06: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, 07: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, 07: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, 08: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, 04: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, 05: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, 07: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, 11:31 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.

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, 11:49 AM
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, 12: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, 12: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, 12: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, 02: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, 02: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, 03:17 PM
A couple of games completed (1/29) and

NO ASSERTS FAILED !!!

Roland Johansen
Jan 30, 2007, 04: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, 04: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, 04:49 PM
Awesome. Thanks, Iustus!

gnome
Jan 31, 2007, 06: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, 12: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, 12: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, 12: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, 03:26 PM
Unable to post save due to size exceeds 500kb.

Use the Upload tab between Chat and FAQ.

JBConquests
Jan 31, 2007, 05: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, 05:44 PM
Nevermind. I see that Iustus said I did not need to report 5409. That's what this was...

gnome
Feb 01, 2007, 04: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, 02: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, 04: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, 04: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 01, 2007, 11:05 PM
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, 02: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, 09: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, 10: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, 02: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, 04: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, 06: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, 06: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, 06: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, 09: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, 08: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, 08: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, 09: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, 09: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, 01: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, 02: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, 03: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, 04: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, 05: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, 10: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, 12: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, 01: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 Dis