Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

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
jP0L4AhfGFm0IWGEBOBX
Posts: 3
Joined: 2019-06-13T04:52:16-07:00
Authentication code: 1152

Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

Post by jP0L4AhfGFm0IWGEBOBX »

Hi all,

I am running Macos 10.14.5 (18F132), and have installed Imagemagick via Macports. I have recently upgraded to version 6.9.9-40 Q16 x86_64. The full output for 'convert -version' reads:
Version: ImageMagick 6.9.9-40 Q16 x86_64 2019-06-11 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps raw tiff webp x xml zlib
I have a script for batch converting PDF files to PNG files, which goes:

Code: Select all

for i in *.pdf; do convert -verbose -density 600 -trim $i -quality 100 -flatten $(basename "$i" .pdf).png;done
After I upgraded to the latest version of Imagemagick, this no longer works. I get an 'Abort trap: 6' for each file in the batch. Sample output reads:
[ghostscript library 9.27] -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r600x600' '-sOutputFile=/var/folders/k0/m6mz3d055m75782ynnkt2k0w0000gn/T/magick-5910MkmWy1yIM0tx%d' '-f/var/folders/k0/m6mz3d055m75782ynnkt2k0w0000gn/T/magick-5910gs9cNcP8C7cU' '-f/var/folders/k0/m6mz3d055m75782ynnkt2k0w0000gn/T/magick-5910iJZ-CiPdfIWp'Abort trap: 6
This isn't restricted to this script, Imagemagick also returns this error when I try to run a simple conversion (no attributes whatsoever) of one PDF file into PNG.

Best,
x
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

Post by snibgo »

Your "-trim" should be after reading the PDF, not before. (But that won't cause an abort.)

Recent Ghostscript seems to have problems. I suggest you downgrade to 9.25 or earlier.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

Post by fmw42 »

I have heard issue with both GS 9.26 and 9.27. So downgrade to 9.23-9.25 as suggested by snibgo.
jP0L4AhfGFm0IWGEBOBX
Posts: 3
Joined: 2019-06-13T04:52:16-07:00
Authentication code: 1152

Re: Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

Post by jP0L4AhfGFm0IWGEBOBX »

I'm not sure, but I think that the issues I am experiencing might have to do with Ghostscript looking for certain X11 related dylib files in the wrong place.

I have located the Ghostscript executables on my filesystem. There are two execs, one called 'gs-noX11', and one called 'gs-X11'. When I run the 'gs-X11' exec, I get the same error message as I get when trying to convert PDFs to PNGs with the batch script I mentioned above. Output upon running 'gs-X11' reads:
/usr/local/bin/gs-X11
dyld: Library not loaded: /opt/X11/lib/libXt.6.dylib
Referenced from: /usr/local/bin/gs-X11
Reason: image not found
Abort trap: 6
It's true that 'libXt.6.dylib' is not in the folder which Ghostscript is trying to find it in. Instead of '/opt/X11/lib/', this dylib is in '/opt/local/lib' on my filesystem. Does anyone know how to point GS to the correct folder? That would be easier than downgrading to an earlier version of Ghostscript, as, annoyingly enough, I removed the old version of Ghostscript from my port directory right after I upgraded.
jP0L4AhfGFm0IWGEBOBX
Posts: 3
Joined: 2019-06-13T04:52:16-07:00
Authentication code: 1152

Re: Abort trap: 6 after upgrade to 6.9.9-40 Q16 x86_64

Post by jP0L4AhfGFm0IWGEBOBX »

Nevermind, I just downgraded to GS 9.26 (easier than I thought) and everything is working as it should again.
Post Reply