Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get a IL Compile Error, encountered a null pointer error in certain games. #75

Closed
bbsuuo opened this issue May 30, 2023 · 2 comments
Closed

Comments

@bbsuuo
Copy link

bbsuuo commented May 30, 2023

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> System.NullReferenceException: Object reference not set to an instance of an object
at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) [0x00000] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at MonoMod.RuntimeDetour.ILHook.Apply () [0x00059] in <4e2760c7517c4ea79c633d67e84b319f>:0
at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x00047] in <474744d65d8e460fa08cd5fd82b5d65f>:0
--- End of inner exception stack trace ---
at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x0005f] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00033] in <474744d65d8e460fa08cd5fd82b5d65f>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00045] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00095] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Harmony.PatchAll (System.Type type) [0x00008] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Harmony.CreateAndPatchAll (System.Type type, System.String harmonyInstanceId) [0x0001e] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at BepInEx.Preloader.RuntimeFixes.ConsoleSetOutFix.Apply () [0x0001f] in :0
at BepInEx.Preloader.PreloaderRunner.PreloaderMain () [0x0002f] in :0
at BepInEx.Preloader.PreloaderRunner.PreloaderPreMain () [0x00089] in :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 :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) [0x0004b] in :0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
at BepInEx.Preloader.Entrypoint.Main () [0x00090] in :0

@bbsuuo
Copy link
Author

bbsuuo commented May 30, 2023

and it's log output :
[HarmonyLog][Debug] ### Exception from user "harmony-auto-5369cc8f-a746-4935-a180-a8c47548e8dc", Harmony v2.9.0.0

Original: static void Console::SetOut(System.IO.TextWriter newOut)

Patch class: BepInEx.Preloader.RuntimeFixes.ConsoleSetOutFix

HarmonyLib.HarmonyException: IL Compile Error (unknown location) ---> System.NullReferenceException: Object reference not set to an instance of an object

at HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) [0x00000] in <474744d65d8e460fa08cd5fd82b5d65f>:0

at MonoMod.RuntimeDetour.ILHook.Apply () [0x00059] in <4e2760c7517c4ea79c633d67e84b319f>:0

at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x00047] in <474744d65d8e460fa08cd5fd82b5d65f>:0

--- End of inner exception stack trace ---

at HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) [0x0005f] in <474744d65d8e460fa08cd5fd82b5d65f>:0

at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00033] in <474744d65d8e460fa08cd5fd82b5d65f>:0

@bbsuuo
Copy link
Author

bbsuuo commented May 30, 2023

okay. i find way , i make a idot program , [HarmonyLog][Error] Failed to apply stack trace fix: (System.ExecutionEngineException) String conversion error: Illegal byte sequence encounted in the input.

@bbsuuo bbsuuo closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant