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

System.AccessViolationException when using MelonLoader for Idle Slayer #138

Open
Jamjardavies opened this issue Jul 27, 2024 · 5 comments
Open
Labels
bug Something isn't working injection

Comments

@Jamjardavies
Copy link

When using MelonLoader (latest version) for the Steam version of Idle Slayer on Windows, I get this exception, which the MelonLoader team recommended to post here.

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Il2CppInterop.Runtime.Injection.Hooks.MetadataCache_GetTypeInfoFromTypeDefinitionIndex_Hook.Hook(Int32)
   at Il2CppInterop.Runtime.Injection.Hooks.Class_FromName_Hook.Hook(Il2CppInterop.Runtime.Runtime.Il2CppImage*, IntPtr, IntPtr)
   at Il2CppInterop.Runtime.IL2CPP.il2cpp_class_from_name(IntPtr, System.String, System.String)
   at Il2CppInterop.Runtime.IL2CPP.GetIl2CppClass(System.String, System.String, System.String)
   at Il2CppSystem.Void..cctor()
   at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(System.RuntimeTypeHandle)
   at Il2CppInterop.Runtime.Il2CppClassPointerStore`1[[Il2CppSystem.Void, Il2Cppmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]]..cctor()
   at Il2CppInterop.Runtime.Injection.ClassInjector.ConvertStaticMethod(VoidCtorDelegate, System.String, Il2CppInterop.Runtime.Runtime.VersionSpecific.Class.INativeClassStruct)
   at Il2CppInterop.Runtime.Injection.ClassInjector.RegisterTypeInIl2Cpp(System.Type, Il2CppInterop.Runtime.Injection.RegisterTypeOptions)
   at Il2CppInterop.Runtime.DelegateSupport.ConvertDelegate[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Delegate)
   at UnityEngine.Events.UnityAction`2[[UnityEngine.SceneManagement.Scene, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[UnityEngine.SceneManagement.LoadSceneMode, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].op_Implicit(System.Action`2<UnityEngine.SceneManagement.Scene,UnityEngine.SceneManagement.LoadSceneMode>)
   at MelonLoader.Support.SceneHandler.Init()
   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()
@ds5678
Copy link
Collaborator

ds5678 commented Jul 27, 2024

Are sure that's still relevant? It's been 2 years since an il2cppinterop release

@Jamjardavies
Copy link
Author

Not sure but I was directed to here from MelonLoader.

@ds5678 ds5678 added injection bug Something isn't working labels Sep 9, 2024
@stjoannou
Copy link

stjoannou commented Sep 19, 2024

Are sure that's still relevant? It's been 2 years since an il2cppinterop release

yes have the same issue currently.

@Jamjardavies refers to LavaGang/MelonLoader#639

@Elyriand21
Copy link

I was having the exact same issue and the fix that worked for me was adding --melonloader.disablestartscreen to the properties on Steam for the game

@Jamjardavies
Copy link
Author

It seems the latest version of MelonLoader has fixed this issue for Idle Slayer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working injection
Projects
None yet
Development

No branches or pull requests

4 participants