View Issue Details

IDProjectCategoryLast Update
0020117AI War 2Bug - OtherSep 5, 2018 6:41 pm
ReporterRocketAssistedPuffin Assigned ToBadgerBadger  
Severityminor 
Status resolvedResolutionfixed 
Product Version0.764 Mercenary Surge 
Fixed in Version0.766 Target Equilibrium 
Summary0020117: Error when Human Resistance Fighter died to a Nanocaust unit
DescriptionI enabled a bunch of tracing when looking at another save about the Nanocaust, apologies. Though bits in there are interesting?

"9/2/2018 3:43:24 PM allowedToCapture: currently can't capture Freund Nanocaust Strength 6220 hostileStrength 1830 captureStrengthRequired 500"

Stands out as odd. Attached the save as well.
TagsNo tags attached.

Relationships

related to 0020122 resolvedBadgerBadger Bug report-- Human resistance Fighters and Leaving corpes 

Activities

RocketAssistedPuffin

Sep 2, 2018 10:59 am

reporter  

ArcenDebugLog.txt (348,719 bytes)
NanocaustBug.save (1,550,816 bytes)

RocketAssistedPuffin

Sep 2, 2018 11:00 am

reporter   ~0048724

It's at the bottom, forgot to say.

RocketAssistedPuffin

Sep 2, 2018 11:13 am

reporter   ~0048725

This is breaking a lot of the game - dead ships don't disappear, the Nanocaust itself no longer does anything, weapon shots are floating mid air, etc.

BadgerBadger

Sep 2, 2018 2:05 pm

manager   ~0048728

I'm a bit confused. The error in the log is
Error occurred in sim planning context specialFactionContext_13_HumanMarauders
ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
===STACK FRAMES (with file info)===
FILE METHOD IL_OFFSET NATIVE_OFFSET LINE_NUMBER COLUMN_NUMBER
    ThrowArgumentOutOfRangeException 41 106 0 0
    ThrowArgumentOutOfRangeException 0 34 0 0
    DoLongRangePlanning_Subclass 2634 9746 0 0
    DoLongRangePlanning 116 364 0 0
    Execute 1 57 0 0
    InnerRun 63 186 0 0
===RAW STACK TRACE===
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <f826c2584fc94ec19a48a6576640bdc5>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <f826c2584fc94ec19a48a6576640bdc5>:0
  at Arcen.AIW2.External.SpecialFaction_HumanMarauders.DoLongRangePlanning_Subclass (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.External.ArcenLongTermPlanningContext Context) [0x00a4a] in <053df2d8e35043958fb03adb0cebe117>:0
  at Arcen.AIW2.External.BaseSpecialFaction.DoLongRangePlanning (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ILongRangePlanningContext Context) [0x00074] in <053df2d8e35043958fb03adb0cebe117>:0
  at Arcen.AIW2.External.SpecialFactionPlanning.Execute () [0x00001] in <053df2d8e35043958fb03adb0cebe117>:0
  at Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () [0x0003f] in <053df2d8e35043958fb03adb0cebe117>:0

Which I hopefully have already fixed. The Nanocaust-related log message you referred to does not appear in this log

RocketAssistedPuffin

Sep 2, 2018 2:17 pm

reporter   ~0048731

9/2/2018 3:53:52 PM
Error occurred in sim planning context specialFactionContext_14_HumanResistanceFighters
NullReferenceException
Object reference not set to an instance of an object
===STACK FRAMES (with file info)===
FILE METHOD IL_OFFSET NATIVE_OFFSET LINE_NUMBER COLUMN_NUMBER
    HandleDeathWithEffectApplied 110 286 0 0
    DoOnAnyDeathInCombatLogic 914 1784 0 0
    DoOnDeathInCombatLogic 48 122 0 0
    TakeDamage 2213 4274 0 0
    Die 31 178 0 0
    Despawn 62 154 0 0
    <DoLongRangePlanning_Subclass>b__0 631 2066 0 0
    DoForEntities 71 151 0 0
    DoLongRangePlanning_Subclass 1218 4834 0 0
    DoLongRangePlanning 118 380 0 0
    Execute 1 57 0 0
    InnerRun 65 194 0 0
