ihsoft / TimberbornMods

Mods for Timberborn game
The Unlicense
0 stars 1 forks source link

Automation: Pathfidning service fails under undetermined conditions #57

Open ihsoft opened 3 months ago

ihsoft commented 3 months ago

With a lot of rules set, it fails liek this:

240618T234918.778 [EXCEPTION] [System.Collections.Generic.List`1[T].get_Item] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <cb3602b5bf2148caa08db7780ec02b19>:0)
   at Automation.PathCheckingSystem.PathCheckingService.IsNonBlockingPathSite (Automation.PathCheckingSystem.PathCheckingSite pathSite, Automation.PathCheckingSystem.PathCheckingSite testSite) (at <5ca0093adcab4951b260589fd6108fb8>:0)
   at Automation.PathCheckingSystem.PathCheckingService.IsBlockingSite (Automation.PathCheckingSystem.PathCheckingSite site) (at <5ca0093adcab4951b260589fd6108fb8>:0)
   at Automation.PathCheckingSystem.PathCheckingService.CheckBlockingStateAndTriggerActions (Automation.PathCheckingSystem.PathCheckingSite site) (at <5ca0093adcab4951b260589fd6108fb8>:0)
   at Automation.PathCheckingSystem.ConstructionSiteFinishIfRequirementsMetPatch.Prefix (System.Boolean __runOriginal, Timberborn.ConstructionSites.ConstructionSite __instance) (at <5ca0093adcab4951b260589fd6108fb8>:0)
   at (wrapper dynamic-method) Timberborn.ConstructionSites.ConstructionSite.DMD<Timberborn.ConstructionSites.ConstructionSite::FinishIfRequirementsMet>(Timberborn.ConstructionSites.ConstructionSite)
   at Timberborn.ConstructionSites.ConstructionSite.SetBuildTimeProgress (System.Single buildTimeProgressInHours) (at <10f964b59d6c4baabd3675ae6719ab68>:0)
   at Timberborn.ConstructionSites.ConstructionSite.IncreaseBuildTime (System.Single hours) (at <10f964b59d6c4baabd3675ae6719ab68>:0)
   at Timberborn.ConstructionSites.BuildExecutor.Tick (System.Single deltaTimeInHours) (at <10f964b59d6c4baabd3675ae6719ab68>:0)
   at Timberborn.BehaviorSystem.BehaviorManager.TickRunningExecutor () (at <a7e1487fb58a42b89177e09af6a03efc>:0)
   at Timberborn.BehaviorSystem.BehaviorManager.Tick () (at <a7e1487fb58a42b89177e09af6a03efc>:0)
   at Timberborn.TickSystem.TickableComponent.StartAndTick () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickableEntity.TickTickableComponents () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickableEntity.Tick () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Rethrow as Exception: Exception thrown while ticking entity e7915862-eca4-40dc-8675-e24f902e0536 'BeaverAdultMelelea'
   at Timberborn.TickSystem.TickableEntity.Tick () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickableEntityBucket.TickAll () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickableBucketService.TickNextBucket () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickableBucketService.TickBuckets (System.Int32 numberOfBucketsToTick) (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.Ticker.Update (System.Single deltaTimeInSeconds) (at <94231f6214b342a1a91fb25bd7bf05d7>:0)
   at Timberborn.TickSystem.TickerUpdater.Update () (at <94231f6214b342a1a91fb25bd7bf05d7>:0)

No clear conditions known. Nor reproducing steps yet.

ihsoft commented 3 months ago

It's an edge case when test path is 2 nodes long.