SeeminglyScience / ImpliedReflection

Access non-public types and type members as if they were public.
MIT License
41 stars 3 forks source link

Dies on CLR error for PS7.4.2 #12

Open JustinGrote opened 6 months ago

JustinGrote commented 6 months ago
pwsh -c {Enable-ImpliedReflection -YesIKnowIShouldNotDoThis}

Probably Harmony related

Fatal error. Internal CLR error. (0x80131506)
   at System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.PrepareMethod(System.Reflection.MethodBase, System.RuntimeMethodHandle)
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform+<>c__DisplayClass29_0.<Pin>b__0(System.Reflection.MethodBase)
   at System.Collections.Concurrent.ConcurrentDictionary`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].GetOrAdd(System.__Canon, System.Func`2<System.__Canon,System.__Canon>)
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.Pin(System.Reflection.MethodBase)
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform._HookSelftest(System.Reflection.MethodInfo, System.Reflection.MethodInfo)
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform..ctor()
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeNETPlatform..ctor()
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeNETCorePlatform..ctor()
   at MonoMod.RuntimeDetour.Platforms.DetourRuntimeNETCorePlatform.Create()
   at MonoMod.RuntimeDetour.DetourHelper.get_Runtime()
   at HarmonyLib.HarmonySharedState..cctor()
   at HarmonyLib.HarmonySharedState.GetPatchInfo(System.Reflection.MethodBase)
   at HarmonyLib.PatchProcessor.Patch()
   at HarmonyLib.Harmony.Patch(System.Reflection.MethodBase, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod)
   at ImpliedReflection.PatchHandle.Create(HarmonyLib.Harmony, System.Reflection.MethodBase, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod, HarmonyLib.HarmonyMethod)
   at ImpliedReflection.Patches.Create()
   at ImpliedReflection.NonPublicAdapter.Bind()
   at ImpliedReflection.Commands.EnableImpliedReflectionCommand.EndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()
   at System.Management.Automation.CommandProcessorBase.DoComplete()
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)    
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
   at System.Management.Automation.PipelineOps.InvokePipeline(System.Object, Boolean, System.Management.Automation.CommandParameterInternal[][], System.Management.Automation.Language.CommandBaseAst[], System.Management.Automation.CommandRedirection[][], System.Management.Automation.Language.FunctionContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Run(System.Management.Automation.Interpreter.InterpretedFrame)    
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(System.Management.Automation.Interpreter.InterpretedFrame)
   at System.Management.Automation.Interpreter.Interpreter.Run(System.Management.Automation.Interpreter.InterpretedFrame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at System.Management.Automation.DlrScriptCommandProcessor.RunClause(System.Action`1<System.Management.Automation.Language.FunctionContext>, System.Object, System.Object)
   at System.Management.Automation.DlrScriptCommandProcessor.Complete()
   at System.Management.Automation.CommandProcessorBase.DoComplete()
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(System.Management.Automation.CommandProcessorBase)    
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
   at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)