This project has moved and is read-only. For the latest updates, please go here.

'System.AccessViolationException' occurred in Magick.NET-Q16.Wrapper-x64.dll, how to resolve this?

Mar 28, 2016 at 7:45 PM
Edited Mar 28, 2016 at 10:17 PM
I know this may not be Magick.NET library issue, but had this working fine before.
I have laterst vc++ redistributable installed of both x86 and x64.
Using magick.NET AnyCPU version.

"Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Mar 28, 2016 at 11:02 PM
Are you using the latest version of Magick.NET? It no longer requires installation of the C++ Redistributable. Can you check if disabling OpenCL resolves your issue (MagickNET.UseOpenCL)? I recently fixed a bug that could cause this exception when OpenCL is enabled. The next release that should be published soon will include a fix for this.
Mar 29, 2016 at 12:36 AM
Edited Mar 29, 2016 at 12:53 AM
The version I am using is Magick.NET., I tried with latest (103) version still I got the same error then I reverted back to see if goes away...but still saw the issue, I will update with next release after this fix.

I tried placing 'MagickNET.UseOpenCL = false;' this in a function where I am getting the issue.
It seems like the issue is gone now.
Can we have this setting code anywhere in project or is there any default place should I change?
Thanks for the help!!
Mar 29, 2016 at 6:09 AM
You should set UseOpenCL to false at the start of your application. It is a global setting that you should only need to set once.
Mar 30, 2016 at 7:11 PM
Thanks for the help!!!
Mar 30, 2016 at 9:58 PM
I will try to publish a new release that resolves this issues tomorrow.
Mar 30, 2016 at 11:54 PM
That will be great....thanks!!!!
May 14, 2016 at 1:31 AM
Hello I am using Magick.NET-Q16-x64.dll latest version. Getting accessviolation exception, could you please let me know the solution for this?
May 16, 2016 at 10:34 PM
Never mind, got it worked!!