System.AccessViolationException: Attempted to read or write protected memory
After
• migrating to another platform, or
• build your code in DEBUG mode, or
• while debugging your code line by line
system may throw the following exception:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt
This issue shouldn't happen in managed code. You can try setting Visual Studio Debugger to bypass this exception through:
Tools menu -> Options -> Debugging -> General
Uncheck "Suppress JIT optimization on module load"
added 10 years 2 months ago