Page 1 of 1

Convert crash

Posted: 2014-01-24T07:00:34-07:00
by mcraig.brs
I see there is another post similar to this just a few days ago, but I need to confirm this is the same for me. When I run a convert command as follows this is what I get

Code: Select all

convert /images/color/00/43/0043-0150.tif -flatten -format jpg -resize 2000x\> -type truecolor -strip /images/HiRes/00/43/0043-0150.jpg 2> /dev/null
*** glibc detected *** convert: double free or corruption (out): 0x0000000000adfad0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76166)[0x7f98ae603166]
/lib64/libc.so.6(+0x78c93)[0x7f98ae605c93]
/usr/lib64/libMagickCore.so.2(RelinquishMagickMemory+0xf)[0x7f98b11997ff]
/usr/lib64/libMagickCore.so.2(DestroySplayTree+0xd6)[0x7f98b11df9a6]
/usr/lib64/libMagickCore.so.2(DestroyImageProperties+0x36)[0x7f98b11abc86]
/usr/lib64/libMagickCore.so.2(DestroyImage+0x113)[0x7f98b1187253]
/usr/lib64/libMagickCore.so.2(DestroyImageList+0x38)[0x7f98b11925c8]
/usr/lib64/libMagickWand.so.2(MogrifyImageList+0x7ea)[0x7f98b0e41d7a]
/usr/lib64/libMagickWand.so.2(MogrifyImages+0x221)[0x7f98b0e49701]
/usr/lib64/libMagickWand.so.2(ConvertImageCommand+0xc09)[0x7f98b0dd7c69]
convert[0x400dab]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f98ae5abd1d]
convert[0x400bc9]
======= Memory map: ========
00400000-00402000 r-xp 00000000 fd:00 920951                             /usr/bin/convert
00601000-00602000 rw-p 00001000 fd:00 920951                             /usr/bin/convert
00ace000-00ca1000 rw-p 00000000 00:00 0                                  [heap]
7f98a2c87000-7f98a2c88000 ---p 00000000 00:00 0 
7f98a2c88000-7f98a3688000 rw-p 00000000 00:00 0 
7f98a3688000-7f98a3689000 ---p 00000000 00:00 0 
7f98a3689000-7f98a4089000 rw-p 00000000 00:00 0 
7f98a4089000-7f98a408a000 ---p 00000000 00:00 0 
7f98a408a000-7f98a4a8a000 rw-p 00000000 00:00 0 
7f98a4a8a000-7f98a4a8b000 ---p 00000000 00:00 0 
7f98a4a8b000-7f98a548b000 rw-p 00000000 00:00 0 
7f98a548b000-7f98a548c000 ---p 00000000 00:00 0 
7f98a548c000-7f98a6a87000 rw-p 00000000 00:00 0 
7f98a7682000-7f98a768c000 r-xp 00000000 fd:00 922426                     /usr/lib64/ImageMagick-6.5.4/modules-Q16/coders/tiff.so
7f98a768c000-7f98a788c000 ---p 0000a000 fd:00 922426                     /usr/lib64/ImageMagick-6.5.4/modules-Q16/coders/tiff.so
7f98a788c000-7f98a788d000 rw-p 0000a000 fd:00 922426                     /usr/lib64/ImageMagick-6.5.4/modules-Q16/coders/tiff.so
7f98a788d000-7f98ad71e000 r--p 00000000 fd:00 913793                     /usr/lib/locale/locale-archive
7f98ad71e000-7f98ad720000 r-xp 00000000 fd:00 919925                     /usr/lib64/libXau.so.6.0.0
7f98ad720000-7f98ad920000 ---p 00002000 fd:00 919925                     /usr/lib64/libXau.so.6.0.0
7f98ad920000-7f98ad921000 rw-p 00002000 fd:00 919925                     /usr/lib64/libXau.so.6.0.0
7f98ad921000-7f98ad93e000 r-xp 00000000 fd:00 919974                     /usr/lib64/libxcb.so.1.1.0
7f98ad93e000-7f98adb3e000 ---p 0001d000 fd:00 919974                     /usr/lib64/libxcb.so.1.1.0
7f98adb3e000-7f98adb3f000 rw-p 0001d000 fd:00 919974                     /usr/lib64/libxcb.so.1.1.0
7f98adb3f000-7f98adb43000 r-xp 00000000 fd:00 391016                     /lib64/libuuid.so.1.3.0
7f98adb43000-7f98add42000 ---p 00004000 fd:00 391016                     /lib64/libuuid.so.1.3.0
7f98add42000-7f98add43000 rw-p 00003000 fd:00 391016                     /lib64/libuuid.so.1.3.0
7f98add43000-7f98add45000 r-xp 00000000 fd:00 390934                     /lib64/libdl-2.12.so
7f98add45000-7f98adf45000 ---p 00002000 fd:00 390934                     /lib64/libdl-2.12.so
7f98adf45000-7f98adf46000 r--p 00002000 fd:00 390934                     /lib64/libdl-2.12.so
7f98adf46000-7f98adf47000 rw-p 00003000 fd:00 390934                     /lib64/libdl-2.12.so
7f98adf47000-7f98adf4e000 r-xp 00000000 fd:00 390956                     /lib64/librt-2.12.so
7f98adf4e000-7f98ae14d000 ---p 00007000 fd:00 390956                     /lib64/librt-2.12.so
7f98ae14d000-7f98ae14e000 r--p 00006000 fd:00 390956                     /lib64/librt-2.12.so
7f98ae14e000-7f98ae14f000 rw-p 00007000 fd:00 390956                     /lib64/librt-2.12.so
7f98ae14f000-7f98ae175000 r-xp 00000000 fd:00 391020                     /lib64/libexpat.so.1.5.2
7f98ae175000-7f98ae374000 ---p 00026000 fd:00 391020                     /lib64/libexpat.so.1.5.2
7f98ae374000-7f98ae377000 rw-p 00025000 fd:00 391020                     /lib64/libexpat.so.1.5.2
7f98ae377000-7f98ae38d000 r-xp 00000000 fd:00 390915                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f98ae38d000-7f98ae58c000 ---p 00016000 fd:00 390915                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f98ae58c000-7f98ae58d000 rw-p 00015000 fd:00 390915                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f98ae58d000-7f98ae718000 r-xp 00000000 fd:00 390928                     /lib64/libc-2.12.so
7f98ae718000-7f98ae917000 ---p 0018b000 fd:00 390928                     /lib64/libc-2.12.so
7f98ae917000-7f98ae91b000 r--p 0018a000 fd:00 390928                     /lib64/libc-2.12.so
7f98ae91b000-7f98ae91c000 rw-p 0018e000 fd:00 390928                     /lib64/libc-2.12.so
7f98ae91c000-7f98ae921000 rw-p 00000000 00:00 0 
7f98ae921000-7f98ae9a4000 r-xp 00000000 fd:00 390936                     /lib64/libm-2.12.so
7f98ae9a4000-7f98aeba3000 ---p 00083000 fd:00 390936                     /lib64/libm-2.12.so
7f98aeba3000-7f98aeba4000 r--p 00082000 fd:00 390936                     /lib64/libm-2.12.so
7f98aeba4000-7f98aeba5000 rw-p 00083000 fd:00 390936                     /lib64/libm-2.12.so
7f98aeba5000-7f98aecdc000 r-xp 00000000 fd:00 919978                     /usr/lib64/libX11.so.6.3.0
7f98aecdc000-7f98aeedc000 ---p 00137000 fd:00 919978                     /usr/lib64/libX11.so.6.3.0
7f98aeedc000-7f98aeee2000 rw-p 00137000 fd:00 919978                     /usr/lib64/libX11.so.6.3.0
7f98aeee2000-7f98aeef9000 r-xp 00000000 fd:00 919662                     /usr/lib64/libICE.so.6.3.0
7f98aeef9000-7f98af0f9000 ---p 00017000 fd:00 919662                     /usr/lib64/libICE.so.6.3.0
7f98af0f9000-7f98af0fa000 rw-p 00017000 fd:00 919662                     /usr/lib64/libICE.so.6.3.0
7f98af0fa000-7f98af0fe000 rw-p 00000000 00:00 0 
7f98af0fe000-7f98af105000 r-xp 00000000 fd:00 919668                     /usr/lib64/libSM.so.6.0.1
7f98af105000-7f98af305000 ---p 00007000 fd:00 919668                     /usr/lib64/libSM.so.6.0.1
7f98af305000-7f98af306000 rw-p 00007000 fd:00 919668                     /usr/lib64/libSM.so.6.0.1
7f98af306000-7f98af30f000 r-xp 00000000 fd:00 919031                     /usr/lib64/libltdl.so.7.2.1
7f98af30f000-7f98af50e000 ---p 00009000 fd:00 919031                     /usr/lib64/libltdl.so.7.2.1
7f98af50e000-7f98af50f000 rw-p 00008000 fd:00 919031                     /usr/lib64/libltdl.so.7.2.1
7f98af50f000-7f98af526000 r-xp 00000000 fd:00 390952                     /lib64/libpthread-2.12.so
7f98af526000-7f98af726000 ---p 00017000 fd:00 390952                     /lib64/libpthread-2.12.so
7f98af726000-7f98af727000 r--p 00017000 fd:00 390952                     /lib64/libpthread-2.12.so
7f98af727000-7f98af728000 rw-p 00018000 fd:00 390952                     /lib64/libpthread-2.12.so
7f98af728000-7f98af72c000 rw-p 00000000 00:00 0 
7f98af72c000-7f98af739000 r-xp 00000000 fd:00 919991                     /usr/lib64/libgomp.so.1.0.0
7f98af739000-7f98af938000 ---p 0000d000 fd:00 919991                     /usr/lib64/libgomp.so.1.0.0
7f98af938000-7f98af939000 rw-p 0000c000 fd:00 919991                     /usr/lib64/libgomp.so.1.0.0
7f98af939000-7f98af94e000 r-xp 00000000 fd:00 390980                     /lib64/libz.so.1.2.3
7f98af94e000-7f98afb4d000 ---p 00015000 fd:00 390980                     /lib64/libz.so.1.2.3
7f98afb4d000-7f98afb4e000 r--p 00014000 fd:00 390980                     /lib64/libz.so.1.2.3
7f98afb4e000-7f98afb4f000 rw-p 00015000 fd:00 390980                     /lib64/libz.so.1.2.3
7f98afb4f000-7f98afb5f000 r-xp 00000000 fd:00 390999                     /lib64/libbz2.so.1.0.4
7f98afb5f000-7f98afd5e000 ---p 00010000 fd:00 390999                     /lib64/libbz2.so.1.0.4
7f98afd5e000-7f98afd60000 rw-p 0000f000 fd:00 390999                     /lib64/libbz2.so.1.0.4
7f98afd60000-7f98afdbf000 r-xp 00000000 fd:00 919980                     /usr/lib64/libXt.so.6.0.0
7f98afdbf000-7f98affbe000 ---p 0005f000 fd:00 919980                     /usr/lib64/libXt.so.6.0.0
7f98affbe000-7f98affc4000 rw-p 0005e000 fd:00 919980                     /usr/lib64/libXt.so.6.0.0
7f98affc4000-7f98affc5000 rw-p 00000000 00:00 0 
7f98affc5000-7f98affd7000 r-xp 00000000 fd:00 919986                     /usr/lib64/libXext.so.6.4.0
7f98affd7000-7f98b01d7000 ---p 00012000 fd:00 919986                     /usr/lib64/libXext.so.6.4.0
7f98b01d7000-7f98b01d8000 rw-p 00012000 fd:00 919986                     /usr/lib64/libXext.so.6.4.0
7f98b01d8000-7f98b020c000 r-xp 00000000 fd:00 918357                     /usr/lib64/libfontconfig.so.1.4.4
7f98b020c000-7f98b040c000 ---p 00034000 fd:00 918357                     /usr/lib64/libfontconfig.so.1.4.4
7f98b040c000-7f98b040e000 rw-p 00034000 fd:00 918357                     /usr/lib64/libfontconfig.so.1.4.4
7f98b040e000-7f98b044d000 r-xp 00000000 fd:00 918321                     /usr/lib64/libjpeg.so.62.0.0
7f98b044d000-7f98b064d000 ---p 0003f000 fd:00 918321                     /usr/lib64/libjpeg.so.62.0.0
7f98b064d000-7f98b064e000 rw-p 0003f000 fd:00 918321                     /usr/lib64/libjpeg.so.62.0.0
7f98b064e000-7f98b065e000 rw-p 00000000 00:00 0 
7f98b065e000-7f98b06f6000 r-xp 00000000 fd:00 918349                     /usr/lib64/libfreetype.so.6.3.22
7f98b06f6000-7f98b08f5000 ---p 00098000 fd:00 918349                     /usr/lib64/libfreetype.so.6.3.22
7f98b08f5000-7f98b08fb000 rw-p 00097000 fd:00 918349                     /usr/lib64/libfreetype.so.6.3.22
7f98b08fb000-7f98b095d000 r-xp 00000000 fd:00 918393                     /usr/lib64/libtiff.so.3.9.4
7f98b095d000-7f98b0b5c000 ---p 00062000 fd:00 918393                     /usr/lib64/libtiff.so.3.9.4
7f98b0b5c000-7f98b0b5f000 rw-p 00061000 fd:00 918393                     /usr/lib64/libtiff.so.3.9.4
7f98b0b5f000-7f98b0b94000 r-xp 00000000 fd:00 918366                     /usr/lib64/liblcms.so.1.0.19
7f98b0b94000-7f98b0d94000 ---p 00035000 fd:00 918366                     /usr/lib64/liblcms.so.1.0.19
7f98b0d94000-7f98b0d96000 rw-p 00035000 fd:00 918366                     /usr/lib64/liblcms.so.1.0.19
7f98b0d96000-7f98b0d98000 rw-p 00000000 00:00 0 
7f98b0d98000-7f98b0ea0000 r-xp 00000000 fd:00 922477                     /usr/lib64/libMagickWand.so.2.0.0
Aborted
Unfortunately I am not able to release the image to look at or test with.

