This repository was archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
This repository was archived by the owner on Nov 14, 2024. It is now read-only.
Incompatibility with Real Fog of War #22
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
As reported by Steam user Rafferty, there are some errors when using this mod with Real Fog of War.
Example error log follows.
JobDriver threw exception in initAction for pawn Atkinson driver=JobDriver_Kidnap (toilIndex=4) driver.job=(Kidnap (Job_2029) A=Thing_Human642 B=(145, 0, 0)) lastJobGiver=RimWorld.JobGiver_Kidnap
System.NullReferenceException: Object reference not set to an instance of an object
at RimWorldRealFoW.Detours._LetterStack.ReceiveLetter_Prefix (Verse.LookTargets&) <0x0004b>
at (wrapper dynamic-method) Verse.LetterStack.ReceiveLetter_Patch1 (object,string,string,Verse.LetterDef,Verse.LookTargets,RimWorld.Faction,string) <0x0002c>
at Desynchronized.Handlers.Handler_PawnKidnapped.SendOutNotificationLetter (Verse.Pawn,Verse.Pawn) <0x00240>
at Desynchronized.Handlers.Handler_PawnKidnapped.HandlePawnKidnapped (Verse.Pawn,Verse.Pawn) <0x0001c>
at Desynchronized.Patches.PostFix_Pawn_PreKidnapped.PostFix (Verse.Pawn,Verse.Pawn) <0x00024>
at (wrapper dynamic-method) Verse.Pawn.PreKidnapped_Patch1 (object,Verse.Pawn) <0x00247>
at RimWorld.KidnappedPawnsTracker.Kidnap (Verse.Pawn,Verse.Pawn) <0x000e1>
at Verse.Pawn.ExitMap (bool,Verse.Rot4) <0x00285>
at RimWorld.JobDriver_TakeAndExitMap/<MakeNewToils>c__Iterator0.<>m__1 () <0x001d9>
at Verse.AI.JobDriver.TryActuallyStartNextToil () <0x0071f>
Verse.Log:Error(String, Boolean)
Verse.AI.JobUtility:TryStartErrorRecoverJob(Pawn, String, Exception, JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
The relevant source code of Real Fog of War is available here: https://github.com/lukakama/rimworld-mod-real-fow/blob/master/Sources/RimWorldRealFoW/Detours/_LetterStack.cs
By inspecting the source code, one may find that Real Fog of War boldly assumed that the "pointer" of a Letter will point to a PrimaryTarget. However, in our case, the Kidnap Letter does not point to any target. Hence, the NullReferenceException is thrown.
It might be possible to patch against this error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request