active dvi freezes when viewing a dvi file with embedded eps image

Bug #156642 reported by Pascal Grossé
8
Affects Status Importance Assigned to Milestone
advi (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I'm currently using Kubuntu 7.10, up to date as of this day (24 october).

Contrary to what is stated in bug #43947, active dvi still freezes when viewing a file with encapsulated postscript (maybe the bug was trully fixed in feisty, because advi worked perfectly for me before upgrading to gutsy).

The file is viewable with xdvi and kdvi without problems.

Still existing in Ubuntu 8.10 64bit. (27th March 2009).

Tags: testcase
Revision history for this message
Pascal Grossé (pascal-grosse) wrote :
Revision history for this message
Pascal Grossé (pascal-grosse) wrote :
Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

I confirm. I have the same problem, and this make advi completely unusable for me. All my talks have eps in them.

I have a fresh Kubuntu 7.10 install and I cannot run my talks. Last week I had to borrow and old laptop to give my presentation. (a debian/unstable box where the gs-esp version was frozen to 7.something probably for a similar reason)

If someone has a workaround I'd be more than happy.

Revision history for this message
vpadawan (vpadawan) wrote :

I had exactly the same problem using advi with whizzytex. It seems to come from a faulty call to gs: when advi freezes, the gs entry in the process list looks like this :

... /usr/bin/gs -dNOPLATFONTS -dNOPAUSE -sDEVICE=x11 -q -dDELAYSAFER -

As you can see, there's an extra minus sign at the end of the command, probably coming from an incorrectly erased option in the source code. I didn't want to debug or recompile advi, so I used this dirty little trick instead :
- install an hex editor such as ghex
- just in case, make a copy of /usr/bin/advi
- edit the binary file advi.
- look for an occurrence of DELAYSAFER, followed by an occurrence of a minus sign.
In advi 1.6.0-12 (ubuntu 7.10), I found this occurrence near 0x001610b7 :

001610b7 : .-dNOPLATFONTS...
001610c8 : ....-dNOPAUSE....
001610d9 : ...-q......-dDELA
001610ea : YSAFER........-..

The minus sign is at 0x1610f8, with an hex value of 0x2d. I replaced this value with 0x20 (space).

Revision history for this message
Pascal Grossé (pascal-grosse) wrote : Re: [Bug 156642] Re: active dvi freezes when viewing a dvi file with embedded eps image

I tried your workaround, and it worked perfectly. Thank you !

Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

Thanks a lot for this fix ! It should be easy to fix it in the sources, too.

However there are still some problems. It seems that postscript specials are
not executed. I keep having error messages like this one:

Warning: Sys_error("Bad file descriptor")
Warning: GS Terminated

and the postscript decoration of my background is not displayed at all.

Le Wednesday 14 November 2007 13:36:17 vpadawan, vous avez écrit :
> I had exactly the same problem using advi with whizzytex. It seems to
> come from a faulty call to gs: when advi freezes, the gs entry in the
> process list looks like this :
>
> ... /usr/bin/gs -dNOPLATFONTS -dNOPAUSE -sDEVICE=x11 -q -dDELAYSAFER -
>
> As you can see, there's an extra minus sign at the end of the command,
> probably coming from an incorrectly erased option in the source code. I
> didn't want to debug or recompile advi, so I used this dirty little trick
> instead : - install an hex editor such as ghex
> - just in case, make a copy of /usr/bin/advi
> - edit the binary file advi.
> - look for an occurrence of DELAYSAFER, followed by an occurrence of a
> minus sign. In advi 1.6.0-12 (ubuntu 7.10), I found this occurrence near
> 0x001610b7 :
>
> 001610b7 : .-dNOPLATFONTS...
> 001610c8 : ....-dNOPAUSE....
> 001610d9 : ...-q......-dDELA
> 001610ea : YSAFER........-..
>
> The minus sign is at 0x1610f8, with an hex value of 0x2d. I replaced
> this value with 0x20 (space).

Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

I think I found a good workaround.

don't use the "fix" kindly proposed by vpadawan. Instead, in the latex file, insert the line

\usepackage{hyperref}

BEFORE the line

\usepackage{advi} (or {advi-annot})

Report if it works for you

Revision history for this message
Pascal Grossé (pascal-grosse) wrote :

I tested the 2 usepackage lines on my other computer (with non-tweaked advi
bin), and it indeed works. But I think there still is a problem with advi.
Usually I don't use the advi and hyperref packages, and I think they are not
required for using advi.

Anyway, thanks for your workaround, I can add those 2 packages without harm
in my files.

Pascal

2007/12/9, Vu Ngoc San <email address hidden>:
>
> I think I found a good workaround.
>
> don't use the "fix" kindly proposed by vpadawan. Instead, in the latex
> file, insert the line
>
> \usepackage{hyperref}
>
> BEFORE the line
>
> \usepackage{advi} (or {advi-annot})
>
> Report if it works for you
>
> --
> active dvi freezes when viewing a dvi file with embedded eps image
> https://bugs.launchpad.net/bugs/156642
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
nadi (barc) wrote :

thanks a lot vpadawan! the workaround with chaning the advi works perfectly. Can someone change the source files, so it will be stable in ubuntu?

Nadi

Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

nadi: again, I don't think it's a good idea. This "fix" breaks many other things for me. Indeed, eps files are correctly included, but many "postscript specials" don't work anymore with this. For instance, postscript arrows, gradient background, psboxes...

San

Revision history for this message
cwitte (cwitte) wrote :

I am also having this problem after an update from 7.10 to 8.04.
The usepackage fix doesn't appear to work.
I haven't modifying the executeable.

Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

strange, it works for me under 8.04.
cwitte: Can you post a minimal file that fails ?

Revision history for this message
cwitte (cwitte) wrote :

I have attached a minimal file that fails.
When it freezes the following process is running, notice the trailing dash as before
/usr/bin/gs -dNOPLATFONTS -dNOPAUSE -sDEVICE=x11 -q -dDELAYSAFER -

Revision history for this message
Vu Ngoc San (san-vu-ngoc) wrote :

but you haven't put the "hyperref" line !

If I just add
\usepackage{hyperref}
then it works:

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\begin{figure}
  \centering
  \includegraphics*{drawing}
\end{figure}
\end{document}

Revision history for this message
cwitte (cwitte) wrote :

That makes it work when I run it from the command line, for some reason though it still fails when I use it through whizzytex in emacs. Also while this is an immediate work around it isn't a long term solution. Using the hyperref package all the time is not good, it makes printed documents look less than perfect.

Daniel T Chen (crimsun)
Changed in advi:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Ulli (ulrich-leopold) wrote :

Are you going to fix this still existing bug in Ubuntu 8.10 64bit? It still occurs and gs gives still the - at the end of the command line. Would be helpful as without this bug fixed. whizzytex and advi get useless though they are very useful for productive writing.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.