RimWorld

RimWorld

Vanilla Social Interactions Expanded
Exception while recalculating VSIE_IsRoyalty thought state for pawn
https://gist.github.com/HugsLibRecordKeeper/2052d0f13a3b96b5d89d05d86df8cf67

Getting an exception every few seconds out of nowhere on my latest colony, no new mods that have been added causing anything.



Exception while recalculating VSIE_IsRoyalty thought state for pawn Tail: System.NullReferenceException: Object reference not set to an instance of an object
[Ref B8F2B8FE]
at VanillaSocialInteractionsExpanded.ThoughtWorker_IsRoyalty.IsRoyalty (Verse.Pawn pawn, Verse.Pawn other) [0x0000c] in <6d6f2040c41b42d09b0cf9db0d0b78f1>:0
at VanillaSocialInteractionsExpanded.ThoughtWorker_IsRoyalty.CurrentSocialStateInternal (Verse.Pawn p, Verse.Pawn other) [0x00024] in <6d6f2040c41b42d09b0cf9db0d0b78f1>:0
at RimWorld.ThoughtWorker.CurrentSocialState (Verse.Pawn p, Verse.Pawn otherPawn) [0x00010] in <24d25868955f4df08b02c73b55f389fe>:0
at RimWorld.SituationalThoughtHandler.TryCreateSocialThought (RimWorld.ThoughtDef def, Verse.Pawn otherPawn) [0x00021] in <24d25868955f4df08b02c73b55f389fe>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)



This appears to happen for every single pawn, including ... "plasma drill" ?? This just stared occurring on my save after having drills since nearly the beginning, several in-game years now at the very least.

The error is occurring even if I disable all of the VSIE settings in mod options.
< >
Zobrazuje se 15 z 5 komentářů
Update: This persists past reloading the save, as well as restarting the game. The only thing I can think of is that I have 15 of the Plasma Drill from Project RimFactory Continued built, and this error starts to show up shortly after building #13, #14, or $15 of the Plasma Drill
If I destroy all of my plasma drills via Developer mode, the error ceases.
If I power toggle all of my drills off, the error ceases.
Doing some more testing, this appears to occur when a bill is finished by the plasma drills and a new bill starts.
In looking at the source code, it is pretty clear that there is a missing `null` check or coalesce in ThoughtWorker_IsRoyalty[github.com], which Sn1p3rr3c0n was kind enough to investigate on Discord.



RoyalTitle mostSeniorTitle = pawn.royalty.MostSeniorTitle; RoyalTitle mostSeniorTitle2 = other.royalty.MostSeniorTitle;

it would seem that a correction would be pawn?.royalty?.MostSeniorTitle
< >
Zobrazuje se 15 z 5 komentářů
Na stránku: 1530 50