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
AccessViolation with .NET 4.6 #21
Comments
I've had some more time to play around and found out that one can change the access rights of the page containing the memory that should be patched to execute read|write, which causes the access violation to no longer occur. Although I've started working on a patch, I'm hesitant to submit a pull request as I've yet to find a way to write a test that actually fails consistently, pre-patch. |
…ardeike#21)." This reverts commit 87a5388.
Since I trust the tests done in the pull request, I copied over the fix to the main branch. This solves this issue. |
Just for completeness, I tried patching System.Windows.Input.Keyboard.IsKeyDown() from within a .Net 4 VisualStudio project with the latest version of Harmony and it works just fine:
If you run in a more restricted enivronment like a webserver you might still hit the access violation. In that case, there is nothing you can do (since security enforces it). |
Just replaced my custom built with a build of your master branch. Still works like a charm, thanks! |
While trying to create a test case for a different issue, I stumbled upon the following:
Patching the System.Windows.Input.Keyboard.IsKeyDown() function crashes with an System.AccessViolationException in a simple console application:
I've attached a project that exhibits this problem on my computer.
Console.zip
So far I've found out that this access violation does NOT happen when I change the following variables:
For the moment I've got some questions that need answering in order to provide a fix for this issue, such as:
I'll report back once I've made some progress, but any input is appreciated!
The text was updated successfully, but these errors were encountered: