# [tex-live] [pretest] pdfcrop crashes when called from certain directory

Nasser M. Abbasi nma at 12000.org
Sat Apr 23 17:03:41 CEST 2016

On 4/23/2016 9:26 AM, Uwe Siart wrote:
> This is a really weird problem that I observe after today's update.
> pdfcrop (or actually gswin32c) crashes when called from one special
> directory:
>
> d:\user\coupling-structure-letter\figures>pdfcrop s-params.pdf
> PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
> !!! Error: Ghostscript exited with error code 5!
> C:\Programme\texlive\2016\bin\win32\runscript.tlu:677: command failed with exit code 13:
> perl.exe c:\Programme\texlive\2016\texmf-dist\scripts\pdfcrop\pdfcrop.pl s-params.pdf
>

The cases I've seen with pdfcrop gives error is when the pdf file
has page larger than the maximim page size (\maxdimen).
Try to run pdfinfo on the pdf(s) in that folder and see the
pagesize field.

> The crazy thing is that it works in any other directory that I have
> tried instead. I have no clue what is special about that one directory
> so that it provokes such a crash.
>
> Actually I can't tell
>
> - if it is really related to today's update (because I can't reproduce
>   it in other directories, so the problem could in principle be older)
>
> - if it is related to pdfcrop.pl or to PSTricks (this file s-params.pdf
>   contains a PSTricks graphics, PSTricks was updated today, other PDFs
>   work fine in this directory, s-params.pdf works fine in other
>   directories)
>
> Really weird. Perhaps someone got some idea. If not, please don't waste
> too much time this, because it's really shady and I would not know how
> to isolate the culprit. Platform is XP.
>