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

32-bit build crash #5

Open
0XDE57 opened this issue Feb 10, 2019 · 3 comments
Open

32-bit build crash #5

0XDE57 opened this issue Feb 10, 2019 · 3 comments

Comments

@0XDE57
Copy link
Owner

0XDE57 commented Feb 10, 2019

When building in release mode, ReadProcessMemory() or GCHandle.Alloc() cause an AccessViolationException

Debug build works fine. Only happens in release. Strange....

@striderwhite
Copy link

Perhaps those kernel calls need admin access? Try running the prod exe under admin privs.

@0XDE57
Copy link
Owner Author

0XDE57 commented Feb 16, 2019

Ah, so it's not release mode or privileges, but platform. I had my debug build set to 'Any CPU' (which defaulted to x64), and Release build set to 'x86'. When I set it to x64 / Any CPU it runs fines.

So it only works in 64-bit build. 32-bit is broken.

My best guess at this moment is there is a size mismatch somewhere. Something is trying to read/write a 64-bit address into a 32-bits, or vice versa. Probably the IntPtr or Marshal, maybe buffer size. Will look into more later.

@striderwhite
Copy link

Perhaps some of the P/invoke calls are only for x64 definitions and need separate wrappings per cpu build.

@0XDE57 0XDE57 changed the title Release mode crash 32-bit build crash Mar 5, 2019
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

2 participants