RimWorld

RimWorld

HugsLib
petra_w 13 Mar, 2024 @ 11:19am
Bug over night
Was playing the game with the same mod list the last days without trouble, starting it today, the game shows me error messages on the main screen after loading and the last save is not playable anymore. The colonists do not do any next task anymore and just stand still. Here the error message:


RimWorld 1.4.3901 rev238
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
RimWorld.VersionControl:LogVersionNumber ()
Verse.Root:CheckGlobalInit ()
Verse.Root:Start ()
Verse.Root_Entry:Start ()

[VanillaAchievementsExpanded] version 1.4.8315
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
AchievementsExpanded.AchievementHarmony:.cctor ()
AchievementsExpanded.AssemblyHandler:.ctor (Verse.ModContentPack)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&)
System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
System.Activator:CreateInstance (System.Type,object[])
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
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 ()

[HugsLib] version 10.0.1
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
HugsLib.Utils.ModLogger:Message (string,object[])
HugsLib.HugsLibController:InitializeController ()
HugsLib.HugsLibController:EarlyInitialize ()
HugsLib.Core.HugsLibMod:.ctor (Verse.ModContentPack)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&)
System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
System.Activator:CreateInstance (System.Type,object[])
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
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 ()

[HugsLib][ERR] Exception during ApplyHarmonyPatches: HarmonyLib.HarmonyException: Patching exception in method static System.Void RimWorld.MainMenuDrawer::DoMainMenuControls(UnityEngine.Rect rect, System.Boolean anyMapFiles) ---> System.InvalidProgramException: Invalid IL code in (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.MainMenuDrawer.DoMainMenuControls_Patch0 (UnityEngine.Rect,bool): IL_0153: callvirt 0x0000005b


at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00094] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000be] in <6ddb2f07a97745adaa7bad4e17020462>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0013c] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x0009e] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <6ddb2f07a97745adaa7bad4e17020462>:0
at HugsLib.HugsLibController.ApplyHarmonyPatches () [0x00056] in <4a46802aeab646ab99159f7eecb6b57e>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
HugsLib.Utils.ModLogger:ReportException (System.Exception,string,bool,string)
HugsLib.HugsLibController:ApplyHarmonyPatches ()
HugsLib.HugsLibController:InitializeController ()
HugsLib.HugsLibController:EarlyInitialize ()
HugsLib.Core.HugsLibMod:.ctor (Verse.ModContentPack)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&)
System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
System.Activator:CreateInstance (System.Type,object[])
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
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 ()

ReGrowth: Core 3.4.9-Artemis-rev3
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
LogModVersion.LoadedModManager_LoadModXML_Patch:Prefix ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.LoadedModManager.LoadModXML_Patch1 ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__6_1 ()
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 ()

Error in static constructor of VFECore.BeamProjectile: System.TypeInitializationException: The type initializer for 'VFECore.BeamProjectile' threw an exception. ---> System.MethodAccessException: Method `MonoMod.Utils.Extensions.CreateDelegate[System.Action`3<Verse.Def, System.Type, System.Collections.Generic.HashSet`1<uint16>>](System.Reflection.MethodBase)' is inaccessible from method `VFECore.BeamProjectile..cctor()'
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_throw_method_access(intptr,intptr)
at VFECore.BeamProjectile..cctor () [0x00045] in <329634eb1a994d8ba9cdc344350f1f17>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Verse.StaticConstructorOnStartupUtility.CallAll () [0x00025] in <cd7169108ea74757aa50c5b33d275c15>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.StaticConstructorOnStartupUtility:CallAll ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_5 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
Verse.Root:Update ()
Verse.Root_Entry:Update ()

MVCF successfully applied 41 patches
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
MVCF.Patch:PrintSummary ()
MVCF.MVCF/<>c:<CollectFeatureData>b__15_0 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
Verse.Root:Update ()
Verse.Root_Entry:Update ()

