Single Player bugs and crashes v38 plus (SVN) - After the 20th of February 2018

I don't get what you're problem is. How can the animal have moved between me moving my unit and hitting the space key?

The only recalc I know is ctrl-shift-T, and it takes over 10 minutes. So great advice that I should do this every time my hunter (well every unit really) moves one tile. :rolleyes:
Ah, I misunderstood your first post, I thought you meant the animal shows up on the next game turn.
The recalc thing I mentioned was just a way to prove the bug with a save game that you could upload, so that TB could load the save, look at the unit in question, and hit recalc to see the animal become visible and thus proving the bug in action making it easier to debug.
I was just outlining a way for you to report a bug properly, it was not advice for how you should play the game.

If the animal shows up after you hit wait/fortify/sleep a unit, then the bug may not be possible to prove with a save game as loading a save probably makes the animal visible without a recalc...
Khmer city name still (10528) coming up "I?varapura".
Another char that the game don't support: ś
 
Last edited:
10539
Reenabled highest culture level - Monumental.
On Blitz/Eternity you need 800 000/16 000 000 culture to reach this level. Upper city limit for culture is around 21 000 000.
That is you will always reach this culture level before hitting cap.

This one was added back in 2014 to prevent overflow with "no espionage" game option, but that option only increases "velocity" of culture anyway.
Since then actual cap to city culture was added.
Why did you re-enable this particular culture overflow bug?

With No Espionage game option, a city needs to accumulate 32 000 000 culture to reach monumental culture level on eternity gamespeed.
That is because the No Espionage gameoption doubles the needed culture to reach a cultural level.

I'm pretty sure TB's latest change doesn't increase the upper limit of total culture that a city can accumulate, it increases the total culture that a nation can get. Meaning the total culture of all cities put together.
Latest SVN:
Code:
int CvGame::getCultureThreshold(CultureLevelTypes eLevel) const
{
    int iThreshold = GC.getCultureLevelInfo(eLevel).getSpeedThreshold(getGameSpeedType());
    if (isOption(GAMEOPTION_NO_ESPIONAGE))
    {
        //Alberts2: made this a long because a integer overflow is possible here.
        long lThreshold = iThreshold;
        lThreshold *= 100 + GC.getDefineINT("NO_ESPIONAGE_CULTURE_LEVEL_MODIFIER");
        lThreshold /= 100;
        iThreshold = std::min((long)INT_MAX, lThreshold);
    }
    return iThreshold;
}
NO_ESPIONAGE_CULTURE_LEVEL_MODIFIER = 100
 
Last edited:
@Thunderbrd I was testing new national culture scaling (complex leaders), so to speed up process I bumped up palace culture production.
It seems like culture "velocity" calculation overflows somewhere.

You can't generate more than 100 000 culture per turn.

I added file with modified Palace NW so you can test it out by doubling culture output.
As for modifiers I had to counter initial reduction in culture.
There should be no problem with cities overflowing at 100000 culture per turn as cities should never be capable of that. This only works to protect against national culture totals overflowing. Not local.
 
Why did you re-enable this particular culture overflow bug?

With No Espionage game option, a city needs to accumulate 32 000 000 culture to reach monumental culture level on eternity gamespeed.
That is because the No Espionage gameoption doubles the needed culture to reach a cultural level.

I'm pretty sure TB's latest change doesn't increase the upper limit of total culture that a city can accumulate, it increases the total culture that a nation can get. Meaning the total culture of all cities put together.
Latest SVN:
Code:
int CvGame::getCultureThreshold(CultureLevelTypes eLevel) const
{
    int iThreshold = GC.getCultureLevelInfo(eLevel).getSpeedThreshold(getGameSpeedType());
    if (isOption(GAMEOPTION_NO_ESPIONAGE))
    {
        //Alberts2: made this a long because a integer overflow is possible here.
        long lThreshold = iThreshold;
        lThreshold *= 100 + GC.getDefineINT("NO_ESPIONAGE_CULTURE_LEVEL_MODIFIER");
        lThreshold /= 100;
        iThreshold = std::min((long)INT_MAX, lThreshold);
    }
    return iThreshold;
}
NO_ESPIONAGE_CULTURE_LEVEL_MODIFIER = 100
Well then city will never reach that level with "no espionage" option - it will cap out at ~21 000 000 culture, as this is a thing for a while.
I started game on Eternity with No Espionage option and yeah looks like it causes some glith.
Spoiler :

