RimWorld

RimWorld

Misc. Robots
irilis 15. aug. 2021 kl. 13:17
NullReferenceException in log
I see multiple errors like this in Player.log:

Exception in BreadthFirstTraverse: System.NullReferenceException: Object reference not set to an instance of an object at RimWorld.GenConstruct.CanConstruct (Verse.Thing t, Verse.Pawn pawn, Verse.WorkTypeDef workType, System.Boolean forced) [0x00000] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.WorkGiver_ConstructDeliverResourcesToFrames.JobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x0002e] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.WorkGiver_Scanner.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x00000] in <00638943358e4807bd44cd7bc8f572da>:0 at AIRobot.X2_JobGiver_Work+<>c__DisplayClass1_0.<TryIssueJobPackage>b__1 (Verse.Thing t) [0x0000e] in <a0adc82c73eb48cc9870e2f9e12039e7>:0 at Verse.GenClosest+<>c__DisplayClass4_0.<RegionwiseBFSWorker>b__1 (Verse.Region r) [0x000f7] in <00638943358e4807bd44cd7bc8f572da>:0 at Verse.RegionTraverser+BFSWorker.BreadthFirstTraverseWork (Verse.Region root, Verse.RegionEntryPredicate entryCondition, Verse.RegionProcessor regionProcessor, System.Int32 maxRegions, Verse.RegionType traversableRegionTypes) [0x00054] in <00638943358e4807bd44cd7bc8f572da>:0 at Verse.RegionTraverser.BreadthFirstTraverse (Verse.Region root, Verse.RegionEntryPredicate entryCondition, Verse.RegionProcessor regionProcessor, System.Int32 maxRegions, Verse.RegionType traversableRegionTypes) [0x00044] in <00638943358e4807bd44cd7bc8f572da>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
< >
Viser 1-3 af 3 kommentarer
irilis 29. aug. 2021 kl. 4:03 
I may have found the cause of this error.

Without "MiscRobots WorkTab support" mod robots have "<workSettings IsNull="True" />" in save files. With that mod robots have at least "<workSettings><priorities IsNull="True" /></workSettings>".

RimWorld.GenConstruct.CanConstruct seems to use pawn.workSettings without checking for null, which generates NullReferenceException.
Pacifist 18. nov. 2021 kl. 3:30 
Oprindeligt skrevet af irilis:
I may have found the cause of this error.

Without "MiscRobots WorkTab support" mod robots have "<workSettings IsNull="True" />" in save files. With that mod robots have at least "<workSettings><priorities IsNull="True" /></workSettings>".

RimWorld.GenConstruct.CanConstruct seems to use pawn.workSettings without checking for null, which generates NullReferenceException.
what does that mean? would you then not want MiscRobots WorkTab support then?
irilis 18. nov. 2021 kl. 8:29 
Oprindeligt skrevet af Pacifist-ish:
Oprindeligt skrevet af irilis:
I may have found the cause of this error.

Without "MiscRobots WorkTab support" mod robots have "<workSettings IsNull="True" />" in save files. With that mod robots have at least "<workSettings><priorities IsNull="True" /></workSettings>".

RimWorld.GenConstruct.CanConstruct seems to use pawn.workSettings without checking for null, which generates NullReferenceException.
what does that mean? would you then not want MiscRobots WorkTab support then?
That means that "MiscRobots WorkTab support" fixed a bug that was cousing NullReferenceException. I don't use "MiscRobots WorkTab support" to change robot priorities, I just use as a patch for a bug.
< >
Viser 1-3 af 3 kommentarer
Per side: 1530 50