RimWorld
Prepare Landing
Lt. Sniffles 2022 年 10 月 29 日 下午 2:30
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)
< >
目前顯示第 1-4 則留言,共 4
Lt. Sniffles 2022 年 10 月 29 日 下午 2:43 
Update: Can confirm that disabling Prepare Landing and restarting results in the keybinds working again.
neitsa  [開發人員] 2022 年 10 月 31 日 上午 2:54 
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.
最後修改者:neitsa; 2022 年 10 月 31 日 上午 2:54
Lt. Sniffles 2022 年 10 月 31 日 下午 12:36 
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 2022 年 11 月 1 日 上午 8:42 
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
最後修改者:Vinlic; 2022 年 11 月 1 日 上午 8:44
< >
目前顯示第 1-4 則留言,共 4
每頁顯示: 1530 50