Page 1 of 1

Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T01:08:22-07:00
by neth
Hi,

I'm trying to convert svgs in a folder to PNGs. The command I'm calling is:
mogrify -format png Dir1\*.svg

The aim is to convert all svg files in Dir1 to png files.

The conversion works, but windows claims, that Imagemagick crashed and the terminal is blocked until I press the close program button.

My problem is, that I'm running this command as part of a larger program, and due to this blockage and error, the program itself blocks and I hae to confirm the close program request multiple times.
I'm not sure, what might be going wrong, since the conversion is finished and only then the crash message pops up. To me it seems, like the exit status of mogrify is not set properly in the windows32 bit dynamic version.

It does however work fine when I use the static version.

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T02:04:21-07:00
by dlemstra
Which version of ImageMagick are you using? And can you share a svg file the has this issue?

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T04:58:37-07:00
by neth
I was using IM 6.9.2-8 Q16 (dynamic) 32bit
And this link contains a zip file with a couple of svgs.
https://www.dropbox.com/s/y1s50oy2trg43 ... s.zip?dl=0

I can't test it at the moment since I uninstalled the dynamic version and installed the static version, but in general it caused the error with any set of svgs I used.

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T05:12:26-07:00
by dlemstra
I can reproduce your issue and I am working on a fix. I will get back to you when the patch has been submitted to our GIT repository.

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T05:33:38-07:00
by neth
As mentioned, it seems like its a problem with the return value coming back from mogrify in the dynamic version and it works fine with the static version. In fact (correct) images are created with both versions it seems it is just the return state that is problematic.

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-11T05:37:06-07:00
by dlemstra
It has to do with a method that is being called. This method is from a library that is no longer loaded. When convert.exe exists it unloads all the libraries but for some reason one of the libraries still wants to call a method from another library. It looks like a bug in librsvg but I am not sure about that yet. Because unloading does not happen with the static version you will not experience the problem there.

Re: Mogrify Crashes on Windows7 32bit dynamic version when converting multiple files

Posted: 2015-12-12T02:39:45-07:00
by dlemstra
Your issue will be resolved in the next version of ImageMagick (6.9.2-9). Thanks for reporting this.