This project has moved. For the latest updates, please go here.

Appends frame throws System.AccessViolationException

Jun 10, 2015 at 1:34 PM
Edited Jun 10, 2015 at 1:44 PM
Hello

I'm trying to add specified frame to the image:
image.Quality = quality;
image.Frame(width, height);
image.Write(stream);
but it throws exception on the second line(image.Frame method):
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Can anyone help me with it?
Coordinator
Jun 10, 2015 at 2:22 PM
I just tried the following code:
using (MagickImage img = new MagickImage("logo:"))
{
    img.Quality = 90;
    img.Frame(50, 50);
}
And it executed without any problems. Can you create a small project that I can use to reproduce the issue and put it on something like dropbox/onedrive?
Jun 10, 2015 at 3:32 PM
Hi Dirk,

Here it is:
https://www.dropbox.com/s/e9byojkjn4mdwdu/Magick.Net.Example.zip?dl=0

See methods from class FrameImage.
(I've added some test code to the standard Magick.NET.Example project).
Jun 10, 2015 at 6:13 PM
Dirk
were you able to reproduce the issue?
Coordinator
Jun 11, 2015 at 7:54 AM
This is a spare time project and I did not have time yet to test this. I did just now and I am able to reproduce the issue. I will get back to this topic when I know more.
Coordinator
Jun 12, 2015 at 3:08 PM
The problem has been found and will be fixed in the next release of Magick.NET.
Jun 12, 2015 at 5:24 PM
Good news!