View Issue Details

IDProjectCategoryLast Update
0024812AI War 2Crash/ExceptionMay 6, 2021 1:17 am
ReporterZweihand Assigned To 
Status newResolutionopen 
Product Version2.899 Almost Press Build 
Summary0024812: Dyson Sphere causes exception error during game start.
Description5/5/2021 7:27:10 PM 2.899 SINGLEP Applied Framerate Type: 144 FPS (vsync: 0 targetFPS:144)
5/5/2021 7:27:51 PM 2.899 SINGLEP Exception in GenerateDysonSphereObjectives at stage 20:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <9577ac7a62ef43179789031239ba8798>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Collections.Generic.List`1[T].RemoveAt (System.Int32 index) [0x00009] in <9577ac7a62ef43179789031239ba8798>:0
  at Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () [0x0003b] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at System.Environment.get_StackTrace () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, System.Boolean IncludeStackTrace, Arcen.Universal.Verbosity Verbosity, System.DateTime Timestamp) [0x00000] in <d33f9d4049fd42d3a135d7e0864ef930>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, System.Boolean IncludeStackTrace, Arcen.Universal.Verbosity Verbosity) [0x00000] in <d33f9d4049fd42d3a135d7e0864ef930>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <d33f9d4049fd42d3a135d7e0864ef930>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <d33f9d4049fd42d3a135d7e0864ef930>:0
  at Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives_BackgroundThread () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <06d655474a4340a39fb51d596299c959>:0
  at Arcen.AIW2.External.PerSecondNonSimPlanning.DoCentralLoop () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.External.PerSecondNonSimPlanning.Execute () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.External.ArcenSimPlanningContext.InnerRun () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at Arcen.AIW2.External.ArcenThread.InternalActualThreadFunction () [0x00000] in <54c2bb18afed45ca9cda7a74adc464d4>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
  at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0

TagsNo tags attached.

Activities

BadgerBadger

May 6, 2021 1:17 am

manager   ~0061376

Here's the code:
          for ( int i = 0; i < SpecialFaction_DysonSphere.DysonSpheres_AllFactions.Count; i++ )
                {
                    debugStage = 10;
                    GameEntity_Squad sphere = SpecialFaction_DysonSphere.DysonSpheres_AllFactions[i];
                    if ( sphere == null || sphere.Planet == null )
                    {
                        debugStage = 20;
                        //this got stale between an exit and load of a savegame, most likely
                        SpecialFaction_DysonSphere.DysonSpheres_AllFactions.RemoveAt( i ); <===
                        i--;
                        continue;
                    }

I don't think we should be messing with this data structure here. I think we should remove the offending line. The DysonSpheres_AllFactions is set in Stage2 and cleared in GlobalClear(), so the data structure will hopefully correct itself soon. I assume this is racing with GlobalClear()

Issue History

Date Modified Username Field Change
May 5, 2021 10:29 pm Zweihand New Issue
May 6, 2021 1:17 am BadgerBadger Note Added: 0061376