Bug 693206 - GPL Ghostscript 9.05: EERROR: A pdfmark destination page 140 points beyond the last page 139.
Summary: GPL Ghostscript 9.05: EERROR: A pdfmark destination page 140 points beyond th...
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 9.05
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-22 20:19 UTC by beldiceanu
Modified: 2012-07-26 17:11 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
a zipped directory containing the files (see Description) (deleted)
2012-07-22 20:19 UTC, beldiceanu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description beldiceanu 2012-07-22 20:19:55 UTC
Dear all,

Here are some information for reproducing/understanding the bug about:
 (1) the system I use,
 (2) the latex distribution I use,
 (3) the error message I get when converting dvi to pdf with Ghostscript 9.05
 (4) the list of packages that I use
 (5) the main latex file is catalog.tex
 (6) an attached zipped file containing all the files to reproduce the bug:
      . the main file is catalog.tex
      . catalog.tex uses preface.tex as well as the tex files that are in
        the ctrs directory.


You may look to the catalog.log file to see the messages that were produced by the Latex compilation.
If you want to compile yourself type the following commands:
 (1) cd catalog  % to go in the catalog directory
 (2) make pdf    % a command in the makefile that calls Latex and dvipdf

Best regards,

Nicolas Beldiceanu
Email: Nicolas.Beldiceanu@gmail.com


p.s.: I could get the catalog converted to use pdflatex,
      but somehow I would much prefer to remain using dvipdf which
      produces smaller size pdf.



SYSTEM USED: Mac OS X version 10.6.8
LATEX USED : pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)

ERROR TRACE (when using Ghostscript 9.05 to generate pdf)
-----------------------------------------------------------------------
dvipdf catalog.dvi catalog.pdf
Error: /stackunderflow in --begin--
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1156/1684(ro)(G)--   --dict:0/20(G)--   --dict:88/200(L)--   --dict:268/300(L)--   --dict:161/200(L)--   --dict:175/300(L)--   --dict:17/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
GPL Ghostscript 9.05: ERROR: A pdfmark destination page 140 points beyond the last page 139.
make[1]: *** [catalog.pdf] Error 1
make: *** [pdf] Error 2
-----------------------------------------------------------------------

The packages that are used are in file catalog.tex and are:
-----------------------------------------------------------------------
\documentclass[dvips]{book}
\usepackage{etex} % Nicolas 06-06-2012: to get around the "No room for a new \dimen ." problem after adding tikz
\usepackage{makeidx}
\usepackage{index} % new Nicolas 29-11-2009: without this, entry of a constraint definition is separated from entries of constraint use
\usepackage[latin1]{inputenc}
\usepackage{latexsym}
\usepackage{epsfig}
\usepackage{times}
\usepackage{fancybox}
\usepackage{minitoc}
\usepackage{boxedminipage}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{moreverb}
\usepackage{ifthen}
\usepackage[hypertexnames=false,plainpages=false,pdfpagelabels,colorlinks,linkcolor=cyan,citecolor=cyan,urlcolor=cyan,bookmarks,hyperindex=false,pagebackref=true]{hyperref} % pagebackref not compatible with \verb in note in bibliography: reference to SICStus and cumulative from Hooker were modified
\usepackage{needspace}
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{pdfcomment}
\usepackage{calc} % Nicolas 25-06-2012: use in macro for enumerate (quiz in alldifferent, ...)
\usepackage{pifont}
\usepackage[tikz]{bclogo}
\usepackage{framed}
\usepackage{picins}
\usepackage{rotating}
\usepackage{tikz} \usetikzlibrary{shapes,arrows,automata,backgrounds,matrix}
Comment 1 Alex Cherepanov 2012-07-22 23:05:36 UTC
By some reason your zip file was not attached. Perhaps, the file was too big.
Please attach a sample PS file, generated by your process.
That's what Ghostscript developers like the best.
It's difficult to reproduce problems starting from application files (even
if your application is free software) because one may need to get the same
version of the software to reproduce the problem.
Comment 2 Ken Sharp 2012-07-25 13:46:50 UTC
I believe that this is already 'fixed' we emit the warning but produce a file anyway. Of course without an example its hard to be certain....

I'm closing this as 'invalid' but if you think its still a problem with the HEAD code, and can supply a file , I'll look again.
Comment 3 beldiceanu 2012-07-26 17:11:08 UTC
In the meantime I think I found the origin of my problem,
namely:
 (1) my makefile compiles latex code to produce some figure
       (see example of small code at the end of this email).
 (2) then in my main latex file I import the produced figure.

Now it turned out that with TexLive2009 everything works fine
but with TexLive2011 and TexLive2012 the figure produced
at step (1) is somehow corrupted, which make Ghostscript
crash as I reported. But it is not the fault of
Ghostscript to crash if the imported file was corrupted
(the only thing is that the error message let me initially
thought that I had an invalid hypperef link (something
pointing to an undefined hyppertarget).

The only thing I don't yet know is why the new TexLive produces
a corrupted graphic file (the makefile uses dvips that call Ghostscript).
But I plan to get around this problem by directly importing the latex code
of the graphic in my main Latex file.

Best regards,

Nicolas Beldiceanu

% File that produces a corrupted graphic file with
% TexLive 2012 (dvips) using the following comand of
% my makefile:
        $(EPS2): ctrs/%.eps:    $(SRCFIGDIR)/tex/%.tex
        latex "$<"; \
        dvips -E "$(*F).dvi" -o "$@"; \
        rm -f $(*F).dvi $(*F).aux $(*F).log
%-----------------------------
-----------------------------------
\documentclass{article}
\usepackage[dvipsnames]{pstricks}
\usepackage{pstricks-add, pst-plot, pst-eps, xyling}
\begin{document}
\TeXtoEPS
{
\Tree{\K{atom}\B{d} \\
      \K{col}\B{d}  \\
      \K{int$^5$}}
}
\endTeXtoEPS
\end{document}