
[Bug]: Adding a reverse patch causes the game to crash
GMMan opened this issue ยท 0 comments
All of the following criteria must be met
- All Requirements must be installed.
- Changed the title so that it doesn't just says "[Bug]: "
- I have searched the GitHub issues for my bug, even in the closed issues.
All of the following are optional to answer
- Tried reinstalling the Game.
- Tried reinstalling MelonLoader.
- Tried restarting PC.
- Was able to see the Start Screen.
Describe the issue.
When trying to add a reverse patch with Harmony, the game crashes before the splash is shown. Stack trace points to an issue with MelonLoader.Fixes.InstancePatchFix.PatchMethod
. It looks like someone made a poor assumption at https://github.com/LavaGang/MelonLoader/blob/master/MelonLoader/Fixes/InstancePatchFix.cs#L17, because the first argument of the target function is a HarmonyMethod
, which does not inherit from MethodBase
. Unpatching this particular patch prevents the crash from occurring, and reverse patches work as expected.
(Log not attached because relevant stack trace is not captured within MelonLoader's logs, and I can't be bothered to unfix the issue locally just to take a screenshot of the stack trace that appears in the console.)
Did you attach your log file?
No, I could not find a log file at {Game_Directory}\MelonLoader\Latest.log