Jump to content

Recommended Posts

Posted (edited)

Nice report, that'll help the devs.

It looks like the output.log from your bug report zip has captured a very clear failed invariant check

Two combatants at position [F:0, I:23, J:95]! GlobalEntity 5877 - Soldier [Name:Zakhar Smirnov - Rank:sergeant] LifeStatus:Conscious and GlobalEntity 5892 - Soldier [Name:Viktoria Kratz - Rank:private] LifeStatus:Conscious

with a stack trace through the layers of AI code:

2026-03-14 17:07:11,949 [INFO] (F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Libraries\Common\Code\AI\BehaviorTrees\Behavior.cs:110) 
[AISystem] 					Starting behavior: <b>{<color=#645341ff>Plan and start movement</color>}</b> - Context: [GlobalEntity 654 - Combatant - Species:mantid, RoleGroup:default, Ethnicity:default, Gender:default :: LifeStatus:Conscious - DeltaTime Event[dT: 0.0667355]]

2026-03-14 17:07:11,951 [INFO] (F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Behavior\CombatantAttackAIBehavior.cs:990) 
(654) [AIWeights] mood=attack for Species:mantid-Rank:soldier. TU=TimeUnits [0 - 75 - 75]

2026-03-14 17:07:11,952 [INFO] (F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Behavior\CombatantAttackAIBehavior.cs:1081) 
(654) [AIWeights] setting minimum distance to 5 for Species:mantid-Rank:soldier

2026-03-14 17:07:11,953 [FATAL] (F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\XenonautsMain.cs:1260) 
A fatal error occurred during Update() - Two combatants at position [F:0, I:23, J:95]! GlobalEntity 5877 - Soldier [Name:Zakhar Smirnov - Rank:sergeant] LifeStatus:Conscious and GlobalEntity 5892 - Soldier [Name:Viktoria Kratz - Rank:private] LifeStatus:Conscious
 
	 Context: 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0.0667355] -- 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0.1668406] --  

System.Exception: Two combatants at position [F:0, I:23, J:95]! GlobalEntity 5877 - Soldier [Name:Zakhar Smirnov - Rank:sergeant] LifeStatus:Conscious and GlobalEntity 5892 - Soldier [Name:Viktoria Kratz - Rank:private] LifeStatus:Conscious

  at Xenonauts.GroundCombat.AI.Layers.GroupDistanceLayer.CalculateUnitDistance (Artitas.Entity playingPlayer, System.Boolean enemies, System.Boolean filterOutUnarmed, Artitas.Utils.Optional`1[T] includeCombatant, Artitas.Utils.Optional`1[T] excludeCombatant, System.Single valueLimit) [0x002d2] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\GroupDistanceLayer.cs:538 
  at Xenonauts.GroundCombat.AI.Layers.EnemyDistanceLayer.UpdateValues () [0x0000c] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\GroupDistanceLayer.cs:56 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer+<>c.<CalculateValuesFromFuncs>b__38_4 (Common.AI.General.KnowledgeLayer layer) [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:461 
  at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x0001e] in <1071a2cb0cb3433aae80a793c277a048>:0 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer.CalculateValuesFromFuncs (Artitas.Entity target, System.String mood, System.Collections.Generic.Dictionary`2[TKey,TValue] aiLayerFuncs, System.Boolean forceLayerRefresh) [0x0037c] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:433 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer.CalculateValues (Artitas.Entity target, System.Boolean okayToUseDefaults, System.Boolean forceLayerRefresh, System.String mood) [0x001b8] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:248 
  at Xenonauts.Combat.Data.AI.Behaviors.CombatantAttackAIBehavior+<>c__DisplayClass35_0.<PerformDecisionLayer>b__0 () [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Behavior\CombatantAttackAIBehavior.cs:1195 
  at Xenonauts.Combat.Data.AI.Behaviors.CombatantAttackAIBehavior.PerformDecisionLayer (Artitas.Entity active, System.String mood, Xenonauts.GroundCombat.AI.Layers.DecisionLayer decision) [0x00029] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Behavior\CombatantAttackAIBehavior.cs:1199 
  at Xenonauts.Combat.Data.AI.Behaviors.CombatantAttackAIBehavior+<>c.<TryToMoveToBestTile>b__34_0 (Artitas.Utils.Bag`1[T] behPath, Xenonauts.GroundCombat.Systems.AI.GroundCombatBehaviorContext context) [0x0001b] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Behavior\CombatantAttackAIBehavior.cs:1183 
[ ... snip ... ]

 

V7.9.0 changelog included this change (cool!):

Quote

We've finally implemented a more advanced model for the AI that now keeps track of "known" Xenonauts vs unseen Xenonauts, which means alien units will no longer have automatic knowledge about Xenonaut units that they have not yet encountered. Basically, this should reduce the amount of obvious AI "cheating", and make flanking aliens more effective.

 

Speculation:   if the alien side are now keeping their own records to track known Xenonauts sightings, perhaps if they're combining Xenonaut sightings made at different times, it could be possible that they see Xenonaut A in position X, then next time when an alien takes a look at position X, Xenonaut A is not there any more, but there's some other Xenonaut B.  If they aliens aren't carefully updating their records to note that they don't know where Xenonaut A is any more, but they were last sighted at position X, maybe they get confused and believe both Xenonaut A and Xenonaut B are simultanously occupying position X -- which then blows up a bunch of the existing AI planning code, which (correctly) assumes that two xenonauts occupying the same position is impossible.

Previously, if the aliens were always allowed to cheat by peeking at the current xenonaut positions, this kind of edge case would have been impossible.

 

