RimWorld

RimWorld

LightsOut
Denne tråd er blevet låst
MarkH 22. okt. 2022 kl. 12:30
Compatibility issue with Dubs Bad Hygiene
There's an exception immediately following the line "patching "DubsBadHygiene - ProperGlowerComp" to count as a glower":


[HugsLib][ERR] LightsOut caused an exception during OnDefsLoaded: System.ArgumentException: You can only patch implemented methods/constructors. Patch the declared method virtual System.Boolean Verse.CompGlower::get_ShouldBeLitNow() instead.
at HarmonyLib.PatchProcessor.Patch () [0x00051] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <255414689d344b1385ae719f6cce8c55>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatchComponent (LightsOut.Patches.ModCompatibility.ICompatibilityPatchComponent comp) [0x00196] in <63b9db36796c453c93f7bdf2d14405f2>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatch (LightsOut.Patches.ModCompatibility.ICompatibilityPatch patch) [0x000a4] in <63b9db36796c453c93f7bdf2d14405f2>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.LoadCompatibilityPatches () [0x00015] in <63b9db36796c453c93f7bdf2d14405f2>:0
at LightsOut.Boilerplate.ModSettings.DefsLoaded () [0x00053] in <63b9db36796c453c93f7bdf2d14405f2>:0
at HugsLib.HugsLibController.OnDefsLoaded () [0x0001a] in <4a46802aeab646ab99159f7eecb6b57e>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
HugsLib.Utils.ModLogger:ReportException (System.Exception,string,bool,string)
HugsLib.HugsLibController:OnDefsLoaded ()
HugsLib.HugsLibController:LoadReloadInitialize ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()


Removing Bad Hygiene fixes the problem. I also tried loading the game with just LightsOut and Dubs and it still happens as well.
< >
Viser 1-9 af 9 kommentarer
juanlopez2008  [udvikler] 22. okt. 2022 kl. 13:19 
Fixed in latest update. Dubs made a (dumb, imo) decision when porting this mod to 1.4. That being said, I saw Wall Light do something similar, so maybe it's a workaround for something that I'm unaware of.

I don't regard Wall Light as a well-written mod, so I wouldn't be surprised if they were both just doing something silly. that was rude, knock it off juan.
Sidst redigeret af juanlopez2008; 23. okt. 2022 kl. 11:58
MarkH 22. okt. 2022 kl. 13:49 
Oprindeligt skrevet af juanlopez2008:
Fixed in latest update. Dubs made a (dumb, imo) decision when porting this mod to 1.4. That being said, I saw Wall Light do something similar, so maybe it's a workaround for something that I'm unaware of.

I don't regard Wall Light as a well-written mod, so I wouldn't be surprised if they were both just doing something silly.

Thank you for the update! Much appreciated.

Unfortunately, I'm the bearer of additional bad news. It seems the updated RimFridge is running into the same issue:

"patching "RimFridge - CompToggleGlower" to count as a glower"

[HugsLib][ERR] LightsOut caused an exception during OnDefsLoaded: System.ArgumentException: You can only patch implemented methods/constructors. Patch the declared method virtual System.Boolean Verse.CompGlower::get_ShouldBeLitNow() instead.
at HarmonyLib.PatchProcessor.Patch () [0x00051] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <255414689d344b1385ae719f6cce8c55>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatchComponent (LightsOut.Patches.ModCompatibility.ICompatibilityPatchComponent comp) [0x00196] in <9e5bf7f15ce64976bfd50e7672f4ba70>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatch (LightsOut.Patches.ModCompatibility.ICompatibilityPatch patch) [0x000a4] in <9e5bf7f15ce64976bfd50e7672f4ba70>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.LoadCompatibilityPatches () [0x00015] in <9e5bf7f15ce64976bfd50e7672f4ba70>:0
at LightsOut.Boilerplate.ModSettings.DefsLoaded () [0x00053] in <9e5bf7f15ce64976bfd50e7672f4ba70>:0
at HugsLib.HugsLibController.OnDefsLoaded () [0x0001a] in <4a46802aeab646ab99159f7eecb6b57e>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
HugsLib.Utils.ModLogger:ReportException (System.Exception,string,bool,string)
HugsLib.HugsLibController:OnDefsLoaded ()
HugsLib.HugsLibController:LoadReloadInitialize ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
juanlopez2008  [udvikler] 22. okt. 2022 kl. 14:38 
YIKES, well I added some additional checks that detects this problem so it shouldn't happen again.
Nuker1110 22. okt. 2022 kl. 17:15 
Error thrown in the newest hotfix as of posting
[HugsLib][ERR] LightsOut caused an exception during OnDefsLoaded: System.ArgumentException: You can only patch implemented methods/constructors. Patch the declared method virtual System.Boolean Verse.CompGlower::get_ShouldBeLitNow() instead.
at HarmonyLib.PatchProcessor.Patch () [0x00051] in <255414689d344b1385ae719f6cce8c55>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <255414689d344b1385ae719f6cce8c55>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatchComponent (LightsOut.Patches.ModCompatibility.ICompatibilityPatchComponent comp) [0x00196] in <3c09a7f8315e4ecdad83fd7a39b6b891>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.ApplyPatch (LightsOut.Patches.ModCompatibility.ICompatibilityPatch patch) [0x000a4] in <3c09a7f8315e4ecdad83fd7a39b6b891>:0
at LightsOut.Patches.ModCompatibility.ModCompatibilityManager.LoadCompatibilityPatches () [0x00015] in <3c09a7f8315e4ecdad83fd7a39b6b891>:0
at LightsOut.Boilerplate.ModSettings.DefsLoaded () [0x00053] in <3c09a7f8315e4ecdad83fd7a39b6b891>:0
at HugsLib.HugsLibController.OnDefsLoaded () [0x0001a] in <6685087a0fc048d49e61a2c7c1ed1aee>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
HugsLib.Utils.ModLogger:ReportException (System.Exception,string,bool,string)
HugsLib.HugsLibController:OnDefsLoaded ()
HugsLib.HugsLibController:LoadReloadInitialize ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
juanlopez2008  [udvikler] 22. okt. 2022 kl. 17:26 
Are you sure you’re on the latest version?

What version does it say in the log when my mod loads? Should be something like 2022.10.22.X.
juanlopez2008  [udvikler] 22. okt. 2022 kl. 17:27 
Only asking because I specifically disallow patching such methods in the latest version, using the same check that Harmony uses to generate that error.
Sidst redigeret af juanlopez2008; 22. okt. 2022 kl. 17:32
MarkH 23. okt. 2022 kl. 9:02 
Oprindeligt skrevet af juanlopez2008:
YIKES, well I added some additional checks that detects this problem so it shouldn't happen again.

Thank you! I definitely appreciate it!
juanlopez2008  [udvikler] 23. okt. 2022 kl. 9:39 
No, thank you for the heads up that it was happening! I'm surprised we never ran into it on 1.3; it definitely would have been an issue there as well... easy enough fix, though.
juanlopez2008  [udvikler] 23. okt. 2022 kl. 9:42 
@Nuker1110, this issue should have already been fixed by the time you posted; have you had a chance to see if you're on the correct version?
< >
Viser 1-9 af 9 kommentarer
Per side: 1530 50