Subject: bug#20773: 11.88.6; Preview fails on nested \include{} using \documentclass{sigplanconf}

From: Tassilo Horn <[email-masked]>
Date: Tue, 09 Jun 2015 13:59:16 +0200

Alex Rozenshteyn <[email-masked]> writes:

Hi Alex,

> Attempting to run `preview-document` on a file using
> \documentclass{sigplanconf} (found here:
> http://www.sigplan.org/sites/default/files/sigplanconf.cls)
> led me to discover the following unpleasant behavior:
>
> -----------------
> TeX Output exited as expected with code 1 at Mon Jun  8 16:09:46
> Running `Preview-PDF2DSC' with ``pdf2dsc main.pdf
> main.prv/tmp3331NDl/preview.dsc''
> Error: /undefinedfilename in --file--
> Operand stack:
>    PDFfile   (main.pdf)   (r)
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--
> --nostringval--   --nostringval--   false   1   %stopped_push   1910
> 1   3   %oparray_pop   1909   1   3   %oparray_pop   1893   1   3
> %oparray_pop   1787   1   3   %oparray_pop   --nostringval--
> %errorexec_pop   .runexec2   --nostringval--   --nostringval--
> --nostringval--   2   %stopped_push   --nostringval--
> Dictionary stack:
>    --dict:1170/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
> Current allocation mode is local
> Last OS error: No such file or directory
> Current file position is 1822
> GPL Ghostscript 9.06: Unrecoverable error, exit code 1
>
> Preview-PDF2DSC exited abnormally with code 1 at Mon Jun  8 16:09:46
> PDF2DSC sentinel: Opening input file: no such file or directory,
> /tmp/baz/main.prv/tmp3331NDl/preview.dsc
> ---------------------
>
> but more often, ghostscript fails with
>
> --------------------
> Preview-PDF2DSC finished at Mon Jun  8 16:10:16
> Running `Preview-Ghostscript' with ``/usr/bin/gs
> -dOutputFile\=\(main.prv/tmp3331aNr/pr1-\%d.png\) -q -dDELAYSAFER
> -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4
> -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r104.616x104.588''
> Ghostscript filter: No bounding box
> --------------------

I get similar errors:

--8<---------------cut here---------------start------------->8---
Running `Preview-LaTeX' on `main' with ``pdflatex  -file-line-error  --synctex=1 "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" "\input" main.tex''
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 9 languages loaded.

No auxiliary output files.

(./main.tex (./sigplanconf.cls
Document Class: sigplanconf 2013/07/02 v2.8 ACM SIGPLAN Proceedings
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))) (./main.aux)
(/usr/local/texlive/2014/texmf-dist/tex/latex/psnfss/ot1ptm.fd)
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/preview.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prtightpage.def)
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prauctex.def
No auxiliary output files.