edit: i ran a test of this theory, repeatedly popping soldiers out of the pegasus, taking a pistol shot at a cyberdrone, then hiding them back inside the dropship, then doing that for half a dozen different soldiers, to try to get the cyberdrone to believe all the xenonauts it could no longer see were all superimposed in the dropship door tile, but i didn't reproduce an enemy turn hang, and the cyberdrone just kept on 'droning.

Edited by fusion-waffle
Posted
4 hours ago, PorT_Lobo said:

It happened to me again, this bug is on since 7.6.0 if i am not mistaken.

Excellent bug report!  Same symptom, but your output.log contains an entirely new kind of error:

2026-03-15 12:48:34,509 [FATAL] (F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\XenonautsMain.cs:1260) 
A fatal error occurred during Update() - Object reference not set to an instance of an object. 
	 Context: 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0,0166798] --  

System.NullReferenceException: Object reference not set to an instance of an object.
  at Xenonauts.GroundCombat.Systems.AI.AIBlackboardSystem.GetBelievedAddress (Artitas.Entity player, Artitas.Entity target) [0x00032] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\AIBlackboardSystem.cs:57 
  at Xenonauts.GroundCombat.AI.Layers.GroupDistanceLayer.CalculateUnitDistance (Artitas.Entity playingPlayer, System.Boolean enemies, System.Boolean filterOutUnarmed, Artitas.Utils.Optional`1[T] includeCombatant, Artitas.Utils.Optional`1[T] excludeCombatant, System.Single valueLimit) [0x00131] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\GroupDistanceLayer.cs:510 
  at Xenonauts.GroundCombat.AI.Layers.EnemyDistanceLayer.UpdateValues () [0x0000c] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\GroupDistanceLayer.cs:56 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer+<>c.<CalculateValuesFromFuncs>b__38_4 (Common.AI.General.KnowledgeLayer layer) [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:461 

[ ...snip... ]

 

Same as @gprimosch's example, an exception is raised while it is attempting to execute Xenonauts.GroundCombat.AI.Layers.GroupDistanceLayer.CalculateUnitDistance -- but this time it is failing in a call to Xenonauts.GroundCombat.Systems.AI.AIBlackboardSystem.GetBelievedAddress

  • Like 1
Posted

Here are two additional high quality bug reports of hangs during AI turn in Xenonauts 2 v7.9.0 -- both accidentally submitted by players to the Xenonauts 1 bug report forum.

See: 

 

(thank you @Craig & @StudentEternal !)

 

The stack traces in player.log / output.log in these two bug reports illustrate a third kind of failure mode, distinct from @gprimosch & @PorT_Lobo's examples.

Here are excerpts of the stack traces for fatal / unhandled exceptions:

NullReferenceException: A fatal error occurred during Update[] - Object reference not set to an instance of an object 
	 Context: 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0.0166872] -- 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0.0166862] --  
 - Object reference not set to an instance of an object
  at Common.Boards.Address.ComputeTileIDFloor0 () [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Libraries\Common\Code\Concepts\Boards\DataStructures\Address.cs:928 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.ForEachTileInRange (System.Action`1[T] tileFunc, System.Single range, System.Collections.Generic.List`1[T] entityList) [0x0003a] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:270 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.UpdatePositionTacticValues (Artitas.Entity actor) [0x00106] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:218 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.UpdateValues () [0x0000c] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:183 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer+<>c.<CalculateValuesFromFuncs>b__38_4 (Common.AI.General.KnowledgeLayer layer) [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:461 
[ ...snip! ...]

and

A fatal error occurred during Update() - Object reference not set to an instance of an object 
	 Context: 
	 - Process:global::Artitas.Events.DeltaTimeEvent - DeltaTime Event[dT: 0.0166695] --  

System.NullReferenceException: Object reference not set to an instance of an object
  at Common.Boards.Address.ComputeTileIDFloor0 () [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Libraries\Common\Code\Concepts\Boards\DataStructures\Address.cs:928 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.ForEachTileInRange (System.Action`1[T] tileFunc, System.Single range, System.Collections.Generic.List`1[T] entityList) [0x0003a] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:270 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.UpdatePositionTacticValues (Artitas.Entity actor) [0x00106] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:218 
  at Xenonauts.GroundCombat.AI.Layers.PositionTacticLayer.UpdateValues () [0x0000c] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\PositionTacticLayer.cs:183 
  at Xenonauts.GroundCombat.AI.Layers.DecisionLayer+<>c.<CalculateValuesFromFuncs>b__38_4 (Common.AI.General.KnowledgeLayer layer) [0x00001] in F:\Jenkins\workspace\X2 (Build)\release-7.x.y\Assets\Code\Screens\GroundCombat\Systems\AI\Layers\DecisionLayer.cs:461 
[ ...snip! ... ]
  • Like 1
Posted

Yeah just had this happen to me again after it seemingly was fixed a couple patches ago, also seems the performance has greatly decreased with really long loading times and much more memory usage, still got the 94% loading bug that makes reloading tactical missions impossible so tactical missions at this point are extremely unstable/bordering on unplayable for the moment since a crash/needing to quit or reload a past save means you have to do the entire mission over again or essentially a game over for a Ironman run so very glad I decided against Ironman for once. 

bug_report_2026-03-15-22h21_gc_7.9.0_unhandled_exception_1.zip

  • Like 1
Posted

Thanks for the bug reports! Apologies for the unstable patch but we're working on getting the crashes fixed to put out a hotfix asap

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...