View Issue Details

IDProjectCategoryLast Update
0022695AI War 2Bug - GameplayJan 23, 2020 10:31 am
ReporterDefeatedByTheCat Assigned ToChris_McElligottPark  
Severityminor 
Status resolvedResolutionfixed 
Product Version1.308 Mega Performance 
Fixed in Version1.309 Instigator Cheekiness 
Summary0022695: Error message followed by a very odd Instigator Base
DescriptionI get the error most times I load the save, but not every time.

The Instigator base with -10000 seconds turns up every time
TagsNo tags attached.

Activities

DefeatedByTheCat

Jan 23, 2020 9:30 am

reporter  

755 Jan 2020.save (694,500 bytes)

BadgerBadger

Jan 23, 2020 9:56 am

manager   ~0055735

What's the error? Does it show up in the ArcenDebugLog.txt?

Chris_McElligottPark

Jan 23, 2020 10:05 am

administrator   ~0055736

Error occurred in sim planning context perSecondNonSimPlanningLongRangeContext
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
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs <DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking>b__4 116 639 847 0
D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\GameEntity\EntityCollection.cs DoForEntities 81 1011 678 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking 2215 16466 838 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking 11 242 600 0
D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\Faction\Faction.cs DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking 1 154 921 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs <DoCentralLoop>b__5_0 1 154 67 0
D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\World_AIW2.cs DoForFactions 5 259 1598 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs DoCentralLoop 12 354 65 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs Execute 17 298 34 0
D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\ArcenSimPlanningContext.cs InnerRun 86 815 53 0
===RAW STACK TRACE===
  at Arcen.AIW2.External.SpecialFaction_Human+<>c__DisplayClass50_3.<DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking>b__4 (Arcen.AIW2.Core.GameEntity_Squad entity) [0x00074] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs:847

  at Arcen.AIW2.Core.EntityCollection.DoForEntities (Arcen.AIW2.Core.EntityRollupType Rollup, Arcen.AIW2.Core.GameEntity_Squad+ProcessorDelegate Processor) [0x00051] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\GameEntity\EntityCollection.cs:678

  at Arcen.AIW2.External.SpecialFaction_Human.DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x008a7] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs:838

  at Arcen.AIW2.External.SpecialFaction_Human.DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x0000b] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\SpecialFactions\Human.cs:600

  at Arcen.AIW2.Core.Faction.DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.ArcenSimContext Context) [0x00001] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\Faction\Faction.cs:921

  at Arcen.AIW2.External.PerSecondNonSimPlanning.<DoCentralLoop>b__5_0 (Arcen.AIW2.Core.Faction faction) [0x00001] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs:67

  at Arcen.AIW2.Core.World_AIW2.DoForFactions (Arcen.AIW2.Core.Faction+ProcessorDelegate Processor) [0x00005] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\World_AIW2.cs:1598

  at Arcen.AIW2.External.PerSecondNonSimPlanning.DoCentralLoop () [0x0000c] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs:65

  at Arcen.AIW2.External.PerSecondNonSimPlanning.Execute () [0x00011] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\Planning\LongTerm\PerSecondNonSimPlanning.cs:34

  at Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () [0x00056] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\ArcenSimPlanningContext.cs:53

  at System.Environment.get_StackTrace () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0

  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, System.Boolean IncludeStackTrace, Arcen.Universal.Verbosity Verbosity) [0x0002e] in D:\vclarge\AI_War_2_Ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:135

  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00001] in D:\vclarge\AI_War_2_Ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:116

  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00001] in D:\vclarge\AI_War_2_Ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:96

  at Arcen.Universal.ArcenDebugging.LogException (System.Exception e, System.String message, Arcen.Universal.Verbosity verbosity) [0x00217] in D:\vclarge\AI_War_2_Ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:291

  at Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () [0x000ab] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\ArcenSimPlanningContext.cs:68

  at Arcen.AIW2.External.ArcenThread.InternalActualThreadFunction () [0x00036] in D:\vclarge\AI_War_2_Ultra\AIWarExternalCode\src\Sim\ArcenThread.cs:102

  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0

  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0

  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0

  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0

  at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
UnityEngine.Debug:Log(Object)
Arcen.Universal.ArcenDebugging:InnerActualUnityDebugLogCall(String) (at D:/vclarge/AI_War_2_Ultra/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:124)
Arcen.Universal.ArcenDebugging:ArcenDebugLog(String, DebugLogDestination, Boolean, Verbosity) (at D:/vclarge/AI_War_2_Ultra/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:135)
Arcen.Universal.ArcenDebugging:ArcenDebugLog(String, DebugLogDestination, Verbosity) (at D:/vclarge/AI_War_2_Ultra/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:116)
Arcen.Universal.ArcenDebugging:ArcenDebugLog(String, Verbosity) (at D:/vclarge/AI_War_2_Ultra/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:96)
Arcen.Universal.ArcenDebugging:LogException(Exception, String, Verbosity) (at D:/vclarge/AI_War_2_Ultra/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:291)
Arcen.AIW2.External.ArcenSimPlanningContext:InnerRun() (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/ArcenSimPlanningContext.cs:68)
Arcen.AIW2.External.ArcenThread:InternalActualThreadFunction() (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/ArcenThread.cs:102)
System.Threading.ThreadHelper:ThreadStart()