Civ4BeyondSword 2019-04-19 17-21-21-06.jpg


I can revert change then.

There should be no problem with cities overflowing at 100000 culture per turn as cities should never be capable of that. This only works to protect against national culture totals overflowing. Not local.
So city can't accumulate culture anymore if it would gain more than 100 000 culture per turn?
I guess I can't test national culture quickly.
 
Last edited:
Well then city will never reach that level with "no espionage" option - it will cap out at ~21 000 000 culture, as this is a thing for a while.
There's a good reason why that cultural level was commented out, and that reason was explained in the comment.
I started game on Eternity with No Espionage option and yeah looks like it causes some glith.
The culture needed for Monumental culture will be a random number, as there will be an integer overflow every time the dll calculates its value.
 
Last edited:
There's a good reason why that cultural level was commented out, and that reason was explained in the comment.
It was generic warning about overflow, I didn't knew that No Espionage option doubles requirements for culture levels.

Since you can't get more than 21 000 000 culture in city I thought it would be simply unreachable or something without any other consequences.
 
Well then city will never reach that level with "no espionage" option - it will cap out at ~21 000 000 culture, as this is a thing for a while.
I started game on Eternity with No Espionage option and yeah looks like it causes some glith.

I can revert change then.


So city can't accumulate culture anymore if it would gain more than 100 000 culture per turn?
I guess I can't test national culture quickly.
Its not a new limit, just an undiscovered one that results from the use of decimals without any protections from overflow in that spot since its beyond expected needs.
 
passed 3 turns with T-6000 save. no crash. checked my dll, its at svn 10523. I might update and try again.
I reverted to 10523 (figured it was a long shot but might as well try), no dice. Would you mind posting a save from the start of the next turn? I'm curious whether it'll keep crashing for me; whether it's some weird setting or error I have breaking things on a save that's perfectly fine, or whether it's something going a bit wonky with the file or game data itself that my copy can't handle for whatever reason.
 
I don't know if you want to play that save. I forgot to turn autosave on so this is like 3 or 4 turns later and I wasn't really playing.
so this isn't a repeatable right? maybe im not getting crash because im not playing - just ending turn
 

Attachments

Thanks, I've played 5-ish turns and no repeat of the crash so far (though the worldbuilder still isn't a fan of me prodding at Denmark's cities with the erase tool). I think I'll have a go at carrying on with it, if the crash comes back I might have to write off the game but I figure it's worth a shot.
 
BTW, I've seen a logic flaw I made in the calculation to the next level after 1 million is needed. Just in case someone wants to call me on it, I already know its there and I plan to address it very soon.
 
Re-peatable CTD - - mini and save in zip . . crash in near end of turn if that helps / /
Looks like Noble AI is finally better than you.

You are half of era behind calendar.
All AIs except one is in Industrial era - tech leader is in Atomic era.
You have TD and or WFL on, so everyone is very close to each other tech wise.
You could have like 5 or 6 more cities on your territory.

This must be interesting game.

How long turn times are in this game?

This save has food display bug - I suspect food changing traits have improperly formatted food related texts in code.
Same thing is happening with great people.
Spoiler :

Civ4BeyondSword 2019-04-20 16-41-40-39.jpg

 
Last edited:
Re-peatable CTD - - mini and save in zip . . crash in near end of turn if that helps / /
As with all crashes, I will look at it as soon as I can.

@raxo2222 I have those bugs on the shortlist to address.
 
Last edited:
1.8 minutes
Not bad for this stage.
Since space maps (ones with Large Earth variant) have similar amount of AIs and ~10% smaller Earth map, then turn times would be 1.5 - 2 minutes per turn when player researches Advanced Rocketry :D.
Kation is remaking smaller spacemaps - those would have even shorter turn times.

You could browse internet for a bit while turn is processed, just have windowed mode enabled so you can alt+tab quickly.
 
Back
Top Bottom