[tex-k] epstopdf crashes with malloc error

Heiko Oberdiek heiko.oberdiek at googlemail.com
Wed May 7 08:12:00 CEST 2014


Hello,

On 07.05.2014 06:24, Seth Gilchrist wrote:

> I'm using epstopdf as part of LaTeX. The latex compilation fails on a
> epstopdf error that can be reproduced on the command line:
> 
> $ epstopdf --outfile=NeckFractues-eps-converted-to.pdf NeckFractues.eps 
> gs: malloc.c:3524: _int_malloc: Assertion `(bck->bk->size & 0x4) == 0'
> failed.

The Perl script `epstopdf' is just a wrapper for the call of ghostscript
that does the main job of converting EPS to PDF. The error message comes
from ghostscript, named `gs' under Linux. Thus your probelm is with
ghostscript. Commandline for the conversion without epstopdf:

    ps2pdf -dEPSCrop NeckFractues.eps

* Try a different ghostscript version.

* The EPS file contains:
  %%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner

  If you have generated the EPS file with Gimp, then exporting the
  bitmap to EPS and converting to PDF for pdflatex is an unnecessary
  circumvention. Gimp can export to PNG that can be read by pdflatex
  directly without further conversion.

* The image seems to combine bitmap and vector elements (red dashed
  line and the text). Gimp forces all to be a bitmap. If you are
  interested in smaller file sizes and better quality, the image
  could be composed of one bitmap for the bone structure, which
  could be vectorized via potrace, for example.
    Then a standalone TeX file could include the graphics three
  times in a row, puts the text underneath and the markings
  could be added via TikZ, for example. Then pdflatex makes
  a PDF, whose margins can be trimmed by pdfcrop.

Yours sincerely
  Heiko Oberdiek



More information about the tex-k mailing list