Chris_McElligottPark

Jan 23, 2020 10:05 am

administrator   ~0055737

NullReferenceException: Object reference not set to an instance of an object
Arcen.AIW2.External.SpecialFaction_Human+<>c__DisplayClass50_3.<DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking>b__4 (Arcen.AIW2.Core.GameEntity_Squad entity) (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/SpecialFactions/Human.cs:847)
Arcen.AIW2.Core.EntityCollection.DoForEntities (Arcen.AIW2.Core.EntityRollupType Rollup, Arcen.AIW2.Core.GameEntity_Squad+ProcessorDelegate Processor) (at D:/vclarge/AI_War_2_Ultra/ArcenAIW2Core/src/Logic/GameState/GameEntity/EntityCollection.cs:678)
Arcen.AIW2.External.SpecialFaction_Human.DoLocalFactionPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/SpecialFactions/Human.cs:838)
Arcen.AIW2.External.SpecialFaction_Human.DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/SpecialFactions/Human.cs:600)
Arcen.AIW2.Core.Faction.DoPerSecondNonSimUpdate_OnBackgroundNonSimThread_NonBlocking (Arcen.AIW2.Core.ArcenSimContext Context) (at D:/vclarge/AI_War_2_Ultra/ArcenAIW2Core/src/Logic/GameState/Faction/Faction.cs:921)
Arcen.AIW2.External.PerSecondNonSimPlanning.<DoCentralLoop>b__5_0 (Arcen.AIW2.Core.Faction faction) (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/Planning/LongTerm/PerSecondNonSimPlanning.cs:67)
Arcen.AIW2.Core.World_AIW2.DoForFactions (Arcen.AIW2.Core.Faction+ProcessorDelegate Processor) (at D:/vclarge/AI_War_2_Ultra/ArcenAIW2Core/src/Logic/GameState/World_AIW2.cs:1598)
Arcen.AIW2.External.PerSecondNonSimPlanning.DoCentralLoop () (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/Planning/LongTerm/PerSecondNonSimPlanning.cs:65)
Arcen.AIW2.External.PerSecondNonSimPlanning.Execute () (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/Planning/LongTerm/PerSecondNonSimPlanning.cs:34)
Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/ArcenSimPlanningContext.cs:69)
Arcen.AIW2.External.ArcenThread.InternalActualThreadFunction () (at D:/vclarge/AI_War_2_Ultra/AIWarExternalCode/src/Sim/ArcenThread.cs:102)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Threading.ThreadHelper.ThreadStart () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
UnityEngine.UnhandledExceptionHandler:<RegisterUECatcher>m__0(Object, UnhandledExceptionEventArgs)

Chris_McElligottPark

Jan 23, 2020 10:20 am

administrator   ~0055738

Bit 1:

* When the game tries to create notifications up at the top part of the screen for the human player, if it runs into an error it now is much more informative about what the error was, although it's still not exact in every case.

Chris_McElligottPark

Jan 23, 2020 10:31 am

administrator   ~0055739

Thanks!

* Fixed a variety of places where if the AI did not have a "most annoying faction" at a location, it would error instead of simply waiting because it was not annoyed.
** In "send a wave if alerted after X seconds" (raid engine).
** In the human notification checks for raid engines.
** And that's it, from a thorough code review. Everything else actually already checks properly for the most annoying faction index being -1, or the resulting faction object being null, as relevant.
*** Though it is worth noting that if there is mysterious threat showing up because of minor faction aggro against the AI, it's possibly because the AI got a -1 from this at some point.
** Thanks to DefeatedByTheCat for the report that led us to finding this. This isn't actually a new bug at all, just a rare one apparently.

Issue History

Date Modified Username Field Change
Jan 23, 2020 9:30 am DefeatedByTheCat New Issue
Jan 23, 2020 9:30 am DefeatedByTheCat File Added: 755 Jan 2020.save
Jan 23, 2020 9:30 am DefeatedByTheCat File Added: 755 Jan 2020.savemet
Jan 23, 2020 9:31 am DefeatedByTheCat Description Updated
Jan 23, 2020 9:56 am BadgerBadger Note Added: 0055735
Jan 23, 2020 10:05 am Chris_McElligottPark Note Added: 0055736
Jan 23, 2020 10:05 am Chris_McElligottPark Note Added: 0055737
Jan 23, 2020 10:05 am Chris_McElligottPark Assigned To => Chris_McElligottPark
Jan 23, 2020 10:05 am Chris_McElligottPark Status new => assigned
Jan 23, 2020 10:20 am Chris_McElligottPark Note Added: 0055738
Jan 23, 2020 10:31 am Chris_McElligottPark Status assigned => resolved
Jan 23, 2020 10:31 am Chris_McElligottPark Resolution open => fixed
Jan 23, 2020 10:31 am Chris_McElligottPark Fixed in Version => 1.309 Instigator Cheekiness
Jan 23, 2020 10:31 am Chris_McElligottPark Note Added: 0055739