[net.games.rogue] save game bug

dae@psuvax1.UUCP (David Eckhardt) (08/12/84)

<one for the line-eater>

(1) AAAAAAAARRRRRRRRRRRRGGGGGGGGGGGGHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!

(2) AAAAAAAARRRRRRRRRRRRGGGGGGGGGGGGHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!

(3) Just before the game decided to go out to lunch, I happened to
    find a trap.  Naturally enough, I identified it.  It was a
    "PPZZPSPW=PDPDSS=" trap, one which did absolutely no damage.
    Shortly thereafter, the game left town.

(4) Why don't some nice people somewhere who have the sources
    (hint to authors) *fix* this bug?

Just a possible clue...
-- 

--Daemon dae@{psuvax1.{bitnet, uucp}, penn-state.csnet}

"I will have no covenants but proximities" -- R. W. Emerson

ron@wjvax.UUCP (Ron Christian) (09/18/84)

Here's another clue on the mechanism that produces
what we call the save game bug.  A friend says he
suspects it's a malloc problem, and I think I now
agree.  In my last game, I got the save game bug
when I started to enter a room.  If I went down
the hall in the opposite direction, everything was
fine, but if I tried to enter the room in the upper
right hand corner, the game saved itself.  This happened
as soon as I tried to move over the +, and when I
reentered the game, my @ appeared in the hall as
if I hadn't made that move.  This room had to be
REALLY small, as the hallway came up real close to
the right hand edge, and the + was practically in
the corner of the screen.  Is it possible that rogue
blunders occasionally when it tries to create a
room, generating an error? I guess the game traps all
error signals and tries to save itself, so a 'segmentation
fault' or some such thing would cause the game to
save itself.  This was on level 27 in 5.3 rogue.

Or, since this bug only happens on the best games at the
highest levels, could rogue simply not be allocating
enough memory for data storage?  Along about level 27
we run out of allocated memory, the shell complains,
and boom! the game saves itself.  Comments?

Another interesting thing, since the game would not
be posted after I got out of there, I restarted it 
with a |tee to a file name so I'd have a record of
the score.  This is after escaping the level of the
non-room.  With a |tee, I couldn't use the <control>Y
move in rogue, as it caused the game to be put in the
background.  Facinating.
-- 

	"Trivia is important."		Ron Christian
	    (syntax bug)		Watkins-Johnson Co.
					San Jose, Calif.
					(...ios!wjvax!ron)

robison@eosp1.UUCP (Tobias D. Robison) (09/21/84)

References:

In rogue 5.2 I also had the experience of the game saving itself when
I stepped on a "+" sign.  The problem was 100% repeatable; I was trying
to move OUT of a room.  After the game saved itself several times, I
exited thru another door and everything was fine.

	- Toby Robison (not Robinson!)
	allegra!eosp1!robison
	or: decvax!ittvax!eosp1!robison
	or (emergency): princeton!eosp1!robison

laman@sdcsvax.UUCP (Mike Laman) (09/24/84)

Organization:
Keywords: 

In article <1135@eosp1.UUCP> robison@eosp1.UUCP (Tobias D. Robison) writes:
>
>In rogue 5.2 I also had the experience of the game saving itself when
>I stepped on a "+" sign.  The problem was 100% repeatable; I was trying
>to move OUT of a room.  After the game saved itself several times, I
>exited thru another door and everything was fine.
>
>	- Toby Robison (not Robinson!)
>	allegra!eosp1!robison
>	or: decvax!ittvax!eosp1!robison
>	or (emergency): princeton!eosp1!robison

Well, I have a fix for 5.3 (Sorry.  Maybe 5.2 is similar).
Starting at "leave_room+fb" (hex offset obviously) you will see:

		calls	$1,_wstandend
		incl	r7
		brw	leave_room+6d
		extzv	$0,$7,-2(fp),r0
		bbc	$0,__ctype_+1[r0],SomeAddressFartherDown
		bbs	$14,_Player+24,leave_room+d7
		cmpb	(r10),$43

	Opps!  If you look all through this routine you'll see that "r10" is
NOT INITIALIZED!  I leave this as an exercise to someone to find a way to
squeeze in the following change :-).  Oh, this routine seems to be optimized
code, so it'll be a little tougher to find the room in the function.

In case you're curious, this uninitialized pointer gets referenced when
you leave a room with a monster showing on your screen when you do NOT have
the ability to detect monsters.  If you think about that, you will see that
this isn't all that common.  Who can resist not hacking a monster to bits :-)?
This situation occurs more often in the deeper levels doesn't it! "Ah!" you say.

Change the "cmpb	(r10),$43" to:

		ashl	$5,r7,r1
		addl2	r8,r1
		ashl	$3,r1,r1
		cmpb	(r1),$43

Feel free to optimize this.  Sorry, but I don't have the source.  Now if
someone can come up with the patch.  Sorry, but I don't have that either.
Please post the patch, so we can be spared this bug.

		Mike Laman
		UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman

laman@sdcsvax.UUCP (Mike Laman) (09/25/84)

Organization:
Keywords: 

In article <86@sdcsvax.UUCP> laman@sdcsvax.UUCP (Mike Laman) writes (Yea,
that's me!  Ohhhh.  How embariskin.):
>	:
>	:
>	:
>
>Change the "cmpb	(r10),$43" to:
>
>		ashl	$5,r7,r1
>		addl2	r8,r1
>		ashl	$3,r1,r1
>		cmpb	(r1),$43

Opps that should be:
		ashl	$5,r7,r1
		addl2	r8,r1
		ashl	$3,r1,r1
		cmpb	Places(r1),$43	<=====  Here is the change to my change

I'm sorry!

		Mike Laman
		UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman

steiner@bgsuvax.UUCP (Ray Steiner) (09/26/84)

I have found a bug in Rogue, version 5.3,related to the save game bug.
Often it is impossible to restart a saved game. The game position
is reproduced on the screen OK, but it is impossible to make a move.
For example, if one tries to move in the "h" direction a bunch of h's
appears on the screen and then the program interrupts itself. Would
anyone know what causes this bug and how to get around it?
--
Ray Steiner
Bowling Green State University

steiner@bgsuvax.UUCP (Ray Steiner) (10/02/84)

I too have been bit by the save game bug.  It was on level 13 of Version
5.3 rogue.  I was under a potion of hallucination at the time.  I had
just dropped a suit of armour because my pack was too full in order to
pick up a scroll.  As soon as I picked up the scroll, BOOM! the game
saved itself.  Worse yet, I could not restart it, due to the other
bug mentioned in my previous article.  I hope this is of some help
to those of you trying to fix this bug.
     By the way, a group of avid Rogue fans here would like to know
if any of you have ever found the Amulet of Yendor, and, if so, on
what level this occurred.
ZZ
 

guest@duke.UUCP (John Q. Public) (10/05/84)

The amulet in v5.3 is on level 26.