[comp.sources.games.bugs] problem running dungeon

interran@lurch.Stanford.EDU (John Interrante) (06/03/90)

I fetched the f77 sources for dungeon from gatekeeper.dec.com and
applied patches 1 through 3.1.  I used Makefile.bsd to compile the
sources on a DECstation 3100 running Ultrix 3.1.  I got two warning
messages, one of which mentioned itime and might or might not be
significant.  When I installed the data files and ran the game, I got
the following error message:

lurch/interran 8 % /usr/games/dungeon
Welcome to Dungeon.                     This version created 17-SEP-87.
eof/uio: Error 0
apparent state: unit 2 named /usr/games/lib/dunlib/dtext.dat
last format:
lately reading direct unformatted external IO

Have you ever seen this error message before?  Do you know what causes
it and what I can do to prevent it from happening?  

-- 
John Interrante		interran@lurch.stanford.edu

diamond@tkou02.enet.dec.com (diamond@tkovoa) (06/04/90)

In article <INTERRAN.90Jun3023920@lurch.Stanford.EDU> interran@lurch.Stanford.EDU (John Interrante) writes:

>lurch/interran 8 % /usr/games/dungeon
>Welcome to Dungeon.                     This version created 17-SEP-87.
>eof/uio: Error 0
>apparent state: unit 2 named /usr/games/lib/dunlib/dtext.dat
>last format:
>lately reading direct unformatted external IO

I saw the same error message on a competitor's machine before I was
hired by DEC.  (If I thought this were DEC's bug, I probably wouldn't
be allowed to comment on it.)

Anyway, I think I remember a combination of three reasons:

1.  The record number is negative (zero might have the same effect).

2.  The company that wrote the Fortran I/O library forgot to check
for this possible error, so they can't figure out what went wrong.
(Thus error 0 and no explanation.)

3.  The dungeon program and data files (particularly dindx.dat in
this case) were originally designed for integer*2 data.  When patched
and/or compiled differently with integer*4 data, the code must be
more careful in operations on the sign bit, or on what used to be
the sign bit, so that other bits will be stripped out as necessary.
Someone forgot a few of these cases.  Sorry, I don't remember how I
fixed it in an older version of dungeon.

-- 
Norman Diamond, Nihon DEC     diamond@tkou02.enet.dec.com
Proposed group comp.networks.load-reduction:  send your "yes" vote to /dev/null.