[Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Moderators: The Artistocrats, Order of Battle Moderators

Post Reply
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

[Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Post by Horst »

This is most likely the severest issue the game still has: it's difficult to reproduce when player units have to retreat but somehow won't and the AI unit tries to follow up into the supposedly freed-up hex.
Either the AI unit will mix up with the leftover player unit on top with a pretty error message, or want to follow (noticeable rotation) but can't for whatever right reason.
The result is either that you can rarely play on as usually, possibly when the AI unit is still visible,
or the following AI unit will vanish on the map but the AI still think it's valid,
or my latest example with trying to follow-up but can't,
what produces the typical endless Thinking...

This was only the last example in the player.log

Code: Select all

IndexOutOfRangeException: Index was outside the bounds of the array.
  at RetreatHex.FindInRange (Unit unit, Hex attackHex, System.Int32 range, System.Int32& efficiencyLoss, GameState gameState) [0x001ec] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at GroundAttack.Execute (Unit attacker, Hex fromHex, Hex location, Unit defender, System.Boolean ambush, System.Int32 specialAttack, System.Int32 blast, System.Boolean simulate, GameState gameState) [0x0049b] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at Combat.CalculateDamage (Unit attacker, Unit defender, Hex fromHex, Hex location, System.Boolean ambush, System.Int32 specialAttack, System.Int32 blast, System.Boolean simulate, GameState gameState) [0x000b1] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at Combat.ResolveSingleCombat (Unit attacker, Unit defender, Hex fromHex, Hex location, System.Boolean ambush, System.Int32 specialAttack, System.Int32 blast, GameState gameState) [0x00033] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at Combat.ResolveCombat (Unit attacker, Unit defender, Hex fromHex, Hex location, System.Boolean ambush, System.Int32 specialAttack, GameState gameState) [0x000bf] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at Combat.ResolveCombat (Unit attacker, Unit defender, Hex location, System.Boolean ambush, System.Int32 specialAttack, GameState gameState) [0x0000f] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at ActionsNamespace.AttackUnitAction.Perform (GameState gameState, System.Boolean checkVisibility, Alliance visibilityAlliance) [0x00309] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at ActionsNamespace.Action.Perform (GameState gameState) [0x00000] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at ActionManager.CommitAction (ActionsNamespace.Action action, GameState gameState, System.Boolean performIfSimulated) [0x00026] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at ActionManager.CommitActions (System.Collections.Generic.List`1[T] actions, GameState gameState) [0x0000b] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at AllianceAI.CommitActions (System.Collections.Generic.List`1[T] actions) [0x00000] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at AllianceAI.RunTeamAI (AITeam currentTeam) [0x000d3] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
  at AllianceAI.AIMakeTurn () [0x00339] in <3dbb6aaa6c434da78f5ba5a1e8139409>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ErrorLogger:HandleThreadedException(Exception)
AllianceAI:AIMakeTurn()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: [Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Post by Horst »

Just want to add here that last time, an AI towed anti-tank unit simply vanished when moving on a supposedly retreated player unit hex field. This time, it didn't crash at least on the next AI turn. I couldn't find a related error message in the log file.
As it was again a not-retreating recon unit, it's possible related to the Quick Retreat trait. The player unit didn't retreat on a 30% chance on damage, but maybe the AI thought so. Maybe, maybe not.
As I'm playing only with my gameplay mod, it's tricky to provide a saved game when this finally happens again. As I'm currently playing only with default aux units, it's possible to switch to vanilla, but last time the different terrain and damage values unfortunately made the AI different turn moves.
Maybe someone playing vanilla can provide something like an Auto-Save (End Turn) when this happened. The game already provides itself with a last EndTurn save game to report with ugly name like: ERROR (-1955106007).saz
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: [Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Post by Horst »

Added here only an old report: https://www.slitherine.com/forum/viewtopic.php?t=92369

Another one, but requires custom campaign to check out saved game: https://www.slitherine.com/forum/viewtopic.php?t=95801
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3710
Joined: Mon Nov 27, 2017 10:24 pm

Re: [Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Post by GabeKnight »

I know this error, but it has happened like a handful of times in all my time playing OoB. It's not worth mentioning from my experience.
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: [Gameplay Bug][AI Process freezes on faulty Unit Retreat][Not New]

Post by Horst »

Only another related report incl. savedgame: https://www.slitherine.com/forum/viewtopic.php?t=107091

I possibly notice it more often as I have more modded units with Quick Retreat, but regular retreat can most likely cause this either. Very hard to reproduce.
At least it is often possible to wriggle free from this issue by moving one of the stacked units away without a crash.
Post Reply

Return to “Order of Battle Bug Submissions”