View Issue Details

IDProjectCategoryLast Update
0025801AI War 2Bug - OtherNov 15, 2021 5:49 pm
ReporterRocketAssistedPuffin Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 3.750 Smooth Simulator 
Fixed in VersionBeta 3.751 Faction Processing Groups 
Summary0025801: Called ElderlingsElderlingsLRP pathfinder again before it finished finding the first path!
Description3.750 SINGLEP DELAYED10 TID79 Called ElderlingsElderlingsLRP pathfinder again before it finished finding the first path! This probably means it's being called by two threads! Run started: 0 ticks ago (0ms)
  at System.Environment.get_StackTrace () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c2a09fa7828c4a658708fa1f6e00464b>:0
  at Arcen.AIW2.External.ArcenPathfinder`1[N].FindPathInner (Arcen.AIW2.Core.Faction Fac, System.String DebugAddendum, Arcen.Universal.List`1[T] PathToFill, N Origin, N Target, System.Int32 NeedToGetWithinXRangeOfTarget, System.Int32 RequiresNoMoreThanXRangeFromOrigin, System.Boolean DoDebugLog, Arcen.AIW2.Core.ArcenSimContextAnyStatus Context) [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at Arcen.AIW2.External.ArcenPathfinder`1[N].FindPath (Arcen.AIW2.Core.Faction Fac, System.String DebugAddendum, Arcen.Universal.List`1[T] PathToFill, N Origin, N Target, System.Int32 NeedToGetWithinXRangeOfTarget, System.Int32 RequiresNoMoreThanXRangeFromOrigin, System.Boolean DoDebugLog, Arcen.AIW2.Core.ArcenSimContextAnyStatus Context) [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at Arcen.AIW2.External.PathingHelper.InnerFindPath_Raw (Arcen.AIW2.Core.Faction faction, System.String DebugAddendum, Arcen.AIW2.Core.Planet Origin, Arcen.AIW2.Core.Planet Target, Arcen.AIW2.External.PathingMode mode, Arcen.AIW2.Core.ArcenSimContextAnyStatus Context) [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at Arcen.AIW2.External.PathingHelper.FindPathFreshOrFromCache (Arcen.AIW2.Core.Faction ForFaction, System.String DebugAddendum, Arcen.AIW2.Core.Planet Origin, Arcen.AIW2.Core.Planet Target, Arcen.AIW2.External.PathingMode mode, Arcen.AIW2.Core.ArcenSimContextAnyStatus Context) [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at Arcen.AIW2.External.ElderlingsFactionDeepInfo.DoLongRangePlanning_OnBackgroundNonSimThread_Subclass (Arcen.AIW2.External.ArcenLongTermIntermittentPlanningContext Context) [0x00000] in <ac3b1f678e8044df82357cd1f96348c1>:0
  at Arcen.AIW2.External.ExternalFactionDeepInfoRoot.DoLongRangePlanning_OnBackgroundNonSimThread_HostOnly (Arcen.AIW2.Core.ILongRangePlanningHostContext Context) [0x00000] in <ac3b1f678e8044df82357cd1f96348c1>:0
  at Arcen.AIW2.Core.Faction.Safe_DeepInfo_DoLongRangePlanning_OnBackgroundNonSimThread_HostOnly (Arcen.AIW2.Core.ILongRangePlanningHostContext Context) [0x00000] in <3a199007cbeb47ed862f6cf7e3d06c59>:0
  at Arcen.AIW2.External.SpecialFactionPlanning.Execute () [0x00000] in <ac3b1f678e8044df82357cd1f96348c1>:0
  at Arcen.AIW2.External.ArcenHostOnlySimPlanningContext.BackgroundThreadRunHandler (System.Boolean FailSilentlyIfNotFinishedYet) [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at Arcen.AIW2.External.ArcenHostOnlySimPlanningContext+<>c__DisplayClass13_0.<RunOnBackgroundThread>b__0 () [0x00000] in <af5ef548ed2c45d982be76ca809f7ab2>:0
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.Tasks.Task.Execute () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.Tasks.Task.ExecutionContextCallback (System.Object obj) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.Tasks.Task.ExecuteEntry (System.Boolean bPreventDoubleExecution) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
TagsNo tags attached.

Relationships

related to 0025822 resolvedChris_McElligottPark Neinzul SappersSappersLRP pathfinder threading exception 

Activities

Chris_McElligottPark

Nov 15, 2021 5:49 pm

administrator   ~0063309

Thanks!

* Improved the pathfinding error handling debug info.

* Added a new processing_group="Name" on faction definitions that is required.
** This allows us to aggregate "hey, am I allowed to run at the same time?" in the way we really need to. We had something like this before, but not enough.
** This in turn requires new xml in a new folder called SpecialFactionProcessingGroup, and that fills a SpecialFactionProcessingGroup object in the code, which is mostly used for LRP threading locks.

* UniqueNameForFactionToAvoidThreadConflicts has been removed, replaced with a reference to the faction's SpecialFactionProcessingGroup.

* Okay! This has been a problem for longer than I realized, as it turns out; it just has been more obvious in recent months.
** Essentially, the way we were handling factions that used shared resources for their "LRP processing" previously only attempted to not let them START in the same lrp sim cycle, but it was not preventing them from starting in multiple cycles and thus overlapping.
** Good grief, this was more untangling than expected. This SHOULD prove to be the end of any sort of "pathfinder already running" errors, but we'll have to wait longer and see if folks still run into it. I really don't think they will, knock on wood.

Issue History

Date Modified Username Field Change
Nov 12, 2021 8:36 am RocketAssistedPuffin New Issue
Nov 12, 2021 11:30 am BadgerBadger Assigned To => Chris_McElligottPark
Nov 12, 2021 11:30 am BadgerBadger Status new => assigned
Nov 14, 2021 3:57 pm BadgerBadger Relationship added related to 0025822
Nov 15, 2021 5:49 pm Chris_McElligottPark Status assigned => resolved
Nov 15, 2021 5:49 pm Chris_McElligottPark Resolution open => fixed
Nov 15, 2021 5:49 pm Chris_McElligottPark Fixed in Version => Beta 3.751 Faction Processing Groups
Nov 15, 2021 5:49 pm Chris_McElligottPark Note Added: 0063309