BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

System.AccessViolationException Problem #123

Open Lessyzz opened 3 months ago

Lessyzz commented 3 months ago
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at Il2CppInterop.Runtime.IL2CPP.il2cpp_gchandle_get_target(UInt32)
--------------------------------
   at Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase.get_Pointer()
   at Il2CppInterop.Runtime.IL2CPP.Il2CppObjectBaseToPtr(Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase)
   at Il2CppSystem.IO.StreamWriter..ctor(Il2CppSystem.IO.Stream)
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Span`1<System.Object> ByRef, System.Signature, Boolean, Boolean)
   at System.Reflection.RuntimeConstructorInfo.Invoke(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at System.Reflection.ConstructorInfo.Invoke(System.Object[])
   at MelonLoader.Support.Main.ConsoleCleaner()
   at MelonLoader.Support.Main.Initialize(MelonLoader.ISupportModule_From)
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Span`1<System.Object> ByRef, System.Signature, Boolean, Boolean)
   at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at System.Reflection.MethodBase.Invoke(System.Object, System.Object[])
   at MelonLoader.SupportModule.LoadInterface(System.String)
   at MelonLoader.SupportModule.Setup()
   at MelonLoader.Core.Start()
   at MelonLoader.NativeHost.NativeEntryPoint.Start()

When i run game with melonloader gives me this error, how can i fix this?

ds5678 commented 1 month ago

Did you report this to the MelonLoader developers? At first glance, it does not seem like an issue with our library.