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

The number spawned is or should be based on the population of the city not the number of defenders. It should increase if there are buildings that represent an arms cache eg an arsenal.

It would be nice if we could spawn units of the correct str for the stage the nation is at.

Fixing the spawn on water I thought I had done. Obviously not. Put back on my list.

Other things still on my list for that mechanic are
  • if settled military GP exist in the city there is a change that they spawn as a partisan leader (Military Instructors, Gladiators etc.)
  • if settled health GP exists may spawn support units for the partisans
  • creation of an underground/insurgent/fifth column in the city...
  • evacuation of populace and national wealth before the armies get to the city ie other settled GPs and any national treasures eg art works. ie Refugees and treasures maybe with escorts.
  • make Myths and Stories (but not Story) owned by the nation not an individual city
  • allow partisans to upgrade (only in friendly cities) to regular units
Yeah I guessed it was based on the city size. Then again, given how poorly/incompetently it was defended, why not have partisans spawn for the attacker (or should I say "liberator" lol) in protest?

These additions seem cool, but obviously imbalanced. How impossible are you trying to make it to conquer a city? Frankly I think I deserve some kind of reward for taking a 50+ size city from a civ two eras ahead (even if they did make it easy).
 
Sorry, I was not aware that savegames save file system information like folder names. I am suing the latest patched version of Civ, and the game loads just fine on my end. But I do use symlinked and custom-named Caveman to Cosmos folder: C2C.
It took me several minutes to work out that 'suing' meant 'using'. By latest patched version, do you mean an SVN version, and if so what number?
 
Sorry, I was not aware that savegames save file system information like folder names. I am suing the latest patched version of Civ, and the game loads just fine on my end. But I do use symlinked and custom-named Caveman to Cosmos folder: C2C.
Don't use any symlinks or custom names here.
It always should be Caveman2Cosmos, civ4 was released in 2004 before Vista was out.
 
It took me several minutes to work out that 'suing' meant 'using'. By latest patched version, do you mean an SVN version, and if so what number?

Sorry about the typo. The version is in my original post: "rev. 10389"
 
Sorry about the typo. The version is in my original post: "rev. 10389"

Ok sorry that's my bad...

Would you consider changing your mod folder to "Caveman2Cosmos" since it makes debugging much easier? I think your report is a very 'juicy' one for @Thunderbrd that he would love to fix, but I would encourage you not to make it harder for him.

I will take a look into it as soon as you've confirmed that the problem still exists on the latest SVN version.
Just checking that you're aware this is confirmed now (actually all along).
 
Just checking that you're aware this is confirmed now (actually all along).
I dunno - patches were mentioned so I assumed it wasn't SVN. I'll take a look at it when I can later this weekend most likely.
 
SVN 10393
Big Bug.
Barbarian AI does not attack new cities. Founded a new city with just a Stone axe and trained dog. Barbarian Obsidian units totaling 30+ units will not attack the city. They will pick off a worker or a single unit but they will not attack the city.

2 screenshots, 1st is when the city just had the Stone axe and Trained dog. The 2nd is many turns later were I have brought in some of my own Obsidian units and/or upgraded existing Stone units. Still this stack of Barb Obsidian units just dances around the City's perimeter. I should have been wiped out and the adjacent city as well.

Save game attached.
 

Attachments

  • Civ4ScreenShot0077.JPG
    Civ4ScreenShot0077.JPG
    390.9 KB · Views: 36
  • Civ4ScreenShot0084.JPG
    Civ4ScreenShot0084.JPG
    406.6 KB · Views: 71
  • Emperor Normal BC-6698.7z
    Emperor Normal BC-6698.7z
    1.3 MB · Views: 41
SVN 10393
Big Bug.
Barbarian AI does not attack new cities. Founded a new city with just a Stone axe and trained dog. Barbarian Obsidian units totaling 30+ units will not attack the city. They will pick off a worker or a single unit but they will not attack the city.

2 screenshots, 1st is when the city just had the Stone axe and Trained dog. The 2nd is many turns later were I have brought in some of my own Obsidian units and/or upgraded existing Stone units. Still this stack of Barb Obsidian units just dances around the City's perimeter. I should have been wiped out and the adjacent city as well.

Save game attached.
Can they even attack the city when it has full defenses up? They don't have anything in that stack to reduce defenses so I'm wondering if minimum defense level to invade keeps them from being able to attack.

I've seen some attack stacks do something similar and usually it's when they are being led by a unit that cannot fully take a city, like a unit with a combat limit or something. This stack doesn't seem to have that problem. I do have to wonder if the odds are just really bad for them on that first attack though since you have a fairly strong def level and they have nothing to break it down.

This kind of AI issue is the sort of issue that waits for a major future overhaul generally because there's no such thing as a quickfix to this sort of thing usually. Not to say I won't look into it at some point soon. It might just be that this stack's AI isn't meant to attack cities so much as just raid plots and be a pain.
 
Would you consider changing your mod folder to "Caveman2Cosmos" since it makes debugging much easier?

I certainly can, but that would not affect the savegames, meaning if I change the folder name I would no longer be able to load that game. So, I am not sure how it would help in this particular case.

Also, I wanted to add, this does not seem to be a rare bug. In this game alone it happened 4 times already, and I am not ven into Classical era yet. Had to kill 2 players as a result to let the game progress. And, I recall it was happening before in the 2017 and 2018 builds, especially towards late game.
 
I certainly can, but that would not affect the savegames, meaning if I change the folder name I would no longer be able to load that game. So, I am not sure how it would help in this particular case.

Also, I wanted to add, this does not seem to be a rare bug. In this game alone it happened 4 times already, and I am not ven into Classical era yet. Had to kill 2 players as a result to let the game progress. And, I recall it was happening before in the 2017 and 2018 builds, especially towards late game.
Probably because folder name wasn't Caveman2Cosmos
 
I might have more precisely isolated the piece of code that causes game to hang:

Code:
>    CvGameCoreDLL.dll!getUnit(IDInfo unit={...}) Line 205    C++
     CvGameCoreDLL.dll!CvSelectionGroup::getHeadUnit() Line 7827    C++
     CvGameCoreDLL.dll!CvUnit::canJoinGroup(const CvPlot * pPlot=0x0faa4b1c, CvSelectionGroup * pSelectionGroup=0x4aca7900) Line 18497    C++
     CvGameCoreDLL.dll!CvUnit::joinGroup(CvSelectionGroup * pSelectionGroup=0x0faa4b1c, bool bRemoveSelected=false, bool bRejoin=true) Line 18578    C++
     CvGameCoreDLL.dll!CvSelectionGroup::mergeIntoGroup(CvSelectionGroup * pSelectionGroup=0x4aca7900) Line 7599    C++
     CvGameCoreDLL.dll!CvUnitAI::processContracts(int iMinPriority=0) Line 27259    C++
     CvGameCoreDLL.dll!CvUnitAI::AI_cityDefenseMove() Line 5817    C++
     CvGameCoreDLL.dll!CvUnitAI::AI_update() Line 436    C++
     CvGameCoreDLL.dll!CvSelectionGroup::resetPath() Line 7167    C++
     CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Line 316    C++
     CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Line 1931    C++
     CvGameCoreDLL.dll!049ad814()    C++

It seems that it is stuck in a loop constantly getting the same head unit (settler in my case), and constantly putting calling "pSelectionGroup->getHeadUnit()->setToWaitOnUnitAI(AI_getUnitAIType(), false);" in "CvUnit::joinGroup", which if I understand it correctly delays making a final decision on what to do with the unit, so it keeps coming back to it in a loop.

The actual loop where it seems to be stuck is in "void CvSelectionGroup::mergeIntoGroup(CvSelectionGroup* pSelectionGroup)" in "CvSelectionGroup.cpp" (it never seems to set "bChangedUnitAI = true;")

Hope it helps.
 
