[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#107637: xdvi sometimes crashes if the DVI is changed



Florian Weimer <rusfw@cert.uni-stuttgart.de> writes:

> xdvi sometimes crashes while it is rereading a DVI file after it has
> been changed by TeX.

> The behavior was worse with previous versions, but some kind of race
> condition still seems to exist, but it is really hard to reproduce.

I take it that `crashes' means that xdvi exits with an error
message such as `unknown op-code x, offset y'. (If it instead
segfaults, please email again).

I think the source of this race condition is:

- TeX always overwrites the original .dvi file (it doesn't create
  a copy and moves it to the final destination)

- In the low-level routines of scanning the .dvi file, xdvi cannot
  check each time whether the file has changed; this would make
  drawing much too expensive.

To alleviate this problem (and the related problem of erasing the
file view if xdvi detects that the file has changed), xdvi
22.76.1 now uses a temporary backup copy of the .dvi file which
is uses as long as the .dvi file hasn't been written completely
by TeX (this can be switched off by using the option
`-notempfile).

This is a rather large change which cannot be backported to 22.4x,
so I'd suggest to close this bug as `wontfix'.

Best,
Stefan



Reply to: