[comp.sources.games.bugs] A very painful bug in nethack

jhh@pupthy.PRINCETON.EDU (Jim Horne) (08/02/89)

My 19th level Valkyrie, with blessed +5 long sword named Excalibur,
permanent invisibility, -14 armor class, and so forth just went to the
core dump graveyard in the sky when she tried to go from level 26 to
level 27.

I was running nethack, v3.0, with no modifications from what was posted
other than setting the proper items in config.h and unixconf.h.  This
computer is a ridge 3200, running ROS 3.5.

The error message I got was

received signal SIGSEGV (illegal memory reference)
illegal memory reference at address 736100D8
in the data seqment - hard memory limit exceeded

I vaguely remember getting this error message before when pointers got
screwed up. My guess is that nethack was trying to create some special
level, and screwed up someplace. Anyone have any clue as to what
happened?  How can I keep from dying any time I get too good?


------------------------------------------------------------------------
Jim Horne                              A quote? I'm supposed to have a quote?
jhh@pupthy.Princeton.EDU
                                       

arrom@aplcen.apl.jhu.edu (Ken Arromdee) (08/02/89)

>My 19th level Valkyrie, with blessed +5 long sword named Excalibur,
>permanent invisibility, -14 armor class, and so forth just went to the
>core dump graveyard in the sky when she tried to go from level 26 to
>level 27.

A known problem, which is fixed in the upcoming diffs.  The medusa was given
a name ("Medusa") but no space was allocated for this name; thus, memory
got overwritten.
--
"The fact is self evident from the text and requires no supporting argument."
  --Tim Maroney

Kenneth Arromdee (UUCP: ....!jhunix!ins_akaa; BITNET: g49i0188@jhuvm;
     INTERNET: arromdee@crabcake.cs.jhu.edu) (please, no mail to arrom@aplcen)

linhart@topaz.rutgers.edu (Mike Threepoint) (08/03/89)

You probably entered the Medusa level.  I'd added a routine to pull
names and classes from the top ten and create corresponding statues on
the Medusa level, for atmosphere.  (So much for the surprise.)

Anyway, if there were less than 10 entries in the high score list (and
you got down to level 26 without filling that far?  incredible), it
returned a NULL pointer, which the make-statue code didn't check for.
The code treated it as a real object, and started filling other object
fields, which caused NetHack to bomb.  This has been fixed in the
first bugfix patch.