Last edited:
Here is when the turn times start making a huge difference (Ancient era)
1st one is 20 seconds
2nd one is 40-45 seconds long,

and all it is , is 1 turn, actual next turn??

current SVN
 

Attachments

Here is when the turn times start making a huge difference (Ancient era)
1st one is 20 seconds
2nd one is 40-45 seconds long,

and all it is , is 1 turn, actual next turn??

current SVN
Are AIs at war?
How active barbarians are?

I think its normal to fluctuate like that, if there is a lot of AIs/barbarians.

Judging by date of save (10 BC) tech leader should be well into Classical era.
 
after last SVN change got this:

Traceback (most recent call last):
File "BugConfig", line 110, in unknown_endtag
File "BugConfig", line 334, in endChild
File "BugConfig", line 337, in end
File "BugConfig", line 318, in process
File "BugConfig", line 565, in handle
File "BugUtil", line 643, in getFunction
File "BugUtil", line 630, in lookupFunction
File "BugUtil", line 622, in lookupModule
File "<string>", line 35, in load_module
File "<string>", line 13, in _get_code
File "The_JMods", line 41

'ERA_INFORMATION' : 'UNIT_MILITIA_MODERN'
 
I might have more precisely isolated the piece of code that causes game to hang:

Code:
>    CvGameCoreDLL.dll!getUnit(IDInfo unit={...}) Line 205    C++
     CvGameCoreDLL.dll!CvSelectionGroup::getHeadUnit() Line 7827    C++
     CvGameCoreDLL.dll!CvUnit::canJoinGroup(const CvPlot * pPlot=0x0faa4b1c, CvSelectionGroup * pSelectionGroup=0x4aca7900) Line 18497    C++
     CvGameCoreDLL.dll!CvUnit::joinGroup(CvSelectionGroup * pSelectionGroup=0x0faa4b1c, bool bRemoveSelected=false, bool bRejoin=true) Line 18578    C++
     CvGameCoreDLL.dll!CvSelectionGroup::mergeIntoGroup(CvSelectionGroup * pSelectionGroup=0x4aca7900) Line 7599    C++
     CvGameCoreDLL.dll!CvUnitAI::processContracts(int iMinPriority=0) Line 27259    C++
     CvGameCoreDLL.dll!CvUnitAI::AI_cityDefenseMove() Line 5817    C++
     CvGameCoreDLL.dll!CvUnitAI::AI_update() Line 436    C++
     CvGameCoreDLL.dll!CvSelectionGroup::resetPath() Line 7167    C++
     CvGameCoreDLL.dll!CvSelectionGroupAI::AI_update() Line 316    C++
     CvGameCoreDLL.dll!CvPlayerAI::AI_unitUpdate() Line 1931    C++
     CvGameCoreDLL.dll!049ad814()    C++

It seems that it is stuck in a loop constantly getting the same head unit (settler in my case), and constantly putting calling "pSelectionGroup->getHeadUnit()->setToWaitOnUnitAI(AI_getUnitAIType(), false);" in "CvUnit::joinGroup", which if I understand it correctly delays making a final decision on what to do with the unit, so it keeps coming back to it in a loop.

The actual loop where it seems to be stuck is in "void CvSelectionGroup::mergeIntoGroup(CvSelectionGroup* pSelectionGroup)" in "CvSelectionGroup.cpp" (it never seems to set "bChangedUnitAI = true;")

Hope it helps.
Ok, that helps to understand what's happening then. I just 'fixed' a crash but ran into this problem as a result. One bug leads to another. I think I have a theory as to how I can correct this to suit both situations.
 
@strategyonly you and AIs are behind calendar by full era, you should try a game with Win for Losing and Tech Diffusion enabled.

Also it seems you are better than Prince AI.

It looks like four AIs are in Classical era.
Then they are keeping up with calendar.

I looked at AIs capitals and they are doing good job at keeping up with calendar - with PPIO and chipotle (ctrl+z to see whole map) you can check all buildings, that they unlocked and are waiting to be built.
 
Last edited:
Back
Top Bottom