[NTG-pdftex] [pdftex-Bugs][4303] pdftex segfaults

pdftex-bugs at sarovar.org pdftex-bugs at sarovar.org
Tue Apr 20 10:23:01 CEST 2010

Bugs item #4303, was opened at 2010-02-25 18:06
>Status: Closed
Priority: 3
Submitted By: Jeremy Johnson (redwood)
Assigned to: Nobody (None)
Summary: pdftex segfaults 
Category: None
Group: None
>Resolution: Works For Me

Initial Comment:
$ pdftex -version
pdfTeX 3.1415926-1.40.10-2.2 (Web2C 2009)
kpathsea version 5.0.0
Copyright 2009 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.40; using libpng 1.2.42
Compiled with zlib 1.2.3; using zlib 1.2.3
Compiled with poppler version 0.12.3

After upgrading from texlive-2008 to 2009 on both my x86 and amd64 Gentoo systems, I discovered that all my forms/letters containing pstricks logos/graphics were missing the logo images, when compiled via "pdflatex --shell-escape letter.tex" using auto-pst-pdf: 

Apparently pdfcrop was not able to crop the images.
Since my logos were already cropped when I created them in Inkscape,  I worked around the issue by disabling cropping:

\usepackage[pspdf={-dAutoRotatePages=/None}, crop=off]{auto-pst-pdf}
or by using the pdfcrop option --ini:
\usepackage[pspdf={-dAutoRotatePages=/None}, pdfcrop={--debug --verbose --ini}]{auto-pst-pdf}

After looking through test.log I decided to run the runsystem() commands manually.
So I tried running the command
pdfcrop --verbose --debug  "test-autopp.pdf" "test-pics.pdf"

which fails:

PDFCROP 1.22, 2009/12/29 - Copyright (c) 2002-2009 by Heiko Oberdiek.
* System: unix
* Not found (gs): /sbin/gs
* Not found (gs): /usr/sbin/gs
* Not found (gs): /usr/local/sbin/gs
* Not found (gs): /bin/gs
* Found (gs): /usr/bin/gs
* Autodetected ghostscript command: gs
* Input file: test-autopp.pdf
* Output file: test-autopp-crop.pdf
* Margins: 0 0 0 0
* Running ghostscript for BoundingBox calculation ...
* Ghostscript call: gs -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f test-
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
%%BoundingBox: 597 597 686 686
* Page 1: 597 597 686 686
%%HiResBoundingBox: 597.799951 597.799951 685.686284 685.686284
* Running pdfTeX ...
* pdfTeX call: pdftex -no-shell-escape -interaction=nonstopmode tmp-
This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009)
entering extended mode
(./tmp-pdfcrop-5737.tex* Cleanup
* Temporary files: tmp-pdfcrop-5737.tex tmp-pdfcrop-5737.log
!!! Error: pdfTeX run failed!

Next, I decided to manually run pdftex on tmp-pdfcrop-5737.tex
pdftex -shell-escape -file-line-error tmp-pdfcrop-5737.tex
which segfaults.

If I run pdftex on the tmp-pdfcrop-????.tex with strace, I get
the attached strace.log
In case the segfault has something to do with my font caches
I cleaned out my font caches:
"rm ~/.fontconfig/*" and 
"mv /var/cache/fontconfig/* /var/cache/fontconfig.bak/"
but still get same segfault.


>Comment By: The Thanh Han (hanthethanh)
Date: 2010-04-20 08:23

thanks for looking at this. I tried tmp-pdfcrop-6132.tex but also could not reproduce the problem.

I took a close look at strace.log, and it seems the segfault happened while pdftex was searching for some system font stuff. Which is weird, since it should not do that.

Then I looked at the version string and it says it uses poppler. So apparently poppler has been fixed in the meantime on your system.

This is not the first time we were bitten by poppler, sadly. 


Comment By: Jeremy Johnson (redwood)
Date: 2010-04-20 00:47

Since I last reported this segfault on 2/24/10, both my x86 and amd64 Gentoo systems have apparently fixed themselves. I, too, can no longer reproduce the segfault.

Unfortunately many packages have been updated since then:
genlop -l|grep 2010 |grep "[Feb|Mar|Apr]"|wc -l

including 43 dev-tex packages:
genlop -l|grep 2010 |grep "[Feb|Mar|Apr]"|grep dev-tex|wc -l

So I don't know what got fixed. I had been running pdflatex with pdfcrop=/None so I hadn't realized that sometime between the end of Feb and today, the pdfcrop segfault problem fixed itself. 

I no longer have "tmp-pdfcrop-5737.tex", but do have the similar "tmp-pdfcrop-6132.tex" included in the attached Bug-pdfcrop.bz2 which was created Feb 24/25.



Comment By: The Thanh Han (hanthethanh)
Date: 2010-04-16 10:40

can you please submit tmp-pdfcrop-5737.tex? I ran the test but didn't get a segfault. Thanks.


You can respond by visiting: 

More information about the ntg-pdftex mailing list