error while instantiating a mod of type ModManager

Started by MittchelCZE, June 09, 2021, 03:39:37 PM

Previous topic - Next topic

MittchelCZE

Hello i would like to ask for help, me and my friend bought rimworld and wanted to play together using the multiplayer mod but when my friend loaded harmony and modloader this error poped up.
He tried it on his laptop and it works.
I would like to know why it happens.
Thanks for help.





RimWorld 1.2.3005 rev1190
Verse.Log:Message(String, Boolean)
RimWorld.VersionControl:LogVersionNumber()
Verse.Root:CheckGlobalInit()
Verse.Root:Start()
Verse.Root_Entry:Start()

Error while instantiating a mod of type HarmonyMod.HarmonyMain: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
  at (wrapper managed-to-native) System.Reflection.Assembly.get_code_base(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetCodeBase (System.Boolean escaped) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.Assembly.get_CodeBase () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.AssemblyName.Create (System.Reflection.Assembly assembly, System.Boolean fillCodebase) [0x00010] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.RuntimeAssembly.GetName (System.Boolean copiedName) [0x0000e] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.Assembly.GetName () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at HarmonyLib.PatchProcessor.VersionInfo (System.Version& currentVersion) [0x00016] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.VersionInfo (System.Version& currentVersion) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyMod.HarmonyMain..ctor (Verse.ModContentPack content) [0x00007] in <e3f30af8d65c449cbc13efb23bb11589>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <567df3e0919241ba98db88bec4c6696f>:0
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at Verse.LoadedModManager.CreateModClasses () [0x00076] in <7927e938de4c4089b4add4215e58d5b1>:0
Verse.Log:Error(String, Boolean)
Verse.LoadedModManager:CreateModClasses()
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Error while instantiating a mod of type ModManager.ModManager: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method System.Boolean Verse.ModMetaData::SamePackageId(System.String otherPackageId, System.Boolean ignorePostfix) ---> System.ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
  at (wrapper managed-to-native) System.Reflection.Assembly.get_code_base(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetCodeBase (System.Boolean escaped) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.Assembly.get_CodeBase () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.AssemblyName.Create (System.Reflection.Assembly assembly, System.Boolean fillCodebase) [0x00010] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.RuntimeAssembly.GetName (System.Boolean copiedName) [0x0000e] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.Assembly.GetName () [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at HarmonyLib.HarmonySharedState+<>c.<SharedStateAssembly>b__5_1 (System.Reflection.Assembly a) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0003f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at HarmonyLib.HarmonySharedState.SharedStateAssembly () [0x0002e] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.HarmonySharedState.GetState () [0x00010] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.HarmonySharedState.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x00031] in <20181e2d55204880a56a9120ef04a53d>:0
   --- End of inner exception stack trace ---
  at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable`1[T] sequence, System.Action`1[T] action) [0x00014] in <20181e2d55204880a56a9120ef04a53d>:0
  at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <20181e2d55204880a56a9120ef04a53d>:0
  at ModManager.ModManager..ctor (Verse.ModContentPack content) [0x00031] in <493fbfcbeef84e44a8e3d825159b380f>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <567df3e0919241ba98db88bec4c6696f>:0
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <567df3e0919241ba98db88bec4c6696f>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
  at Verse.LoadedModManager.CreateModClasses () [0x00076] in <7927e938de4c4089b4add4215e58d5b1>:0
Verse.Log:Error(String, Boolean)
Verse.LoadedModManager:CreateModClasses()
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Key binding conflict: Dev_ChangeSelectedDebugAction and MainTab_Architect are both bound to Tab.
Verse.Log:Warning(String, Boolean)
Verse.KeyPrefsData:ErrorCheckOn(KeyBindingDef, BindingSlot)
Verse.KeyPrefsData:ErrorCheck()
Verse.KeyPrefs:Init()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Canute

I don't know a mod named "modloader" or can find it at the workshop, so i can't say anything about it.
But maybe you should look what requirements are for that mod, maybe you allready installed that on your laptop but not at the other mashine.
Check if you have download/installed the mods correct. Sometimes the assemblies are missing because of the wrong download.