This project has moved. 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 6:45 PM
Edited Mar 28, 2016 at 9: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."

Thanks
Coordinator
Mar 28, 2016 at 10: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 28, 2016 at 11:36 PM
Edited Mar 28, 2016 at 11:53 PM
The version I am using is Magick.NET.7.0.0.0022, 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!!
Coordinator
Mar 29, 2016 at 5: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 6:11 PM
Thanks for the help!!!
Coordinator
Mar 30, 2016 at 8:58 PM
I will try to publish a new release that resolves this issues tomorrow.
Mar 30, 2016 at 10:54 PM
That will be great....thanks!!!!
May 14, 2016 at 12: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?
Thanks.
May 16, 2016 at 9:34 PM
Never mind, got it worked!!