Paul A. Rubin <[EMAIL PROTECTED]> writes:

> 
> Hi all,
> 
> Over on the user list, in the thread starting with 
> <news://news.gmane.org:119/[EMAIL PROTECTED]>,
> Giovanni 
> Ciampaglia reported a problem (LyX 1.4.2, WinXP) with View->DVI hanging. 
>   After some debugging (some of it out-of-band), it appears that pplatex 
> is producing a valid DVI, but then the post-processing portion is 
> failing.  The error message is
> 
> pplatex: Process input file tesi.dvi
> pplatex: tesi.dvi: Permission denied
> Error: Non riesco a convertire il file
> 
> which I think suggests that the dvipost portion of the effort is failing 
> to overwrite the DVI file.  The bug is somewhat intermittent, but he 
> reports consistent success if he changes the LaTeX->DraftDVI converter 
> back to plain latex.
> 
> I hesitated to put this in bugzilla, because it sounds more like a 
> problem with pplatex than with any LyX code, but I thought I'd pass it 
> along.

I started seeing this, too, after an upgrade to MikTeX 2.5. This occurs
only when updating a .dvi file while it is being previewed in yap.
If yap is closed when the .dvi is updated, the error disappears.

Sometimes it is pplatex failing and sometimes LyX itself after trying
to rename the file produced by the clean_dvi.py script. Indeed, in this
last case the file "tmpfile.out" is actually produced in the tmpdir,
meaning that clean_dvi.py succeeded, so it is LyX that fails trying
to rename the file and giving that bogus message about the error occurred
whilst running clean_dvi.py.

My analysis is that yap is monitoring the .dvi file to see if it has
changed and in so doing it momentarily locks the file. So, when pplatex
or LyX try to overwrite the file, they fail. This is a classical race
condition and indeed sometimes the error may not occur.

I never had this problem with MikTeX 2.4, so something has changed in the
way the yap distributed with MikTeX 2.5 works. Maybe in 2.4 yap only
checks the .dvi file when its window has the focus whereas in 2.5 it tries
to check the file even when its window is not the active one.
Whatever the cause, it is becoming really annoying.

-- 
Enrico

Reply via email to