ImageMagick crashing randomly on Windows
-
- Posts: 15
- Joined: 2009-07-25T09:16:08-07:00
- Authentication code: 8675309
ImageMagick crashing randomly on Windows
I'm on Windows 7 and have installed ImageMagick-6.7.4-8-Q16-windows-x64-dll.exe
I'm running a batch script that loops through a folder of images, and calls ImageMagick to crop them. However, sometimes ImageMagick crashes and I get an error message "ImageMagick Studio library and utility programs has stopped working" (a pop-up windows message, not a message in the command prompt). This can happen multiple times as the script loops through the images, or sometimes all the images are processed successfully.
You can download the script and files I am using here: http://www.iliveinabin.com/ImageSlicer.zip
Usage is test.cmd "C:\Path\to\test" (or you should be able to just drag the test folder onto the test.cmd file in Windows Explorer)
In the script I am checking the %errorcode% and it appears to always be 0, even when ImageMagick crashes. Presumably this is because if ImageMagick crashes then it can't set an exit code, and errorcode contains the value from before ImageMagick was called?
I have tried adding a 1s timeout in the loop, but this didn't make any difference, so it doesn't seem like the script is calling ImageMagick too quickly in repetition to cause the error.
Since the error is intermittent, I'm not sure what the problem is, and since ImageMagick crashes rather than exiting with an error, I don't know how I could get any debug information on what might be causing the error?
Dave
I'm running a batch script that loops through a folder of images, and calls ImageMagick to crop them. However, sometimes ImageMagick crashes and I get an error message "ImageMagick Studio library and utility programs has stopped working" (a pop-up windows message, not a message in the command prompt). This can happen multiple times as the script loops through the images, or sometimes all the images are processed successfully.
You can download the script and files I am using here: http://www.iliveinabin.com/ImageSlicer.zip
Usage is test.cmd "C:\Path\to\test" (or you should be able to just drag the test folder onto the test.cmd file in Windows Explorer)
In the script I am checking the %errorcode% and it appears to always be 0, even when ImageMagick crashes. Presumably this is because if ImageMagick crashes then it can't set an exit code, and errorcode contains the value from before ImageMagick was called?
I have tried adding a 1s timeout in the loop, but this didn't make any difference, so it doesn't seem like the script is calling ImageMagick too quickly in repetition to cause the error.
Since the error is intermittent, I'm not sure what the problem is, and since ImageMagick crashes rather than exiting with an error, I don't know how I could get any debug information on what might be causing the error?
Dave
Re: ImageMagick crashing randomly on Windows
Grab http://www.imagemagick.org/download/bin ... ws-dll.exe. We'll have a 64-bit version within a day or two. This release has a patch that fixes the problem you reported.
-
- Posts: 2
- Joined: 2012-01-25T02:23:37-07:00
- Authentication code: 8675308
Re: ImageMagick crashing randomly on Windows
I have the same problem on Windows 7 (64 Bit). Some image, most (but not only) TIFF, always cause a crash, while others cause it once but pass Image Magick without any problems in a second or third try. I call convert.exe from .NET via System.Diagnostics.Process.
Profile is the one delivered with Image Magick.
Source files are tif, jpg, eps, png - where tif, eps and jpg are in cmyk colorspace most of the time.
Output is always jpg.
You can download an image that always causes a crash here: http://dl.dropbox.com/u/18526818/143656714_736.tif
The problem occurred with
ImageMagick-6.7.4-2-Q16-windows-dll.exe
ImageMagick-6.7.4-8-Q16-windows-dll.exe
Using version 6.7.4-9 is no solution for me, as this release tells me "no decode delegate for this image format" for all images i try to convert.
Code: Select all
convert <in> -resize "640x480>" -profile "sRGB.icc" -colorspace "RGB" -quality 70 <out.jpg>
Source files are tif, jpg, eps, png - where tif, eps and jpg are in cmyk colorspace most of the time.
Output is always jpg.
You can download an image that always causes a crash here: http://dl.dropbox.com/u/18526818/143656714_736.tif
The problem occurred with
ImageMagick-6.7.4-2-Q16-windows-dll.exe
ImageMagick-6.7.4-8-Q16-windows-dll.exe
Using version 6.7.4-9 is no solution for me, as this release tells me "no decode delegate for this image format" for all images i try to convert.
Re: ImageMagick crashing randomly on Windows
Oops. The TIFF coder modules was not included in the distribution. We'll release an update this evening.
-
- Posts: 2
- Joined: 2012-01-25T02:23:37-07:00
- Authentication code: 8675308
Re: ImageMagick crashing randomly on Windows
Cool! Thanks!
-
- Posts: 15
- Joined: 2009-07-25T09:16:08-07:00
- Authentication code: 8675309
Re: ImageMagick crashing randomly on Windows
Just tried the latest version ImageMagick-6.7.5-0-Q16-windows-x64-dll.exe but it is still crashing randomly for me.
Re: ImageMagick crashing randomly on Windows
The crash seems to come from the TIFF EXIF profile handler. Try -define tiff:exif-properties=false to ignore the EXIF profile. Does that resolve any crashes?
-
- Posts: 15
- Joined: 2009-07-25T09:16:08-07:00
- Authentication code: 8675309
Re: ImageMagick crashing randomly on Windows
No, unfortunately it still crashes when adding -define tiff:exif-properties=false to the command. I tried with JPEGs and they work fine, just seems to be these TIFFs. Maybe some non-standard tag added to TIFFs by Photoshop.
I tried using ImageMagick to strip the exif from the TIFFs, but it crashes. I thought maybe exiftool might be able to strip the exif instead, but reading the exiftool FAQ it seems it's not possible to easily strip the exif from TIFFs.
I tried using ImageMagick to strip the exif from the TIFFs, but it crashes. I thought maybe exiftool might be able to strip the exif instead, but reading the exiftool FAQ it seems it's not possible to easily strip the exif from TIFFs.
Re: ImageMagick crashing randomly on Windows
Do you have an image that reliably causes a crash? We need to reproduce the problem so we can debug and determine if the cause of failure is in ImageMagick or the TIFF delegate library.
-
- Posts: 15
- Joined: 2009-07-25T09:16:08-07:00
- Authentication code: 8675309
Re: ImageMagick crashing randomly on Windows
No, I'm afraid not. Sometimes the batch script will loop through and process all the images successfully, while other times it will crash quite a few times. Hopefully LordOfTheStrings is still monitoring this thread since he/she said they had some images that always cause a crash.
-
- Posts: 1
- Joined: 2014-01-07T07:34:21-07:00
- Authentication code: 6789
Re: ImageMagick crashing randomly on Windows
I appear to be having a similar issue. ImageMagick appears to be crashing whenever it is ran on Windows 7 or Windows 8 with certain TIFF files. I am currently running on ImageMagick 6.7.5-7 2012-02-23 If I run it on directly on the command line it will run, but if I run it through the .exe it will crash. This does not seem to occur on my Win 2012 install. I try running it in Verbose mode and it will just simply crash.
The TIFF files that are used to render this are created in Photoshop. However, it doesn't look like they have any radical information like layers or anything like that in them. They are simple TIFF files.
Any guidance would be much appreciated.
The TIFF files that are used to render this are created in Photoshop. However, it doesn't look like they have any radical information like layers or anything like that in them. They are simple TIFF files.
Any guidance would be much appreciated.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ImageMagick crashing randomly on Windows
I don't understand "If I run it on directly on the command line it will run, but if I run it through the .exe it will crash." What .exe?
If you have a command that consistently crashes with a particular image, please post both. You can put the image somewhere like dropbox.com and paste the link here.
If you have a command that consistently crashes with a particular image, please post both. You can put the image somewhere like dropbox.com and paste the link here.
snibgo's IM pages: im.snibgo.com
Re: ImageMagick crashing randomly on Windows
We recently fixed a bug that only occurred with specific tiff images. This will be fixed in 6.8.8-2. If you can post a link to one of your images that crashes so I can test it with the latest beta.