(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prauctex.cfg))
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prfootnotes.def)
Preview: Fontsize 9pt
Preview: PDFoutput 1
) (./formalism.tex (./formalism_atranslation.tex
./formalism_atranslation.tex:1: Preview: Snippet 1 started.
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\@firstofone #1->
                 #1
\@startsection ... {!!!!!!*[[!}{##1\pr@endbox }}{}
                                                  \pr@\@startsection 
\section ->\@startsection 
                          {section}{1}{0pt}{-\@sectionaboveskip }{\@sectionb...
l.1 \section
            {A-Normal Form}
Preview: Tightpage -32891 -32891 32891 32891
./formalism_atranslation.tex:1: Preview: Snippet 1 ended.(496694+13332x15728640
).
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\pr@endbox ...lineskip \box \pr@box }\pr@ship@end 
                                                  {\let \protect \noexpand \...
l.1 \section{A-Normal Form}
                           
[1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]))
./main.tex:5: Preview: Snippet 2 started.
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\@firstofone #1->
                 #1
\(->\pr@protect@ship {\pr@endaftergroup }{}
                                           \pr@\( 
l.5 \(
      a + b = c\)
./main.tex:5: Preview: Snippet 2 ended.(409600+54612x2392548).
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\pr@endbox ...lineskip \box \pr@box }\pr@ship@end 
                                                  {\let \protect \noexpand \...

\)->\relax \ifmmode \ifinner $
                              \else \@badmath \fi \else \@badmath \fi 
l.5 \(a + b = c\)
                 
[2] )
(see the transcript file for additional information){/usr/local/texlive/2014/te
xmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/texlive/2014/texmf-dist/fonts/
type1/public/amsfonts/cm/cmmi9.pfb></usr/local/texlive/2014/texmf-dist/fonts/ty
pe1/public/amsfonts/cm/cmr9.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1
/urw/times/utmb8a.pfb>
Output written on main.pdf (2 pages, 23675 bytes).
SyncTeX written on main.synctex.gz.
Transcript written on main.log.

TeX Output exited as expected with code 1 at Tue Jun  9 13:30:57
Running `Preview-PDF2DSC' with ``pdf2dsc main.pdf main.prv/tmp4678jI2/preview.dsc''

Preview-PDF2DSC finished at Tue Jun  9 13:30:57
Running `Preview-Ghostscript' with ``/usr/local/texlive/2014/bin/x86_64-linux/rungs -dOutputFile\=\(main.prv/tmp4678jI2/pr1-\%d.png\) -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r96.0757x96.0504''
Ghostscript filter: No bounding box

Preview-Ghostscript finished at Tue Jun  9 13:30:57
--8<---------------cut here---------------end--------------->8---

And sometimes this one:

--8<---------------cut here---------------start------------->8---
Running `Preview-LaTeX' on `main' with ``pdflatex  -file-line-error  --synctex=1 "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" "\input" main.tex''
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 9 languages loaded.

No auxiliary output files.

(./main.tex (./sigplanconf.cls
Document Class: sigplanconf 2013/07/02 v2.8 ACM SIGPLAN Proceedings
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))) (./main.aux)
(/usr/local/texlive/2014/texmf-dist/tex/latex/psnfss/ot1ptm.fd)
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/preview.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prtightpage.def)
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prauctex.def
No auxiliary output files.

(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prauctex.cfg))
(/usr/local/texlive/2014/texmf-dist/tex/latex/preview/prfootnotes.def)
Preview: Fontsize 9pt
Preview: PDFoutput 1
) (./formalism.tex (./formalism_atranslation.tex
./formalism_atranslation.tex:1: Preview: Snippet 1 started.
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\@firstofone #1->
                 #1
\@startsection ... {!!!!!!*[[!}{##1\pr@endbox }}{}
                                                  \pr@\@startsection 
\section ->\@startsection 
                          {section}{1}{0pt}{-\@sectionaboveskip }{\@sectionb...
l.1 \section
            {A-Normal Form}
Preview: Tightpage -32891 -32891 32891 32891
./formalism_atranslation.tex:1: Preview: Snippet 1 ended.(496694+13332x15728640
).
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\pr@endbox ...lineskip \box \pr@box }\pr@ship@end 
                                                  {\let \protect \noexpand \...
l.1 \section{A-Normal Form}
                           
[1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]))
./main.tex:5: Preview: Snippet 2 started.
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\@firstofone #1->
                 #1
\(->\pr@protect@ship {\pr@endaftergroup }{}
                                           \pr@\( 
l.5 \(
      a + b = c\)
./main.tex:5: Preview: Snippet 2 ended.(409600+54612x2392548).
<-><->
      
\pr@msg ...rrhelp {Not a real error.}\errmessage <
                                                  }
\pr@endbox ...lineskip \box \pr@box }\pr@ship@end 
                                                  {\let \protect \noexpand \...

\)->\relax \ifmmode \ifinner $
                              \else \@badmath \fi \else \@badmath \fi 
l.5 \(a + b = c\)
                 
[2] )
(see the transcript file for additional information){/usr/local/texlive/2014/te
xmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/texlive/2014/texmf-dist/fonts/
type1/public/amsfonts/cm/cmmi9.pfb></usr/local/texlive/2014/texmf-dist/fonts/ty
pe1/public/amsfonts/cm/cmr9.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1
/urw/times/utmb8a.pfb>
Output written on main.pdf (2 pages, 23675 bytes).
SyncTeX written on main.synctex.gz.
Transcript written on main.log.

TeX Output exited as expected with code 1 at Tue Jun  9 13:49:15
Running `Preview-PDF2DSC' with ``pdf2dsc main.pdf main.prv/tmp4678JCS/preview.dsc''
Error: /undefinedfilename in --file--
Operand stack:
   PDFfile   (main.pdf)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1967   1   3   %oparray_pop   1966   1   3   %oparray_pop   1950   1   3   %oparray_pop   1836   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1192/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 1822
GPL Ghostscript 9.16: Unrecoverable error, exit code 1

Preview-PDF2DSC exited abnormally with code 1 at Tue Jun  9 13:49:15
PDF2DSC sentinel: Opening input file: No such file or directory, /home/horn/tmp/spc/main.prv/tmp4678JCS/preview.dsc
--8<---------------cut here---------------end--------------->8---

This latter error is actually only caused by the file main.pdf not being
there which is pretty strange given that the Preview-LaTeX command's
output ended in

  Output written on main.pdf (2 pages, 23675 bytes).
  SyncTeX written on main.synctex.gz.
  Transcript written on main.log.

> I tried to replicate this with other filenames, but have not had
> success using "foo.tex" and "bar.tex", so I decided to send the actual
> filenames.

Indeed, the file names and includes are not relevant.  At least it works
fine when switching the document class from sigplanconf to article.

Unfortunately, I don't understand tex well enough to figure out what's
the problem here...

Bye,
Tassilo