Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

W340-14 fix

0 views
Skip to first unread message

Moose

unread,
Jan 2, 2003, 5:26:19 PM1/2/03
to
As requested, here is a simple fix for the dreaded W340-14 bug. This is a
game destroying bug in the MS windows version of nethack. It occurs after
too many popup windows are displayed. You can such a window if you do
a #?. After about 10 or so, the game will crash with no recovery possible.
The nasty thing about this bug is that these windows also appear to show
you messages from the quest. Most often found in the wizard quest (I guess
it pops up more text than other classes) it has destroyed many a promising
character. People find that right about they time they go to pick up a
little silver bell the game will die.

Anyway here's what needs to be changed. In <blah>\win\win32\winMS.h there
is a definition of the number of windows it can use:

#define MAXWINDOWS 15

Simply change this to something bigger, e.g.

#define MAXWINDOWS 128

Now the game will crash after 120 or so popup text windows instead of 12.
It's not a particular elegant fix, but it does the job.

If you are not into the whole compile your own thing, there is a work around.
While on a quest you should save and quit periodically. This should reset
the number of windows nethack has used. Basically don't try and do the
quest all in one session.

Alex Kompel

unread,
Jan 2, 2003, 7:55:57 PM1/2/03
to

"Moose" <goo...@wuffles.net> wrote in message
news:ac4da664.03010...@posting.google.com...

> As requested, here is a simple fix for the dreaded W340-14 bug. This is a
> game destroying bug in the MS windows version of nethack. It occurs after
> too many popup windows are displayed. You can such a window if you do
> a #?. After about 10 or so, the game will crash with no recovery
possible.
> The nasty thing about this bug is that these windows also appear to show
> you messages from the quest. Most often found in the wizard quest (I
guess
> it pops up more text than other classes) it has destroyed many a promising
> character. People find that right about they time they go to pick up a
> little silver bell the game will die.

<snip>

This is how to fix it "for good":
remove the following condition at win/win32/mswproc.c:867
( in mswin_destroy_nhwindow(...) ):

if (GetNHApp()->windowlist[wid].type == NHW_TEXT) {
/* this type takes care of themself */
return;
}

Alex Kompel

unread,
Jan 3, 2003, 4:40:29 PM1/3/03
to

"Jukka Lahtinen" <juk...@despammed.com> wrote in message
news:yrj4r8q...@despammed.com...

> "Alex Kompel" <...shurikk@pacbell.net...> writes:
>
> > This is how to fix it "for good":
> > remove the following condition at win/win32/mswproc.c:867
> > ( in mswin_destroy_nhwindow(...) ):
> >
> > if (GetNHApp()->windowlist[wid].type == NHW_TEXT) {
> > /* this type takes care of themself */
> > return;
> > }
>
> Err.. do you mean removing the whole conditionalized return statement or
> just removing the condition before it? (I suppose the first..)

The whole statement.

***************
*** 864,874 ****
return;
}

- if (GetNHApp()->windowlist[wid].type == NHW_TEXT) {
- /* this type takes care of themself */
- return;
- }
-
if (wid != -1) {
if( !GetNHApp()->windowlist[wid].dead &&
GetNHApp()->windowlist[wid].win != NULL )
--- 864,869 ----


0 new messages