My World map keeps going blank randomly, with all locations removed including my colony. I am running a number of mods and can't figure out which one is causing it. This error is repeated over and over in the error logs and I think it is the bug, but I can't figure out which mod is the one causing the problem.
NullReferenceException: Object reference not set to an instance of an object
at RimWorld.Planet.WorldLayer_WorldObjects.Regenerate () [0x00000] in <filename unknown>:0
at RimWorld.Planet.WorldLayer.Render () [0x00000] in <filename unknown>:0
at RimWorld.Planet.WorldRenderer.DrawWorldLayers () [0x00000] in <filename unknown>:0
at RimWorld.Planet.World.WorldUpdate () [0x00000] in <filename unknown>:0
at Verse.Game.Update () [0x00000] in <filename unknown>:0
at Verse.Root_Play.Update () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at RimWorld.Planet.WorldObject.get_ExpandingIconPriority () [0x00000] in <filename unknown>:0
at RimWorld.Planet.ExpandableWorldObjectsUtility.<SortByExpandingIconPriority>m__302 (RimWorld.Planet.WorldObject x) [0x00000] in <filename unknown>:0
at Verse.GenCollection+<SortBy>c__AnonStorey536`3[RimWorld.Planet.WorldObject,System.Single,System.Int32].<>m__A01 (RimWorld.Planet.WorldObject a, RimWorld.Planet.WorldObject b) [0x00000] in <filename unknown>:0
at System.Array.qsort[WorldObject] (RimWorld.Planet.WorldObject[] array, Int32 low0, Int32 high0, System.Comparison`1 comparison) [0x00000] in <filename unknown>:0
at System.Array.Sort[WorldObject] (RimWorld.Planet.WorldObject[] array, Int32 length, System.Comparison`1 comparison) [0x00000] in <filename unknown>:0
Rethrow as InvalidOperationException: Comparison threw an exception.
at System.Array.Sort[WorldObject] (RimWorld.Planet.WorldObject[] array, Int32 length, System.Comparison`1 comparison) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[RimWorld.Planet.WorldObject].Sort (System.Comparison`1 comparison) [0x00000] in <filename unknown>:0
at Verse.GenCollection.SortBy[WorldObject,Single,Int32] (System.Collections.Generic.List`1 list, System.Func`2 selector, System.Func`2 thenBySelector) [0x00000] in <filename unknown>:0
at RimWorld.Planet.ExpandableWorldObjectsUtility.SortByExpandingIconPriority (System.Collections.Generic.List`1 worldObjects) [0x00000] in <filename unknown>:0
at RimWorld.Planet.ExpandableWorldObjectsUtility.ExpandableWorldObjectsOnGUI () [0x00000] in <filename unknown>:0
at RimWorld.WorldInterface.WorldInterfaceOnGUI () [0x00000] in <filename unknown>:0
at RimWorld.UIRoot_Play.UIRootOnGUI () [0x00000] in <filename unknown>:0
at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0
[attachment deleted by admin due to age]
Follow up: Found the mod causing the problem. WorkTab is the problem, most likely due to conflict with one of my other mods. Disabling it breaks saves but it makes the world map work properly on new games. Posting this so anyone who encounters the same bug can find a possible solution.
Thanks for the info. I had the exact same issue.
Deactivating the WorkTab mod and removing all instances of '<li Class="Fluffy_Tabs.WorldObject_Priorities">' and '<li Class="Fluffy_Tabs.WorldObject_Favourites">' from the save file fixed it for me (backup your save file first).
Hi, I'm the author of Work Tab.
I'm unable to replicate this bug on my local install, could you send me the full output_log and save file so I can try to figure out what's going on here?
Turns out I made a silly mistake, it's fixed now - but unfortunately that won't help for old saves.
You can remove the WorldObjects named Fluffy_xxx to reset them, which should resolve the error. If you can't do that yourself (no worries, I don't expect everyone to know xml), post your save here and I'll try and fix it for you.
Thanks for the quick fix. It seems to be working just fine.
I've reenabled WorkTabs and loaded my modified save. The save loads and the world map seems to work again.
Update; HugsLib has now also pushed an update which will do two things;
1 - throw an error if another modder makes the same mistake I did.
2 - automagically fix save games where this error was made.
The upshot is that if you update both the work tab and HugsLib, your game should work perfectly fine again - no adjustments to save files needed.
(for the record, I forgot to call base.ExposeData(), so the def field of the worldObject was null)
Confirming that the update did fix my savegame without any editing on my part. Thank you so much for the quick work. I thoroughly enjoy your mods.
I used to have this problem too and while it is fixed now my game crashes every 15 min or so... could they be somehow related? I love work tab too much to get rid of it :'(
unlikely to be related, but post the output_logs for when the game crashes - preferably in a new thread so that people notice.
I did... I guess I ran out of memory :'(