Skip to content

System.AccessViolationException throw sometimes when calling CLAHE.Apply #1745

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

Open
augong0301 opened this issue Feb 26, 2025 · 0 comments
Open

Comments

@augong0301
Copy link

augong0301 commented Feb 26, 2025

I encountered a very intermittent error while using OpenCVSharp, which appears to occur randomly. When calling CLAHE.Apply, there's a very small chance that it directly throws a System.AccessViolationException: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
The occurrence of this error shows no discernible pattern, but it happens approximately once every few days in my application.

Image

My runtime environment is: Windows 11 64-bit / OpenCVSharp 4.10.0.20240616 /.net 8.0.11

Besides, i also noticed there is a managed array pinning issue solved in #1691 , but i guess this one is different because i passed a cloned mat and a new mat into this function.

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

1 participant