FfH2 Bug Thread

hi all!

Again the annoying me ^^

i am currently playing the svartalvar (or dark elves) and i have a mine under my control that sits atop an iron resouce, but it is not recocnized by the game ... Still telling me, i got no iron ... Save game attached, eventually this is a bug ...

I guess the tooltip needs to be reworked, as smelting tech states, that is reveals iron, which it does, but the resource is not shown in the city screen, iron working is being researched right now, but the tooltip does not state, that this tech is required to gain access to this resource ...

Anyways, happy new year to every1 ...

Regards

hahnholio

ok, disregard this post, after researching iron working, the resource shows and all is fine :)
 
Okay, I'll be sure to keep letting you know how things have been going. Thus far, I've had to do 4 tiger deletions this game. I'm saving between every turn, and the last 2 times it's been 2-3 turns between crashes.

Thanks! I suspect the developers will find this useful!

Best wishes,

Breunor
 
Ben,

I generally don't try to 'fix' games on huge maps, it just takes too long. As you did, I poked around for 'obvious' issues.

One common bug we have seen if that the game crashes after the Avatar of Wrath appears. I'm not sure if this event has happenend in your game; the AC is at 89, and there are some units in the middle of the map that looks like they have turned barbarian. Conversely, there should be more barbarian units if the Avatar of Wrath appeared and I don't see it on the map.

If you did run into the Avatar of Wrath bug, I've never been able to fix it.

Sorry.

Breunor

Thanks for taking a look. I just wanted to post it in case it'd help fix a bug for everyone else. But I'm confident I'd won that game, so no big deal.
 
Hello,

I'm not sure the best way to debug this, but it appears that in the attached savegame the game will consistently crash then the new turn starts. I suspect it might have something to do with the AI Hippus casting Rust or Summon Tiger, but maybe that has nothing to do with it.

To reproduce:
Load game.
Hit Enter to end turn.
Civilization crashes.

It seems to happen more or less consistently, though I may have set the options to new random seed at reload, so perhaps it might rarely not crash. I have the blue marble terrain on if that makes any difference.
 

Attachments

  • Hyborem AD-0348.CivBeyondSwordSave
    429.2 KB · Views: 45
Hello,

I'm not sure the best way to debug this, but it appears that in the attached savegame the game will consistently crash then the new turn starts. I suspect it might have something to do with the AI Hippus casting Rust or Summon Tiger, but maybe that has nothing to do with it.

To reproduce:
Load game.
Hit Enter to end turn.
Civilization crashes.

It seems to happen more or less consistently, though I may have set the options to new random seed at reload, so perhaps it might rarely not crash. I have the blue marble terrain on if that makes any difference.

I was a little amused at your post - no, it is not the rust spell, it is the summoned tiger bug causing the crash. Specifically it was being caused by the tiger in the Hippus city of Radonnor. I removed it. However, we don't knwo yet if this means you will run into more summoned tiger bugs later so please let us know.

Here is a fixed file.

Best wishes,

Breunor
 

Attachments

  • Hyborem ADv2-0348.CivBeyondSwordSave
    429.2 KB · Views: 46
Not sure if I've posted this already, but switching from a religion back to "No State Religion" crashes the game 100% of the time. Apparently due to an alignment issue. Suggest that adopting No State Religion changes your alignment towards neutral as a quick fix. This will not affect Grigori or Illians as they will not be able to adopt a religion in the first place, but will fix a somewhat frustrating bug.
 
This isn't exactly a major bug, but it can cause a crash, so I thought I'd post it here anyway.

For the Dungeon Adventure scenario, you get a crash if the Khazad AI civ is on the map after Turn 40. When using a debug DLL to trace this problem, I discovered why. It's this bit of code's fault, in CvPlayerAI::AI_goldTarget():

Code:
        if (bIncludeForcedGold)
        {
            if (getCivilizationType() == GC.getDefineINT("CIVILIZATION_KHAZAD"))
            {
                int addGold=0;
                int iNumCities = getNumCities();
                if (GC.getDefineINT("TECH_TAXATION") != NO_TECH)
                {
                    if (isHasTech(GC.getDefineINT("TECH_TAXATION")))
                    {
                        addGold += iNumCities * 150;
                    }
                }
                if (GC.getDefineINT("TECH_TAXATION") != NO_TECH && GC.getDefineINT("TECH_FESTIVALS") != NO_TECH)
                {
                    if (isHasTech(GC.getDefineINT("TECH_WAY_OF_THE_EARTHMOTHER")) || isHasTech(GC.getDefineINT("TECH_FESTIVALS")))
                    {
                        addGold += iNumCities * 150;
                    }
                }
                [COLOR="Red"]CvCity* pCity = getCapitalCity();
                if (pCity->getPopulation() < 6 && pCity->angryPopulation(1) > 0 && pCity->foodDifference(false) > 1)
                {
                    addGold+=getGold();
                }
                iGold += addGold;[/COLOR]
            }
        }

