Report memory leak when process svg without delegate

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
jstph
Posts: 31
Joined: 2011-01-27T10:07:43-07:00
Authentication code: 8675308

Report memory leak when process svg without delegate

Post by jstph »

Magic, Merry Christmas. again, apologize for multiple topic.
Testing file.
http://upload.wikimedia.org/wikipedia/c ... VS_SVG.svg

I run under the windows and can't install any svg delegate. From my understand, ImageMagick will convert the svg to MVG, and draw the image out. I maybe wrong :)
Anyway, I experience several memory leak. So far, I can only figure out one.

It is in svg.c file
static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
{

if (LocaleCompare(image_info->magick,"MSVG") != 0)
{
const DelegateInfo
*delegate_info;
delegate_info=GetDelegateInfo("svg:decode",(char *) NULL,exception);
……
}
…..
}

After calling delegate_info=GetDelegateInfo("svg:decode",(char *) NULL,exception);
since I don’t have any svg delegate installed, so there will be a warning message in the exception, which will be overwritten later without properly delete.
I add two line code after call GetDelegateInfo
/** this is a temporary fix to get rid of the exception which generated by call Getdelegateinfo.*/
DestroyExceptionInfo(exception);
exception = AcquireExceptionInfo();

This is not a good fix. It throws the warning out directly, hope you can give me some input how to fix this.

I also experience the font name list of system been left behind. I can’t figure out the reason and several small memory leak as well. Hope you can reproduce the leak and give me some input.

My OS is window 8,
IM package is 6.8.4. (Unable to update at this moment, since it close to our product release.)

thanks for the help.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Report memory leak when process svg without delegate

Post by magick »

The problem you reported is fixed in ImageMagick 6.8.8-0 Beta. We have an improved SVG renderer under Windows. Look for a release by the end of the month.

Also, separate topics are encouraged, one for each distinct problem or bug report.
jstph
Posts: 31
Joined: 2011-01-27T10:07:43-07:00
Authentication code: 8675308

Re: Report memory leak when process svg without delegate

Post by jstph »

that is great, thank you. I am looking forward for the new release.
Post Reply