[OskarPotocki.VFECore] Patches on methods annotated as Obsolete were detected by HugsLib: Verse.MapDeiniter.Deinit
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
HugsLib.Utils.HarmonyUtility:LogObsoleteMethodPatchErrors ()
HugsLib.Utils.HarmonyUtility:LogHarmonyPatchIssueErrors ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
Verse.Root:Update ()
Verse.Root_Entry:Update ()

[HugsLib] initializing GiddyUpCore, GiddyUpRideAndRoll, RunAndGun
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Message (string)
HugsLib.Utils.ModLogger:Message (string,object[])
HugsLib.HugsLibController:EnumerateChildMods (bool)
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 ()
< >
Showing 1-15 of 19 comments
Misstake 13 Mar, 2024 @ 11:37am 
I'm getting the same error at the moment, seems to be due to the most recent Harmony update to 2.3 which released today:

[HugsLib] version 10.0.1 [HugsLib][ERR] Exception during ApplyHarmonyPatches: HarmonyLib.HarmonyException: Patching exception in method static System.Void RimWorld.MainMenuDrawer::DoMainMenuControls(UnityEngine.Rect rect, System.Boolean anyMapFiles) ---> System.InvalidProgramException: Invalid IL code in (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.MainMenuDrawer.DoMainMenuControls_Patch0 (UnityEngine.Rect,bool): IL_0153: callvirt 0x0000005b at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00094] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x000be] in <6ddb2f07a97745adaa7bad4e17020462>:0 --- End of inner exception stack trace --- at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0013c] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HarmonyLib.PatchClassProcessor.Patch () [0x0009e] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <6ddb2f07a97745adaa7bad4e17020462>:0 at HugsLib.HugsLibController.ApplyHarmonyPatches () [0x00056] in <4a46802aeab646ab99159f7eecb6b57e>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) [MadSkills]: settings initialized, multiplier is 0, not tiered, daily XP threshold is 8000, saturated XP multiplier is 0.2, Great Memory trait is altered. [MadSkills]: settings initialized, multiplier is 0, not tiered, daily XP threshold is 8000, saturated XP multiplier is 1, Great Memory trait is altered. [MadSkills]: settings initialized, multiplier is 0, not tiered, daily XP threshold is 8000, saturated XP multiplier is 1, Great Memory trait is altered. Dubs Skylight 1.5.2110 Dubs Mint Minimap 1.3.787 Fallback handler could not load library C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64_Data/Mono/data-00000141A1B21060.dll [MadSkills]: changed behavior of Great Memory trait. Translation data for language English has 2 errors. Generate translation report for more info. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Subsurface Conduit: v1.4.8315.36513 Wall Light: v1.4.8348.3000 Path Avoid: Adding Harmony Postfix to PawnUtility.GetAvoidGrid() PickUpAndHaul v0.1.3.2⅔ welcomes you to RimWorld with pointless logspam. [HugsLib] initializing ImprovedWorkbenches, AvoidFriendlyFire, LabelsOnFloor
Last edited by Misstake; 13 Mar, 2024 @ 12:05pm
SweetPea 13 Mar, 2024 @ 11:45am 
Also having bugs with this mod. Sadly, this governs the best mods that I use in this game. :(
Lostelei 13 Mar, 2024 @ 12:04pm 
I think a current update from the Rimworld devs broke it, I literally had an update just minutes before starting the game while yesterday it was still working fine. Probably have to give the author a couple days to fix it.

For me it manifests by Pawns having no graphics anymore in-game, btw
julitoole 13 Mar, 2024 @ 12:43pm 
but I am surprised to not see way more ppl complaining about this. isnt like any modded rimwrold player affected? most ppl I assume would use mods that need hugslib
Dovaskarr 13 Mar, 2024 @ 12:59pm 
Oh yeah, people spammed the dude on harmony, he just told 10insh minutes ago that this is causing problems. Also, me at 50+ mods have only 3 on hugslib dependancy so not a lot of mods could be affected. I just turned them off and I am fine
schstanislav 13 Mar, 2024 @ 1:20pm 
everything's broken. (((
AlyxMS 13 Mar, 2024 @ 2:03pm 
Same here. A few hours ago everything is fine. Quit the game to tweak some mods, came back and everything's broken. Thought's it's my own fault, but problem persisted even if I have nothing loaded but hugslib and harmony.
Avarice 13 Mar, 2024 @ 5:11pm 
Unsubscribe than Subscribe to harmony.
Hopefully we had the same issue as this fixed mine.

This is the first time since I started playing rimworld that I had this issue. for me steam workshop just didn't download the next update for harmony when a regression was fixed. I've seen online all the time "Why wont steam update my mods" or mod creators saying "you have to force an update by unsubbing and resubbing" but I've never had the problem myself! 4.2k hours in and I'm finally included in the "What just happened!?" club
Warrenir 13 Mar, 2024 @ 5:14pm 
Yeah I have a decently long mod list and thought i finally broke it adding 2 more yesterday. When I loaded the game my menu disappeared, reloaded game, and all my mods were disabled. Was gonna start a new colony today too :(
g0edert 13 Mar, 2024 @ 5:38pm 
Unsubscribe than Subscribe to harmony :steamthumbsup:
Warrenir 13 Mar, 2024 @ 6:17pm 
Originally posted by g0edert:
Unsubscribe than Subscribe to harmony :steamthumbsup:
Harmony broken too? My game is complete jacked when i try to use any mods. Don't know how many mods are affected...i have to many TnT
Last edited by Warrenir; 13 Mar, 2024 @ 6:17pm
pfeffersteak 14 Mar, 2024 @ 12:03am 
same problem, here is what worked for me:
1. unsubscribe from Harmony and HugsLib, subscribe to them again, close Rimworld (not just the autorestart), Steam should have a brief "validate" and "update" of the game.
This might fix it already, but if not (I did the following fix before the one above so I'm not sure if you need both or only the above one).
2. go to the Harmony page in the workshop, join the discord server, go to the #harmony-mod-alpha channel, there is a pinned github link to a version of Hugslib that works with the new version of Harmony. You need to download the zip from github, put it in your Rimworld Mod folder (in Steam rightclick on Rimworld, browse local files), and enable it in Rimworld. If you have used the in-game workshop version before, the workshop version will have a steam icon next to it, and the manually downloaded one will have a folder icon next to it. Disable the workshop version, enable the manually downloaded version.
After doing this I didn't get error messages anymore and the game seems to work normally again.
Misstake 14 Mar, 2024 @ 6:56am 
Originally posted by pfeffersteak:
same problem, here is what worked for me:
1. unsubscribe from Harmony and HugsLib, subscribe to them again, close Rimworld (not just the autorestart), Steam should have a brief "validate" and "update" of the game.
This might fix it already, but if not (I did the following fix before the one above so I'm not sure if you need both or only the above one).
2. go to the Harmony page in the workshop, join the discord server, go to the #harmony-mod-alpha channel, there is a pinned github link to a version of Hugslib that works with the new version of Harmony. You need to download the zip from github, put it in your Rimworld Mod folder (in Steam rightclick on Rimworld, browse local files), and enable it in Rimworld. If you have used the in-game workshop version before, the workshop version will have a steam icon next to it, and the manually downloaded one will have a folder icon next to it. Disable the workshop version, enable the manually downloaded version.
After doing this I didn't get error messages anymore and the game seems to work normally again.

Thanks for this.

For me unsubscribing from both and then subscribing again fixed it.

Had tried that before, but pretty sure I only did HugsLib. So make sure to unsubcribe from Harmony and HugsLib, and only then resubscribe again.
squishyrogue 14 Mar, 2024 @ 9:26am 
Originally posted by julitoole:
but I am surprised to not see way more ppl complaining about this. isnt like any modded rimwrold player affected? most ppl I assume would use mods that need hugslib
Only 4 mods I use (out of over 100) uses hugslib. I was having the same issue but I was not having any associated issue with Harmony.
Impatient people. Geez.
< >
Showing 1-15 of 19 comments
Per page: 1530 50