Discussion:
[tex-k] epstopdf crashes with malloc error
Seth Gilchrist
2014-05-07 04:24:41 UTC
Permalink
Hello,
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 eps file can be downloaded from
https://github.com/sethgilchrist/dissertation/blob/master/intro/Figures/NeckFractues.eps

Please let me know if you need more information.

System Info:

$ epstopdf --version
epstopdf ($Id: epstopdf.pl 32701 2014-01-17 18:09:54Z karl $) 2.21

$ uname -a
Linux computer01 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6) stable release version 2.19, by
Roland McGrath et al.
Compiled by GNU CC version 4.8.2.
Compiled on a Linux 3.13.9 system on 2014-04-12.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-k/attachments/20140506/d94894fa/attachment.html>
Heiko Oberdiek
2014-05-07 06:12:00 UTC
Permalink
Hello,
Post by Seth Gilchrist
I'm using epstopdf as part of LaTeX. The latex compilation fails on a
$ 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

Loading...