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 injecting class #188

Open
jumbogram456 opened this issue Nov 5, 2024 · 1 comment
Open

System.AccessViolationException when injecting class #188

jumbogram456 opened this issue Nov 5, 2024 · 1 comment

Comments

@jumbogram456
Copy link

After calling AddComponent, the type is successfully registered.

[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info   :Il2CppInterop] Registered mono type PokerServer.MyBehaviour in il2cpp domain

Shortly after, the game crashes and the error log contains:

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.Class_GetFieldDefaultValue_Hook.Hook(Il2CppInterop.Runtime.Runtime.Il2CppFieldInfo*, Il2CppInterop.Runtime.Runtime.Il2CppTypeStruct* ByRef)

The game is Vegas Infinite by PokerStars, I'm aware the game contains anti-cheat (only EAC) but I'm running the game without it (just by launching PokerStarsVR.exe) since my goal is to create a private server for the game. The game runs on Unity 2022.3.29f1.

I'm running this through the latest build of BepInEx which runs Il2CppInterop 1.4.5.

@jumbogram456
Copy link
Author

I've been temporarily able to resolve this by patching other methods in the game to get the callbacks I need (OnUpdate, etc), but it'd be much easier if class injection worked on this game.

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