Hello!
I am having this error message:
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
About the error:
I am using C# on .NET Framework 4.8. The error is very inconsistent, it can happen within a few seconds, or in 10 minuets. This error appears both in release, and debug mode. It seems to happen faster when it's in release mode.
These are the packages that I'm using
- ClosedXML (0.96.0)
- AForge (2.2.5)
- AForge.Imaging (2.2.5)
- AForge.Math (2.2.5)
- Emgu.CV (4.3.0.3890)
- Emgu.CV.runtime.windows (4.3.0.3890)
- ExcelNumberFormat (1.1.0)
- ZedGraph (5.1.7)
- Microsoft.CSharp (4.7.0)
- DocumentFormat.OpenXml (2.16.0)
This is where it happens in the code:
Here is an image of the quick watch:
I have looked at quite a few different threads and I can't seem to figure out how to fix this issue.
These are the things that I've tried so far:
- Changing solution platforms to be x64, x86, or AnyCPU (I cleaned and rebuilt the solution after each of these changes)
- Enabled native code debugging
- "Suppress JIT optimization on module load" in: Tools menu ->Options -> Debugging -> General
- Switching Emgu.cv to EmguCV
- Removing non-essential NuGet packages
- Changing the version of the NuGet packages
From here I'm not really sure what else to try, would appreciate any feedback.
Thanks in advance! :)