===RAW STACK TRACE===
  at Arcen.AIW2.External.DeathEffect_Nanocaustation.HandleDeathWithEffectApplied (Arcen.AIW2.Core.GameEntity Entity, System.Int32 ThisDeathEffectDamageSustained, Arcen.AIW2.Core.Faction FactionThatDidTheKilling, Arcen.AIW2.Core.Faction FactionResponsibleForTheDeathEffect, Arcen.AIW2.Core.ArcenSimContext Context) [0x0006e] in <48a5209843b64d858efeb9851bdb05ba>:0
  at Arcen.AIW2.Core.GameEntity.DoOnAnyDeathInCombatLogic (Arcen.AIW2.Core.EntitySystem FiringSystemOrNull, Arcen.AIW2.Core.ArcenSimContext Context) [0x00392] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.Core.GameEntity.DoOnDeathInCombatLogic (Arcen.AIW2.Core.EntitySystem FiringSystemOrNull, Arcen.AIW2.Core.ArcenSimContext Context) [0x00030] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.Core.GameEntity.TakeDamage (System.Int32 Damage, Arcen.AIW2.Core.EntitySystem FiringSystemOrNull, Arcen.AIW2.Core.GameEntity ShotThatHitOrNull, System.Boolean IsSelfDamage, System.Boolean PreventReversionToNeutral, System.Boolean HonorFiniteHitCountAOE, System.Int32& ActualDamageDone, Arcen.AIW2.Core.ArcenSimContext Context) [0x008a5] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.Core.GameEntity.Die (Arcen.AIW2.Core.ArcenSimContext Context, System.Boolean PreventReversionToNeutral, Arcen.AIW2.Core.EntitySystem FiringSystemOrNull) [0x0001f] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.Core.GameEntity.Despawn (Arcen.AIW2.Core.ArcenSimContext Context, System.Boolean PreventReversionToNeutral, Arcen.AIW2.Core.InstancedRendererDeactivationReason Reason) [0x0003e] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.External.SpecialFaction_HumanResistanceFighters+<>c__DisplayClass15_0.<DoLongRangePlanning_Subclass>b__0 (Arcen.AIW2.Core.GameEntity entity) [0x00277] in <48a5209843b64d858efeb9851bdb05ba>:0
  at Arcen.AIW2.Core.EntityCollection.DoForEntities (Arcen.AIW2.Core.GameEntityCategory Category, Arcen.AIW2.Core.GameEntity+ProcessorDelegate Processor) [0x00047] in <4432ea7db4e9453992b56f687a2891bc>:0
  at Arcen.AIW2.External.SpecialFaction_HumanResistanceFighters.DoLongRangePlanning_Subclass (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.External.ArcenLongTermPlanningContext Context) [0x004c2] in <48a5209843b64d858efeb9851bdb05ba>:0
  at Arcen.AIW2.External.BaseSpecialFaction.DoLongRangePlanning (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ILongRangePlanningContext Context) [0x00076] in <48a5209843b64d858efeb9851bdb05ba>:0
  at Arcen.AIW2.External.SpecialFactionPlanning.Execute () [0x00001] in <48a5209843b64d858efeb9851bdb05ba>:0
  at Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () [0x00041] in <48a5209843b64d858efeb9851bdb05ba>:0

The Nanocaust log is there though? It's the thing taking up most of it. I opened that log I uploaded here and it's in it. Most of those lines are reasonable, it's not attacking because of low strength. There are exceptions where it is overwhelmingly powerful to the target yet won't attack it. It seemed to stop taking anything after the first few planets.

BadgerBadger

Sep 2, 2018 6:47 pm