bIncludeForcedGold is only set to true if it's turn 40 or later. So this assumes that the Khazad will have a capital city after turn 40. Unfortunately, there are three circumstances where this might not be possible:

1. If the game has Require Complete Kills turned on, with a Khazad AI that has lost all of its cities. (This is pretty unlikely, but not impossible).
2. If the game has a Khazad AI that has not yet settled by turn 40 (Even less likely to happen).
3. If the game is a scenario where there is a Khazad AI with no cities (like Dungeon Adventure, would only happen in modmods).

The reason I'm mentioning this is because this will cause a crash if the capital city doesn't exist, because it will try to call getPopulation(), angryPopulation(), and foodDifference() for a nonexistant city, cause an unhandled exception, and then a crash. I fixed it by adding this check:

Code:
                [COLOR="red"]if (iNumCities > 0)
                {[/COLOR]
                    CvCity* pCity = getCapitalCity();
                    if (pCity->getPopulation() < 6 && pCity->angryPopulation(1) > 0 && pCity->foodDifference(false) > 1)
                    {
                        addGold+=getGold();
                    }
                    iGold += addGold;
                [COLOR="red"]}[/COLOR]
 
bIncludeForcedGold is only set to true if it's turn 40 or later. So this assumes that the Khazad will have a capital city after turn 40. Unfortunately, there are three circumstances where this might not be possible:

1. If the game has Require Complete Kills turned on, with a Khazad AI that has lost all of its cities. (This is pretty unlikely, but not impossible).
2. If the game has a Khazad AI that has not yet settled by turn 40 (Even less likely to happen).
3. If the game is a scenario where there is a Khazad AI with no cities (like Dungeon Adventure, would only happen in modmods).
This can occur in any game (although, as you said, rarely) so it definitely needs to be fixed. I haven't had it happen to me (yet), and I don't think it's been reported, but someone is bound to experience it eventually.

Spoiler - How condition #2 can occur :
On the first turn the AI picks a destination for its settler and begins to move toward it. If, before that settler can build the capital, another city appears that either prevents the AI settler from reaching its destination or renders that destination an invalid city site then the AI settler will just stand around. No city is founded, and so no capital exists. In most such cases, one cultural expansion of the blocking city will move the settler to a valid city site, and the AI will found its capital there. However, it is possible for the first cultural expansion to move the settler to a position where it cannot found a city (the four tiles at the corners of the city's BFC). If that occurs, the settler will sit idle until the second cultural expansion takes place - which for non-Creative leaders who are not using the Religion civic will not be until turn 50 (in standard speed games). This would trigger condition #2, if the blocked civ happened to be the Khazad.
 
I was a little amused at your post - no, it is not the rust spell, it is the summoned tiger bug causing the crash. Specifically it was being caused by the tiger in the Hippus city of Radonnor. I removed it. However, we don't knwo yet if this means you will run into more summoned tiger bugs later so please let us know.

Here is a fixed file.

Best wishes,

Breunor

Thanks,

Is there a trick for determining the underlying issue when this happens (perhaps a FAQ somewhere)? I'm kind of ignorant when it comes to debugging python/Civ4 mods. I assume the Visual Studio debugger isn't going to help.
 
Thanks,

Is there a trick for determining the underlying issue when this happens (perhaps a FAQ somewhere)? I'm kind of ignorant when it comes to debugging python/Civ4 mods. I assume the Visual Studio debugger isn't going to help.

No, we don't have a 'crash' FAQ. I have a complation of bug thread, last updated about a month ago.

http://forums.civfanatics.com/showthread.php?t=329991

My guess is that the tiger bug causes the most crashes reported, with the hill giant bug also fairly common. After that, we have the two elephants bug, and culture expnds bug (often when culture expands to include barbarian features, a bug occurs.) These bugs are difficult in that it isn't clear exactly what spawns them, for instance, not every summoned tiger causes a crash. Very large stacks often cause bugs, obviously this issue is very complex since there are often over 200 units to check for issues.

Some bugs seem too occur all of the time, for instance the 'switch to no religion' bug and the harlequin use of the 'taunt' spell. Also, soon after the Avatar of Wrath appears, we often get a crash.

There are many other specifics in the bug compilation thread but iirc these are the predominant ones.

Best wishes,

Breunor
 
Back to Spectres and Fear. A Solider of Kilmorph killed one and after the fact, a message came up that the Solider was afraid to attack. A little late. I think I may have reported this before. No, not my last post. patch j.
 
Had a bit of an oddity the other night - my scout searched a lair, but was caged. Before I had the opportunity to get another unit over to release him the nearby cultural borders of the Kuriotates expanded - including the tile he was on.

As open borders had not been agreed, the unit was moved to a different location - but there was then no way to release him from the cage (though thinking about it I didn't check to see if the button appeared on the original tile that the lair was on)
 
Top Bottom