Magick++ exception bug?
Posted: 2008-11-21T14:13:39-07:00
Hello,
h_b_diff.png can be downloaded here
I think that there is a problem with Magick++ warning exceptions.
Ie. the following code crash on my png image which generate a warning.
The crash occurs because read throw a warning exception at that line:
and throwException deletes the exception (line DestroyExceptionInfo( &exception_ );)
So, when crop occurs we have:
A better schema would be to not delete the exception when throwException is called with Magick::Image::image
Thanks,
h_b_diff.png can be downloaded here
I think that there is a problem with Magick++ warning exceptions.
Ie. the following code crash on my png image which generate a warning.
Code: Select all
Magick::Image image;
try {
// Read a file into image object
image.read( "h_b_diff.png" );
}
catch( Warning& e)
{
}
// Crop the image to specified size (width, height, xOffset, yOffset)
image.crop( Geometry(100,100, 100, 100) );
Code: Select all
if ( image )
throwException( image->exception );
So, when crop occurs we have:
and then the application crashes in InheritException / ResetLinkedListIterator at the beginning of CropImage (function CloneImage).image->exception.exceptions = NULL
A better schema would be to not delete the exception when throwException is called with Magick::Image::image
Thanks,