manager   ~0048743

I just threw some tweaks to Nanocaust behaviour in this release, so we'll see if that makes it better.

Chris, I think this error is as follows. A HRF ship wants to warp out. However, it's taken a lot of damage from the Nanocaust; enough damage that the ship would ordinarily be taken over by the Nanocaust when it died. However, it didn't die normally, it died to Warping Out, so the code gets confused about how to handle it.

Perhaps calling Despawn() should clear DeathEffect damage?

RocketAssistedPuffin

Sep 2, 2018 6:55 pm

reporter   ~0048745

The HRF died of a normal combat death, not from warping out. At least when the error occured, they were still on the planet fighting.

BadgerBadger

Sep 2, 2018 7:10 pm

manager   ~0048747

It looks like we were definitely in DoLongRangePlanning in HRF, and the only time we call Despawn in DoLongRangePlanning is for Warp Out. So I'm even more confused now. I put in a bit of defensive code, so if it happens again we should have a better sense of what went down.

RocketAssistedPuffin

Sep 2, 2018 7:19 pm

reporter   ~0048748

Huh, I had confusion as well. I loaded the save and...there's now a message saying they're warping out. Except...almost all of them don't. Two ships alone warp out, the rest remain as normal.

The two ships warping out alone must've looked like normal combat death to me. I saw flashes, giant error, and HRF remaining. The warp out message was probably hidden behind the error.

So your original idea is probably on the right track.

(Incidentally, Nanocaust does enough nanocaustation damage that even one shot is enough to infect a ship upon death. Same with zombification).

Chris_McElligottPark

Sep 5, 2018 4:33 pm

administrator   ~0048890

Badger, if you want me to look at this, please let me know. Thanks!

BadgerBadger

Sep 5, 2018 6:41 pm

manager   ~0048917

Fixed: calling Despawn prevents OnDeathEffects from triggering on unit death

Issue History

Date Modified Username Field Change
Sep 2, 2018 10:59 am RocketAssistedPuffin New Issue
Sep 2, 2018 10:59 am RocketAssistedPuffin File Added: ArcenDebugLog.txt
Sep 2, 2018 10:59 am RocketAssistedPuffin File Added: NanocaustBug.save
Sep 2, 2018 10:59 am RocketAssistedPuffin File Added: NanocaustBug.savemet
Sep 2, 2018 11:00 am RocketAssistedPuffin Note Added: 0048724
Sep 2, 2018 11:13 am RocketAssistedPuffin Note Added: 0048725
Sep 2, 2018 2:05 pm BadgerBadger Note Added: 0048728
Sep 2, 2018 2:17 pm RocketAssistedPuffin Note Added: 0048731
Sep 2, 2018 6:47 pm BadgerBadger Note Added: 0048743
Sep 2, 2018 6:47 pm BadgerBadger Assigned To => Chris_McElligottPark
Sep 2, 2018 6:47 pm BadgerBadger Status new => assigned
Sep 2, 2018 6:55 pm RocketAssistedPuffin Note Added: 0048745
Sep 2, 2018 7:10 pm BadgerBadger Note Added: 0048747
Sep 2, 2018 7:19 pm RocketAssistedPuffin Note Added: 0048748
Sep 5, 2018 4:32 pm Chris_McElligottPark Relationship added related to 0020122
Sep 5, 2018 4:32 pm Chris_McElligottPark Assigned To Chris_McElligottPark => BadgerBadger
Sep 5, 2018 4:33 pm Chris_McElligottPark Note Added: 0048890
Sep 5, 2018 6:41 pm BadgerBadger Status assigned => resolved
Sep 5, 2018 6:41 pm BadgerBadger Resolution open => fixed
Sep 5, 2018 6:41 pm BadgerBadger Fixed in Version => 0.766 Target Equilibrium
Sep 5, 2018 6:41 pm BadgerBadger Note Added: 0048917