cseelhoff / RimThreaded

RimThreaded is a RimWorld mod designed to enable RimWorld to utilize multiple threads.
MIT License
116 stars 20 forks source link

MODDED ERROR: (NWM) Real Fog of War #765

Open explodoboy opened 2 years ago

explodoboy commented 2 years ago

Developer To Do Notes:

Non-Vanilla Bug Report

Describe the bug

When using the (NWM) Real Fog of War mod, (seemingly) random errors occur. Errors are somewhat consistent.

Steps to reproduce the behavior (VERY IMPORTANT)

  1. Create a map. Any map appears to work, though through my testing more errors occurred in temperate forests.
  2. Draft and move your pawns across the map, revealing things hidden under the fog of war. Not all errors appear to be related to pawn movement.

Error Logs ?

Removing unneeded FoV watcher from Hive11587
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
RimWorldRealFoW.CompFieldOfViewWatcher:PostSpawnSetup (bool)
RimWorldRealFoW.CompMainComponent:PostSpawnSetup (bool)
Verse.ThingWithComps:SpawnSetup (Verse.Map,bool)
RimWorld.Hive:SpawnSetup (Verse.Map,bool)
Verse.GenSpawn:Spawn (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.Rot4,Verse.WipeMode,bool)
Verse.GenSpawn:Spawn (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.WipeMode)
RimWorld.BaseGen.SymbolResolver_Hives:Resolve (RimWorld.BaseGen.ResolveParams)
RimWorld.BaseGen.BaseGen:Resolve (RimWorld.BaseGen.SymbolStack/Element)
RimWorld.BaseGen.BaseGen:Generate ()
RimWorld.GenStep_ScatterShrines:ScatterAt (Verse.IntVec3,Verse.Map,Verse.GenStepParams,int)
Verse.GenStep_Scatterer:Generate (Verse.Map,Verse.GenStepParams)
Verse.MapGenerator:GenerateContentsIntoMap (System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,Verse.Map,int)
(wrapper dynamic-method) Verse.MapGenerator:Verse.MapGenerator.GenerateMap_Patch1 (Verse.IntVec3,RimWorld.Planet.MapParent,Verse.MapGeneratorDef,System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,System.Action`1<Verse.Map>)
Verse.Game:InitNewGame ()
Verse.Root_Play/<>c:<Start>b__1_2 ()
(wrapper dynamic-method) Verse.LongEventHandler:Verse.LongEventHandler.RunEventFromAnotherThread_Patch1 (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()

Error while resolving symbol "hives" with params=rect=(113,182,122,196), faction=null, custom=null, combatPoints=null, pawnGroupMakerParams=null, pawnGroupKindDef=null, roofDef=null, noRoof=null, addRoomCenterToRootsToUnfog=null, singleThingToSpawn=null, singleThingDef=null, singleThingStuff=null, singleThingStackCount=null, skipSingleThingIfHasToWipeBuildingOrDoesntFit=null, spawnBridgeIfTerrainCantSupportThing=null, singleThingInnerThings=null, singlePawnToSpawn=null, singlePawnKindDef=null, disableSinglePawn=True, singlePawnLord=null, settlementLord=null, singlePawnSpawnCellExtraPredicate=null, singlePawnGenerationRequest=null, postThingSpawn=null, postThingGenerate=null, mechanoidsCount=null, hivesCount=1, disableHives=True, thingRot=null, wallStuff=null, chanceToSkipWallBlock=null, floorDef=null, chanceToSkipFloor=null, filthDef=null, filthDensity=null, floorOnlyIfTerrainSupports=null, allowBridgeOnAnyImpassableTerrain=null, clearEdificeOnly=null, clearFillageOnly=null, clearRoof=null, ancientCryptosleepCasketGroupID=null, podContentsType=null, ancientCryptosleepCasketOpenSignalTag=null, thingSetMakerDef=null, thingSetMakerParams=null, stockpileConcreteContents=null, stockpileMarketValue=null, innerStockpileSize=null, edgeDefenseWidth=null, edgeDefenseTurretsCount=null, edgeDefenseMortarsCount=null, edgeDefenseGuardsCount=null, mortarDef=null, pathwayFloorDef=null, cultivatedPlantDef=null, fixedCulativedPlantGrowth=null, fillWithThingsPadding=null, settlementPawnGroupPoints=null, settlementPawnGroupSeed=null, settlementDontGeneratePawns=null, attackWhenPlayerBecameEnemy=null, streetHorizontal=null, edgeThingAvoidOtherEdgeThings=null, edgeThingMustReachMapEdge=null, allowPlacementOffEdge=null, thrustAxis=null, makeWarningLetter=True, allowedMonumentThings=ingredients, bedCount=null, workSitePoints=null, lootConcereteContents=null, lootMarketValue=null, extraDoorEdge=null, minLengthAfterSplit=null

Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldRealFoW.CompFieldOfViewWatcher.updateFoV (System.Boolean forceUpdate) [0x001a7] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.PostSpawnSetup (System.Boolean respawningAfterLoad) [0x002cb] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompMainComponent.PostSpawnSetup (System.Boolean respawningAfterLoad) [0x00068] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at Verse.ThingWithComps.SpawnSetup (Verse.Map map, System.Boolean respawningAfterLoad) [0x00020] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimWorld.Hive.SpawnSetup (Verse.Map map, System.Boolean respawningAfterLoad) [0x00000] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at Verse.GenSpawn.Spawn (Verse.Thing newThing, Verse.IntVec3 loc, Verse.Map map, Verse.Rot4 rot, Verse.WipeMode wipeMode, System.Boolean respawningAfterLoad) [0x00261] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at Verse.GenSpawn.Spawn (Verse.Thing newThing, Verse.IntVec3 loc, Verse.Map map, Verse.WipeMode wipeMode) [0x00008] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimWorld.BaseGen.SymbolResolver_Hives.Resolve (RimWorld.BaseGen.ResolveParams rp) [0x0007d] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimWorld.BaseGen.BaseGen.Resolve (RimWorld.BaseGen.SymbolStack+Element toResolve) [0x000e5] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimWorld.BaseGen.BaseGen.Generate () [0x000ce] in <99518a644a3e4a7ea3fde566568df84a>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
RimWorld.BaseGen.BaseGen:Generate ()
RimWorld.GenStep_ScatterShrines:ScatterAt (Verse.IntVec3,Verse.Map,Verse.GenStepParams,int)
Verse.GenStep_Scatterer:Generate (Verse.Map,Verse.GenStepParams)
Verse.MapGenerator:GenerateContentsIntoMap (System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,Verse.Map,int)
(wrapper dynamic-method) Verse.MapGenerator:Verse.MapGenerator.GenerateMap_Patch1 (Verse.IntVec3,RimWorld.Planet.MapParent,Verse.MapGeneratorDef,System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,System.Action`1<Verse.Map>)
Verse.Game:InitNewGame ()
Verse.Root_Play/<>c:<Start>b__1_2 ()
(wrapper dynamic-method) Verse.LongEventHandler:Verse.LongEventHandler.RunEventFromAnotherThread_Patch1 (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()

Exception ticking Meyer (at (131, 0, 144)): 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 <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Collections.Generic.List`1[T].RemoveAt (System.Int32 index) [0x00009] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Collections.Generic.List`1[T].Remove (T item) [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at RimWorldRealFoW.MapComponentSeenFog.DeregisterCompHideFromPlayerPosition (RimWorldRealFoW.CompHideFromPlayer comp, System.Int32 x, System.Int32 z) [0x0002e] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompComponentsPositionTracker.updatePosition () [0x00174] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompComponentsPositionTracker.CompTick () [0x0002b] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompMainComponent.CompTick () [0x00017] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at Verse.ThingWithComps.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at Verse.Pawn.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimThreaded.TickList_Patch.NormalThingTick () [0x00025] in <61c687c4d8ae440b8962a72b165158e2>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)

Exception ticking Meyer (at (139, 0, 194)): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldRealFoW.MapComponentSeenFog.decrementSeen (RimWorld.Faction faction, System.Int16[] factionShownCells, System.Int32 idx) [0x00082] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.calculateFoV (Verse.Thing thing, System.Int32 intRadius, Verse.IntVec3[] peekDirections) [0x00454] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.livePawnCalculateFov (Verse.IntVec3 position, System.Single sightRangeMod, System.Boolean forceUpdate, RimWorld.Faction faction) [0x001e0] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.updateFoV (System.Boolean forceUpdate) [0x000d6] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.CompTick () [0x00177] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompMainComponent.CompTick () [0x00064] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at Verse.ThingWithComps.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at Verse.Pawn.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimThreaded.TickList_Patch.NormalThingTick () [0x00025] in <61c687c4d8ae440b8962a72b165158e2>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)

