RimWorld

RimWorld

Opened Doors Don't Block Light
AmbiguousMonk 12 Sep, 2020 @ 12:04pm
New red error as of 9-12-20
I'm no real programmer, so I have no idea what it means, but I just recently started getting this error and I thought I'd share in case it helps with debugging anything. I haven't tried to load a map, so I don't know what practical effect it may have.

Error in static constructor of OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight: System.TypeInitializationException: The type initializer for 'OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.GlowFlooder::AddFloodGlowFor(Verse.CompGlower theGlower, UnityEngine.Color32[] glowGrid) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <567df3e0919241ba98db88bec4c6696f>:0
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00012] in <567df3e0919241ba98db88bec4c6696f>:0
at OpenedDoorsDontBlockLight.GlowFlooder_Patch.Transpiler (System.Collections.Generic.IEnumerable`1[T] instructions) [0x00134] in <5f9bc78547cb4577b05884ecab6c3dec>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <567df3e0919241ba98db88bec4c6696f>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <567df3e0919241ba98db88bec4c6696f>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
at HarmonyLib.CodeTranspiler+<>c__DisplayClass12_0.<GetResult>b__0 (System.Reflection.MethodInfo transpiler) [0x0004b] in <20181e2d55204880a56a9120ef04a53d>:0
at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <567df3e0919241ba98db88bec4c6696f>:0
at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00020] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0020e] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] 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 OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight..cctor () [0x00012] in <5f9bc78547cb4577b05884ecab6c3dec>: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 <567df3e0919241ba98db88bec4c6696f>:0
at (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.Verse.StaticConstructorOnStartupUtility.CallAll_Patch1()
Verse.Log:Error(String, Boolean)
Verse.StaticConstructorOnStartupUtility:Verse.StaticConstructorOnStartupUtility.CallAll_Patch1()
Verse.<>c:<DoPlayLoad>b__4_2()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Verse.Root.Update_Patch1(Root)
Verse.Root_Entry:Update()
< >
Showing 1-2 of 2 comments
Kayedon 12 Sep, 2020 @ 2:00pm 
I can confirm I also get this error.

[BetterLoading] Exception occurred processing mod finalize events! Details: System.TypeInitializationException: The type initializer for 'OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.GlowFlooder::AddFloodGlowFor(Verse.CompGlower theGlower, UnityEngine.Color32[] glowGrid) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00012] in <567df3e0919241ba98db88bec4c6696f>:0 at OpenedDoorsDontBlockLight.GlowFlooder_Patch.Transpiler (System.Collections.Generic.IEnumerable`1[T] instructions) [0x00134] in <5f9bc78547cb4577b05884ecab6c3dec>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <567df3e0919241ba98db88bec4c6696f>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 at HarmonyLib.CodeTranspiler+<>c__DisplayClass12_0.<GetResult>b__0 (System.Reflection.MethodInfo transpiler) [0x0004b] in <20181e2d55204880a56a9120ef04a53d>:0 at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <567df3e0919241ba98db88bec4c6696f>:0 at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00020] in <20181e2d55204880a56a9120ef04a53d>:0 at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <20181e2d55204880a56a9120ef04a53d>:0 at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0 at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0020e] in <20181e2d55204880a56a9120ef04a53d>:0 at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <20181e2d55204880a56a9120ef04a53d>:0 at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] 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 OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight..cctor () [0x00012] in <5f9bc78547cb4577b05884ecab6c3dec>: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 <567df3e0919241ba98db88bec4c6696f>:0 at BetterLoading.Stage.InitialLoad.StageRunStaticCctors+<StaticConstructAll>d__16.MoveNext () [0x00062] in <db3b69b11cc94e82ac725bd2d1650572>:0 Verse.Log:Error(String, Boolean) BetterLoading.Stage.InitialLoad.<StaticConstructAll>d__16:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
eg7560251 12 Sep, 2020 @ 8:20pm 
Got this on load.

[BetterLoading] Exception occurred processing mod finalize events! Details: System.TypeInitializationException: The type initializer for 'OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void Verse.GlowFlooder::AddFloodGlowFor(Verse.CompGlower theGlower, UnityEngine.Color32[] glowGrid) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <567df3e0919241ba98db88bec4c6696f>:0
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00012] in <567df3e0919241ba98db88bec4c6696f>:0
at OpenedDoorsDontBlockLight.GlowFlooder_Patch.Transpiler (System.Collections.Generic.IEnumerable`1[T] instructions) [0x00134] in <5f9bc78547cb4577b05884ecab6c3dec>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <567df3e0919241ba98db88bec4c6696f>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <567df3e0919241ba98db88bec4c6696f>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0
at HarmonyLib.CodeTranspiler+<>c__DisplayClass12_0.<GetResult>b__0 (System.Reflection.MethodInfo transpiler) [0x0004b] in <20181e2d55204880a56a9120ef04a53d>:0
at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <567df3e0919241ba98db88bec4c6696f>:0
at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00020] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] transpilers, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List`1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary`2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0020e] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <20181e2d55204880a56a9120ef04a53d>:0
at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs`1+Job[T] job) [0x0015d] 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 OpenedDoorsDontBlockLight.OpenedDoorsDontBlockLight..cctor () [0x00012] in <5f9bc78547cb4577b05884ecab6c3dec>: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 <567df3e0919241ba98db88bec4c6696f>:0
at BetterLoading.Stage.InitialLoad.StageRunStaticCctors+<StaticConstructAll>d__16.MoveNext () [0x00062] in <db3b69b11cc94e82ac725bd2d1650572>:0
Verse.Log:Error(String, Boolean)
BetterLoading.Stage.InitialLoad.<StaticConstructAll>d__16:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
< >
Showing 1-2 of 2 comments
Per page: 1530 50