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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
neth
Posts: 3
Joined: 2015-12-11T00:57:12-07:00
Authentication code: 1151

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

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

Which version of ImageMagick are you using? And can you share a svg file the has this issue?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
neth
Posts: 3
Joined: 2015-12-11T00:57:12-07:00
Authentication code: 1151

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

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
neth
Posts: 3
Joined: 2015-12-11T00:57:12-07:00
Authentication code: 1151

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

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

Your issue will be resolved in the next version of ImageMagick (6.9.2-9). Thanks for reporting this.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply