nstanger / process_podcast

Python script for processing and assembling a podcast from various input sources
0 stars 0 forks source link

convert crashes with PDF slides on macOS #36

Open nstanger opened 5 years ago

nstanger commented 5 years ago

The current MacPorts version of convert no longer seems to be able to convert a PDF page to a JPEG. For example:

convert "foo.pdf[0]" foo0.jpg

causes a SIGABRT, with the error “Abort” (singularly uninformative).

The output of convert -debug All shows that it’s creating temporary files in /var/folders (which are actually symlinks to the source file), and dies while trying to delete one of them (which fails):

...
2019-07-24T16:22:14+12:00 0:00.180 0.160u 6.9.9 Resource convert[77330]: resource.c/AcquireUniqueFileResource/641/Resource
  Acquire /var/folders/p_/d22ldhnj1n7c6syb0z0c33180000gn/T/magick-77330hrI2NHiWDL0U
2019-07-24T16:22:14+12:00 0:00.180 0.160u 6.9.9 Resource convert[77330]: resource.c/RelinquishUniqueFileResource/1200/Resource
  Relinquish /var/folders/p_/d22ldhnj1n7c6syb0z0c33180000gn/T/magick-77330hrI2NHiWDL0U
2019-07-24T16:22:14+12:00 0:00.190 0.160u 6.9.9 Exception convert[77330]: utility.c/ShredFile/1826/Exception
  Failed to remove: /var/folders/p_/d22ldhnj1n7c6syb0z0c33180000gn/T/magick-77330Idey319SiLcO
Abort

The file it’s attempting to delete doesn’t exist in /var/folders (after the fact, at least).

The problem is definitely within convert — running the corresponding GhostScript command (extracted from convert -verbose) works fine.

nstanger commented 5 years ago
nstanger commented 5 years ago

Already open under ticket https://trac.macports.org/ticket/57740.

nstanger commented 5 years ago

GraphicsMagick (http://www.graphicsmagick.org/) might be an alternative, but it doesn’t appear to support:

nstanger commented 4 years ago

ImageMagick port has been updated to fix this (https://trac.macports.org/ticket/57740#comment:20), need to test that everything is now working correctly, then close this and move on to #32.