This is performed by an automated script and this is causing it to crash. Is there any way to capture this and prevent it from crashing the script that calls it?

Re: Convert crash

Posted: 2014-01-24T08:00:40-07:00
by glennrp
If you can't show us the image, maybe you could at least post the output of

Code: Select all

convert -verbose -debug coder -log %e [other options] ...
and tell us the version of ImageMagick that you're using (apparently 6.5.4 Q16 which is ancient).

Re: Convert crash

Posted: 2014-01-24T13:39:57-07:00
by mcraig.brs
Well, I would but my system admin has already upgraded to the newest stable version (6.8). This is what I get for a lot of the images we have now. (Even images that worked before)

Here is the new information:

Code: Select all

[scripts]# /usr/local/bin/convert --version
Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: fftw openexr x 

Code: Select all

/usr/local/bin/convert /images/color/10/79/1079-0141.tif -flatten -format jpg -resize 2000x\> -type truecolor -strip /images/HiRes/10/79/1079-0141.jpg
convert: no decode delegate for this image format `/images/color/10/79/1079-0141.tif' @ error/constitute.c/ReadImage/555.
convert: no images defined `/images/HiRes/10/79/1079-0141.jpg' @ error/convert.c/ConvertImageCommand/3147.

Code: Select all

/usr/local/bin/convert -verbose -debug coder -log %e /images/color/10/79/1079-0141.tif -flatten -format jpg -resize 2000x\> -type truecolor -strip /images/HiRes/10/79/1079-0141.jpg
convert: no decode delegate for this image format `/images/color/10/79/1079-0141.tif' @ error/constitute.c/ReadImage/555.
convert: no images defined `/images/HiRes/10/79/1079-0141.jpg' @ error/convert.c/ConvertImageCommand/3147.
* Edited to correct "code" to "coder" and reflect termial output. (and corrected path)

