RegionCostCalculator problem slowing the game to couple fps

Started by veriszg, November 29, 2018, 06:58:49 AM

Previous topic - Next topic

veriszg

Here is the link for full info: https://www.dropbox.com/sh/q951yb1tmnlujfe/AADmrs2eDDJZDpjKlUWQdZoba?dl=0
1. Savegame
2. Mod list - screenshots
3. Mod list - xml
4. output_log

Generally, after some time the game is producing this error and slowing down. Tested it on fresh game. No mod list etc changes since the start.
Also Pawn Rules addon makes the error on drug list policies on the first time when config window is shown after loading the save.

The bug shows in the log like this:

Exception ticking Muffalo64707 (at (230, 0, 63)): System.NullReferenceException: Object reference not set to an instance of an object
at Verse.AI.RegionCostCalculator.GetRegionDistance (Verse.Region,Verse.RegionLink&) <0x0026b>
at Verse.AI.RegionCostCalculator.GetRegionBestDistances (Verse.Region,Verse.RegionLink&,Verse.RegionLink&,int&) <0x00043>
at Verse.AI.RegionCostCalculatorWrapper.GetPathCostFromDestToRegion (int) <0x00115>
at Verse.AI.PathFinder.FindPath (Verse.IntVec3,Verse.LocalTargetInfo,Verse.TraverseParms,Verse.AI.PathEndMode) <0x02b9a>
at Verse.AI.PathFinder.FindPath (Verse.IntVec3,Verse.LocalTargetInfo,Verse.Pawn,Verse.AI.PathEndMode) <0x00109>
at Verse.AI.Pawn_PathFollower.GenerateNewPath () <0x000fa>
at Verse.AI.Pawn_PathFollower.TrySetNewPath () <0x0002b>
at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () <0x00748>
at Verse.AI.Pawn_PathFollower.PatherTick () <0x00646>
at (wrapper dynamic-method) Verse.Pawn.Tick_Patch1 (object) <0x00136>
at Verse.TickList.Tick () <0x00487>

I tried with different mod configurations but can't fin which one causes it. The mods don't seem to change any pathfinding, so this bug is really strange.
Oh, and for example, this muffalo having pathing problem - the animal is in the wild. Didn't interact with it in any way, too.
The bug happened for pawns or different animals, too.

Any ideas?