Build of Fabrication Bench leads to error [solved]

Started by DaBeschi, January 13, 2023, 04:12:34 PM

Previous topic - Next topic

DaBeschi

Hello,
I played for a while on my modded game and only encountered smaller bugs until I build my first fabrication bench.
I get the following errors if I place the bench in a dedicated room (Kitchen, workshop, ...) but not if I place it in a corridor. One message is with "functional rooms"-MOD enabled and one without it. More annoying is the fact of getting a corrupted save file when one bench is build.

Exception in UIRootUpdate: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.RoomRoleWorker_Kitchen.GetScore (Verse.Room room) [0x00060] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.<UpdateRoomStatsAndRole>b__94_0 (Verse.RoomRoleDef x) [0x00006] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector, System.Collections.Generic.IComparer`1[T] comparer) [0x0005c] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.UpdateRoomStatsAndRole () [0x0009c] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.get_Role () [0x00008] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.EnvironmentStatsDrawer.ShouldShowRoomStats () [0x00045] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.EnvironmentStatsDrawer.ShouldShowWindowNow () [0x00000] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.EnvironmentStatsDrawer.DrawRoomOverlays () [0x00022] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at (wrapper dynamic-method) RimWorld.MapInterface.RimWorld.MapInterface.MapInterfaceUpdate_Patch3(RimWorld.MapInterface)
  at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootUpdate_Patch1(RimWorld.UIRoot_Play)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootUpdate_Patch1 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Play:Update ()


Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.RoomRoleWorker_Kitchen.GetScore (Verse.Room room) [0x00060] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.<UpdateRoomStatsAndRole>b__94_0 (Verse.RoomRoleDef x) [0x00006] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector, System.Collections.Generic.IComparer`1[T] comparer) [0x0005c] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.UpdateRoomStatsAndRole () [0x0009c] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at Verse.Room.GetStat (Verse.RoomStatDef roomStat) [0x00008] in <3126aca1aad041dcbdeda807cfe004bf>:0
  at FunctionalRoom.Room_Patch.Notify_ContainedThingSpawnedOrDespawned_Postfix (Verse.Thing th) [0x0001c] in <58f6eacb3be14f83aec667a4c4df15e6>:0
  at (wrapper dynamic-method) Verse.Room.Verse.Room.Notify_ContainedThingSpawnedOrDespawned_Patch2(Verse.Room,Verse.Thing)
  at (wrapper dynamic-method) Verse.Thing.Verse.Thing.SpawnSetup_Patch2(Verse.Thing,Verse.Map,bool)
  at (wrapper dynamic-method) Verse.ThingWithComps.Verse.ThingWithComps.SpawnSetup_Patch1(Verse.ThingWithComps,Verse.Map,bool)
  at (wrapper dynamic-method) Verse.Building.Verse.Building.SpawnSetup_Patch0(Verse.Building,Verse.Map,bool)
  at (wrapper dynamic-method) RimWorld.Building_WorkTable.RimWorld.Building_WorkTable.SpawnSetup_Patch0(RimWorld.Building_WorkTable,Verse.Map,bool)
  at (wrapper dynamic-method) Verse.GenSpawn.Verse.GenSpawn.Spawn_Patch2(Verse.Thing,Verse.IntVec3,Verse.Map,Verse.Rot4,Verse.WipeMode,bool)
  at (wrapper dynamic-method) RimWorld.Designator_Build.RimWorld.Designator_Build.DesignateSingleCell_Patch1(RimWorld.Designator_Build,Verse.IntVec3)
  at (wrapper dynamic-method) Verse.DesignatorManager.Verse.DesignatorManager.ProcessInputEvents_Patch1(Verse.DesignatorManager)
  at (wrapper dynamic-method) RimWorld.MapInterface.RimWorld.MapInterface.HandleMapClicks_Patch1(RimWorld.MapInterface)
  at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch2(RimWorld.UIRoot_Play)
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch2(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch2 (Verse.Root)


I already tried to track it down, but with no luck. Other Benches do not produce this error. I hope for an experienced guy to give me a kick in the right direction so that I do not have to scrap my game.

Thanks

Canute

Hi,
i see 2 patches at the error msg.
You can try to find these patches at the patch list, maybe you can find the mod which made them.
Fastest way to get the patch list, when you use the hugslib feature to upload the log, then the patches are below the modlist.

DaBeschi

#2
Hello,
Thank you Canute.
I found LWM Deep Storage in teh process and after disableing it the error on placing the fabrication bench did not appear, but the save still gets corrupted. Then I  removed Better Pawn Control and the error reappers.

<script src="https://gist.github.com/HugsLibRecordKeeper/1028a5948304494a5d266e36c9c6e623.js"></script>
https://gist.github.com/HugsLibRecordKeeper/1028a5948304494a5d266e36c9c6e623

I'm not sure what to search for.

DaBeschi

#3
Hello,
Thanks all of you who had a look into this case!

Unfortunately I had messed up one of my personal patches. What I did wrong exactly or missed during the transition to 1.4 is still unknown, but I am able to eliminate/recreate the error by activating/deactivating my patch-collection.
Greetings

Edit: For all who are interested in what caused the problem: I use "JetPack (Continued)" and replaced all 4 variants with one fitted for my needs. In the process I missed the recipe for conversion of power armor to jet pack power armor. This is all, I removed this recipe and problem solved ... what a journey because of such a tiny thing.