Why is the following convert command resulting in Segmentation fault?

469 views Asked by At

This is the command I am running (directly from the command line, logged in as root):

/usr/bin/convert '/var/storage/files/drupal/273f09ab5f8671d3c457719c7955063f.jpg' -resize 127x127! -quality '75' '/var/storage/files/drupal/imagecache/artwork_moreart/273f09ab5f8671d3c457719c7955063f.jpg'

The result of the command is just: Segmentation fault

Version of ImageMagic: ImageMagick 6.4.3 2009-02-25

Linux version: SUSE Linux Enterprise Server 11 (x86_64)

This image does exists and I have copied it to my local computer and opened it up with no issue.

Please let me know if there is additional information you need and how to get this information.

1

There are 1 answers

0
Kurt Pfeifle On

Try it with a correct command. The ! needs backslash-escaping, first of all, otherwise it is interpreted by your shell, instead of by convert:

/usr/bin/convert \
 '/var/storage/files/drupal/273f09ab5f8671d3c457719c7955063f.jpg' \
 -resize 127x127\! -quality '75' \
 '/var/storage/files/drupal/imagecache/artwork_moreart/273f09ab5f8671d3c457719c7955063f.jpg'

If this doesn't work, try to surround the argument with single quotes too (like you did with your other arguments:

127x127\!   =>   '127x127\!'

The cause of your problem could also reside outside the convert binary, and be within the specific input JPEG you want process. You can try to rule this out by processing a set different input files. Start with the built-in IM test files logo:, wizard: and netscape::

convert wizard:       \
  -resize "127x127\!" \
   127wiz.jpg

convert logo:         \
  -resize "127x127\!" \
   127log.jpg

convert netscape:     \
  -resize "127x127\!" \
   127net.jpg

Sorry, I cannot reproduce your problem directly here. SLES 11 with IM 6.4.3 is simply too ancient for me.