RimWorld

RimWorld

Prepare Landing
Lt. Sniffles 29 Oct, 2022 @ 2:30pm
Keybind Bug
Hello, love the mod. Recently updated to 1.4 and I'm getting the following message when I try to use default keybinds in-game, like the Space bar to pause and resume. The keybinds just don't work, and it throws this error:

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
at PrepareLanding.RimWorldEventHandler.OnWorldInterfaceOnGuiPump () [0x0000e] in <d7b2846cb8e24b9e8f52feb9276ef963>:0
at PrepareLanding.RimWorldEventHandler.OnWorldInterfaceOnGui () [0x00000] in <d7b2846cb8e24b9e8f52feb9276ef963>:0
at (wrapper delegate-invoke) <Module>.invoke_void()
at PrepareLanding.Patches.PatchWorldInterfaceOnGui.WorldInterfaceOnGuiPostFix () [0x00000] in <d7b2846cb8e24b9e8f52feb9276ef963>:0
at (wrapper dynamic-method) RimWorld.WorldInterface.RimWorld.WorldInterface.WorldInterfaceOnGUI_Patch1(RimWorld.WorldInterface)
at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch2(RimWorld.UIRoot_Play)
at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
< >
Showing 1-4 of 4 comments
Lt. Sniffles 29 Oct, 2022 @ 2:43pm 
Update: Can confirm that disabling Prepare Landing and restarting results in the keybinds working again.
neitsa  [developer] 31 Oct, 2022 @ 2:54am 
Thanks for the issue! I haven't been able to repro on my side, and the location where it happens really points towards a mod conflict :(

Tech stuff: Prepare landing (PL) is doing a postfix hook on WorldInterfaceOnGUI (all mods can do that without any problems) which means the original method (in Rimworld) is called **and then** the PL method is called. If someone (another mod) does a **prefix** hook - calling their function and then the original - it gets complicated and the postfix hooks might not be called altogether. Which seems to be what happens here.

I'll see what I can do, mostly performing stuff in degraded mode (some stuff are really not going to work) and then logging the fact that PL is not working correctly.
Last edited by neitsa; 31 Oct, 2022 @ 2:54am
Lt. Sniffles 31 Oct, 2022 @ 12:36pm 
Ah that's a shame, thank you for looking into it! I have a sizeable number of mods running, but this became an issue after updating to 1.4 with significantly fewer mods. Would it be world generation mods that might be the cause of the issue?
Vinlic 1 Nov, 2022 @ 8:42am 
I'm also getting this bug. It did work fine in my 400ish mod list then I added some recently updated mods and it broke for the new play through. I'll remove those and see if it still works then maybe I can narrow down which mod breaks it since it should be one of the new ones I added. Here's my log in case that can help you.

https://gist.github.com/d6b75decb1a35251077021274b16169e
Last edited by Vinlic; 1 Nov, 2022 @ 8:44am
< >
Showing 1-4 of 4 comments
Per page: 1530 50