Exception ticking Meyer (at (137, 0, 194)): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldRealFoW.MapComponentSeenFog.incrementSeen (RimWorld.Faction faction, System.Int16[] factionShownCells, System.Int32 idx) [0x00137] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.ShadowCaster.computeFieldOfViewInOctantZero (System.Byte octant, System.Boolean[] fovGrid, System.Int32 fovGridMinX, System.Int32 fovGridMinY, System.Int32 fovGridWidth, System.Boolean[] oldFovGrid, System.Int32 oldFovGridMinX, System.Int32 oldFovGridMaxX, System.Int32 oldFovGridMinY, System.Int32 oldFovGridMaxY, System.Int32 oldFovGridWidth, System.Int32 radius, System.Int32 r_r, System.Int32 startX, System.Int32 startY, System.Int32 maxX, System.Int32 maxY, System.Boolean[] viewBlockerCells, System.Boolean handleSeenAndCache, RimWorldRealFoW.MapComponentSeenFog mapCompSeenFog, RimWorld.Faction faction, System.Int16[] factionShownCells, System.Int32 targetX, System.Int32 targetY, System.Int32 x, System.Int32 topVectorX, System.Int32 topVectorY, System.Int32 bottomVectorX, System.Int32 bottomVectorY) [0x002d2] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.ShadowCaster.computeFieldOfViewWithShadowCasting (System.Int32 startX, System.Int32 startY, System.Int32 radius, System.Boolean[] viewBlockerCells, System.Int32 maxX, System.Int32 maxY, System.Boolean handleSeenAndCache, RimWorldRealFoW.MapComponentSeenFog mapCompSeenFog, RimWorld.Faction faction, System.Int16[] factionShownCells, System.Boolean[] fovGrid, System.Int32 fovGridMinX, System.Int32 fovGridMinY, System.Int32 fovGridWidth, System.Boolean[] oldFovGrid, System.Int32 oldFovGridMinX, System.Int32 oldFovGridMaxX, System.Int32 oldFovGridMinY, System.Int32 oldFovGridMaxY, System.Int32 oldFovGridWidth, System.Byte specificOctant, System.Int32 targetX, System.Int32 targetY) [0x0001a] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.calculateFoV (Verse.Thing thing, System.Int32 intRadius, Verse.IntVec3[] peekDirections) [0x00395] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.livePawnCalculateFov (Verse.IntVec3 position, System.Single sightRangeMod, System.Boolean forceUpdate, RimWorld.Faction faction) [0x001e0] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.updateFoV (System.Boolean forceUpdate) [0x000d6] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompFieldOfViewWatcher.CompTick () [0x00177] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at RimWorldRealFoW.CompMainComponent.CompTick () [0x00064] in <bb0535d6c70245d58d76ed20ae4d594d>:0 
  at Verse.ThingWithComps.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at Verse.Pawn.Tick () [0x00024] in <99518a644a3e4a7ea3fde566568df84a>:0 
  at RimThreaded.TickList_Patch.NormalThingTick () [0x00025] in <61c687c4d8ae440b8962a72b165158e2>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
RimThreaded.TickList_Patch:NormalThingTick ()
RimThreaded.RimThreaded:ExecuteTicks ()
RimThreaded.RimThreaded:ProcessTicks (RimThreaded.RimThreaded/ThreadInfo)
RimThreaded.RimThreaded:InitializeThread (object)
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart (object)

HugsLib log

https://gist.github.com/8c7e3627961a4964c86af2d1b0b5e28a

Save file ?

bugland.zip

Mod list (Preferably a RimPy compatible list.) ?

[fogwar-rimthread-save.zip](https://github.com/cseelhoff/RimThreaded/files/8776525/fogwar-rimthread-save.zip)
ContExpo commented 2 years ago

I had kinda a similar problem, pawns would get stuck and could not access areas revealed by mining cause fog of war wasn't going away.