-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Error in exported Godot Engine build when attempting to patch method #562
Comments
Could it be that the empty methods are optimised away or inlined when you build a release build (I assume that’s what Godot exported build means). Can you try to add some code and maybe some try/catch code that is known to prevent inlining? |
A more likely reason is a mismatch of dependency version. Harmony needs and uses some dependencies and I guess one of them does not match the one that is actually loaded and present at runtime. |
The problem still occurs even with non-empty methods. (Harmony log and exception stacktrace are identical) I think I may have identified the mismatched dependency though. Harmony in .NET 6 is dependent on System.Text.Json 5.0.2, but that version of System.Text.Json doesn't appear to be compatible with .NET 6. The version of System.Text.Json in the release build is 6.0.2123.36311 instead. |
fixed in next prerelease |
Issue is unfortunately still occurring even in the newest prerelease. The only other lead I have is that Mono.Cecil doesn't seem to support .NET 6.0 (or any base .NET version), however that leaves me confused as to how patching is able to even function within the godot editor itself. |
Describe the bug
An exception (detailed below) is thrown when attempting to perform a patch in an exported Godot Build.
To Reproduce
Use the following code with Harmony 2.3-prerelease.4 in Godot 4.2.1:
Harmony debug log:
Exception StackTrace:
Runtime environment (please complete the following information):
Additional context
The exception only appears to be thrown in an exported build. No exception is thrown within the editor, and everything behaves as expected.
The text was updated successfully, but these errors were encountered: