Page 1 of 1

Access Violation (Read) with DrawableRoundRectangle

Posted: 2010-05-04T09:07:38-07:00
by imcz
Hi,

I do get an access violation with drawing a DrawableRoundRectangle and certain parameter (creating the Drawable-class itself does work just fine).
I am using ImageMagick 6.5.2-Q8 on Vista 64.
I am using Magic++ with Visual Studio 2003.

here is some code which does demonstrate the issue:

Code: Select all

//Image dimension, used also for the rounded rectangle
int nWidth = 1944, nHeight = 2592;
//Initial corner dimensions
double fHorizCR = 555, fVertCR = 649;

Geometry geometry;
geometry.width(nWidth);
geometry.height(nHeight);
geometry.xOff(0);
geometry.yOff(0);

Image image(geometry,Color("white"));
image.strokeWidth(0);
image.fillColor("black");

//This does work
image.draw(DrawableRoundRectangle(0,0,nWidth,nHeight,fHorizCR,fVertCR));

//Now increase the corner dimensions slightly
fHorizCR = 557.7;
fVertCR = 651.2;

//This fails with an access violation
image.draw(DrawableRoundRectangle(0,0,nWidth,nHeight,fHorizCR,fVertCR));
The first draw call does work, the second does not, I don't see really why.
Interestingly, when I changed the image (and rectangle dimensions) to 194x259, it does work for both, when I increase the size, it will still fail.
Is there some kind of limit I am reaching?
It also doesn't seem to be related to the factor between rectangle dimensions and corner dimensions, but actually with the absolute values as far as I can tell.

Is there a limit I am not aware of? (Because then I can build in a check)
Or is there a bug within the draw method.
Any help is highly appreciated.

Thanks

Michael

Re: Access Violation (Read) with DrawableRoundRectangle

Posted: 2010-05-07T04:29:06-07:00
by imcz
Sorry to push this, but I am wondering why no one is commenting.
Am I in the wrong forum or section?
Or did I forgot any information to add?

Re: Access Violation (Read) with DrawableRoundRectangle

Posted: 2010-05-07T05:29:31-07:00
by magick
We can reproduce the problem you posted and have a patch. Look for it in the next ImageMagick point release within a day or two. Thanks.

Re: Access Violation (Read) with DrawableRoundRectangle

Posted: 2010-05-07T07:52:20-07:00
by imcz
Thank you very much