Files
nethack/doc
nethack.allison 2b8903cd7a <Someone> wrote:
> NetHack feedback form submitted by
> <email deleted> on Friday, June 30, 2006 at 17:31:12
> ---------------------------------------------------------------------------
>
> mailversion:1.35
>
> nhversion:3.4.3
>
> nhfrom:Our 3.4.3 source release, unmodified

> comments:
> telnet nethack.alt.org with the terminal set to 21 rows.
> Choose to pick a char, not accept pot luck, and game segfaults.
> (same happens from linux console)

I was able to reproduce something similar in win32 by setting
the console to 21 rows. As he stated, don't let the game pick you
character for you to reproduce the problem. As soon as I chose
Archeologist the problem occurred:

Where:
  In hack.c, weight_cap()
  	if (Levitation || Is_airlevel(&u.uz)    /* <email deleted> */
  #ifdef STEED
			|| (u.usteed && strongmonst(u.usteed->data))
  #endif
	)

Variables:
	carrcap	200
	u.usteed	0x00000000
	&u.uz	0x005e54aa
	youmonst.data	0x00000000

Examination of the preprocessor output of that section
of code reveals that
"Levitation" becomes:
    (u.uprops[47].intrinsic || u.uprops[47].extrinsic ||
	((youmonst.data)->mlet == 5))
so it is the is_floater(youmonst.data) causing the crash.

Call stack:
  weight_cap() line 2300 + 24 bytes
  inv_weight() line 2342 + 5 bytes
  calc_capacity(int 0) line 2354 + 5 bytes
  near_capacity() line 2365 + 7 bytes
  bot() line 607 + 5 bytes
  docorner(int 47, int 19) line 2378
  erase_menu_or_text(int 5, WinDesc * 0x00a22550, char 0) line 994 + 25     bytes
  tty_dismiss_nhwindow(int 5) line 1664 + 15 bytes
  tty_select_menu(int 5, int 1, mi * * 0x0006fc40) line 2248 + 9 bytes
  tty_player_selection() line 442 + 16 bytes
  pcmain(int 3, char * * 0x00a20eb0) line 457
  main(int 3, char * * 0x00a20eb0) line 91 + 13 bytes

This adds a check for a valid youmonst.data in
bot().
2006-07-01 18:44:18 +00:00
..
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-11 18:02:22 +00:00
2003-05-11 15:09:24 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2003-05-11 13:40:01 +00:00
2003-08-26 15:11:58 +00:00
2006-07-01 18:44:18 +00:00
2003-11-16 04:20:29 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2004-03-27 05:07:17 +00:00
2004-03-27 05:07:17 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2005-01-13 00:34:35 +00:00