Code: Select all

 /usr/local/bin/convert -verbose -debug /images/color/10/79/1079-0141.tif -flatten -format jpg -resize 2000x\> -type truecolor -strip /images/HiRes/10/79/1079-0141.jpg
convert: unrecognized event type `/images/color/10/79/1079-0141.tif' @ error/convert.c/ConvertImageCommand/1167.
It seems to be doing this on all the images I have JPG and TIF. (I have not tested PSD or PNG yet.)

Re: Convert crash

Posted: 2014-01-24T13:47:00-07:00
by fmw42
It looks like they did not install the tiff delegate library.

Do

convert -version

and see what delegates you have installed that IM sees. Perhap it was installed, but either failed or misconfigured so that IM does not see it.

On my system (Mac OSX), IM 6.8.8.2, I have the following


convert -version
Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-13 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib cairo fftw fontconfig freetype gslib jbig jng jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib

Though I installed all my delegates before installing IM from source.

Re: Convert crash

Posted: 2014-01-24T13:59:34-07:00
by mcraig.brs
Here is what I get:

Code: Select all

/usr/local/bin/convert --version
Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: fftw openexr x 
So how do I get the proper "delegates" is it compile time options/libraries/other??

Re: Convert crash

Posted: 2014-01-24T14:53:33-07:00
by mcraig.brs
Ok, I've done some homework and found some delegates:

tiff/jpg/png are pretty obvious as they are named what they can use.

What delegate(s) do I need to work on PSD's? I have many multi-layer PSD's in the library I have to manipulate.

Re: Convert crash

Posted: 2014-01-24T15:04:06-07:00
by fmw42
at least Ghostscript, but if you want to work with fonts and text to images, you also need fontconfig and freetype, as I recall. It is probably good to have lcms also.