Bug 1458520 - nethack: sudden exit with X Error
Summary: nethack: sudden exit with X Error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nethack
Version: 25
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-03 21:36 UTC by Jerry James
Modified: 2017-07-07 23:00 UTC (History)
5 users (show)

Fixed In Version: nethack-3.6.0-38.fc25 nethack-3.6.0-38.fc24 nethack-3.6.0-38.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 02:22:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2017-06-03 21:36:01 UTC
Description of problem:
I tried out the new version of nethack.  On the 1st level, my character was killed by a newt.  Sad, isn't it?  Instead of showing me the usual end of game information, though, the window closed abruptly and left this on the terminal:

Failed to load pilemark.xbm
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  63 (X_CopyPlane)
  Resource id in failed request:  0x0
  Serial number of failed request:  12308
  Current serial number in output stream:  12378

I'm pretty sure I saw the pilemark.xbm complaint there prior to the end of the game, so that is probably not related.  I am using an X session, not a Wayland session.

Version-Release number of selected component (if applicable):
nethack-3.6.0-36.fc25.x86_64

How reproducible:
I don't know yet.  Will try again.

Steps to Reproduce:
1. Play the game in an X session.
2. Get killed.  That's probably the easiest step.
3. See the window close abruptly.

Actual results:
The window closed suddenly, skipping the usual end of game information.

Expected results:
No X errors, and end of game information shown.

Additional info:

Comment 1 Jerry James 2017-06-03 21:40:34 UTC
First, I got the pilemark.xbm message on startup, so while that should probably be fixed, it is not related.

Second, I tried playing again.  I had just killed kobold, and stepped onto the pile of darts it left behind when this happened again, so me getting killed has nothing to do with it.  Once again, it is a BadDrawable error.

Comment 2 Ron Olson 2017-06-04 00:06:12 UTC
I tried reproducing this in an xterm and running Gnome in X (not Wayland) on F25 but can't reproduce *anything* in this bug report; no errors on startup, no crashing on getting killed (had to get to level 2 without my kitten as it was killing everything around me as I just stood there). 

Any chance to get some more info on your setup?

Comment 3 Jerry James 2017-06-04 03:55:59 UTC
You know, it would have been really helpful if I had mentioned that I have this in my ~/.nethackrc:

OPTIONS=menustyle:partial,time,showexp,showscore,!silent
OPTIONS=number_pad,hilite_pet,toptenwin,msghistory:250,windowtype:X11

Sorry about that.  Probably the windowtype:X11 is the only important part as far as this bug is concerned.

And, by the way, /usr/games/nethack-3.6.0/recover is missing executable bits, and doesn't work even after adding executable bits:

# /usr/games/nethack-3.6.0/recover alock
Cannot open level 0 for alock.

That appears to be the same bug I filed years ago, which was eventually closed without being fixed: recover is looking in the wrong directory.  Running under strace shows:

chdir("/usr/games/nethack-3.6.0")       = 0
open("alock.0", O_RDONLY)               = -1 ENOENT (No such file or directory)
write(2, "Cannot open level 0 for alock.\n", 31Cannot open level 0 for alock.
) = 31
exit_group(0)                           = ?

The alock files are in /var/games/nethack.  And after moving the alock files to /var/games/nethack, recover STILL doesn't work:

# /usr/games/nethack-3.6.0/recover alock
Cannot create savefile save/1000jamesjer.

... because it is trying to write to /usr/games/nethack-3.6.0/save/1000jamesjer, but the save directory is in /var/games/nethack.

Comment 4 Jerry James 2017-06-04 04:01:55 UTC
(In reply to Jerry James from comment #3)
> ... because it is trying to write to
> /usr/games/nethack-3.6.0/save/1000jamesjer, but the save directory is in
> /var/games/nethack.

And even after making a symlink to work around this problem, things STILL don't work correctly because recover creates 1000jamesjer, but the nethack game looks for 1000jamesjer.gz and, not finding it, offers to start the game from scratch again.

Comment 5 Ron Olson 2017-06-04 22:04:56 UTC
"And, by the way, /usr/games/nethack-3.6.0/recover is missing executable bits, and doesn't work even after adding executable bits:"

Please submit a separate bug report for this for tracking purposes.

I get the same error about 'Failed to load pilemark.xbm', but not the crashing. This is supposedly fixed in 3.6.1 so I'll compile that and see if that's still an issue, along with your crashing problem.

Comment 6 Ron Olson 2017-06-16 03:27:28 UTC
(In reply to Jerry James from comment #4)
> (In reply to Jerry James from comment #3)
> > ... because it is trying to write to
> > /usr/games/nethack-3.6.0/save/1000jamesjer, but the save directory is in
> > /var/games/nethack.
> 
> And even after making a symlink to work around this problem, things STILL
> don't work correctly because recover creates 1000jamesjer, but the nethack
> game looks for 1000jamesjer.gz and, not finding it, offers to start the game
> from scratch again.

I submitted an update to fix this particular issue (recover program does not have executable bits set). This will be in nethack-3.6.0-37; please submit a ticket for it so it can be tracked.

In regards to the original bug 
My patches break on 3.6.1 so there's some work to be done to get it to build and package properly so I can test that the pilemark/X crashing error.

Comment 7 Kevin J. Cummings 2017-06-25 04:06:54 UTC
I too am getting sudden errors, but I get mine while playing.  I'm not sure what the problem is (how to reliably recreate), but I find that by just playing the game, before I die, the window suddenly disappears.

When I run the game from an xterm, I, too, see the pilemark.xbm error.  Upon further investigation, I find that there is no pilemark.xbm file in the RPM.
So, I downloaded the source tarball, and copied the pilemake.xbm file from
nethack-3.6.0/win/X11 to /usr/games/nethack-3.6.0

Now, I can play the game to completion.  Looks like this file needs to be included in the RPM.  Note that this file was not present in nethack 3.4.3.

Comment 8 Ron Olson 2017-06-26 00:41:35 UTC
Yes, I found it as well. I'll update the rpm to include it; sorry about that.

Comment 9 Fedora Update System 2017-06-27 02:37:32 UTC
nethack-3.6.0-38.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-48c0c655e6

Comment 10 Fedora Update System 2017-06-27 17:21:02 UTC
nethack-3.6.0-38.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-48c0c655e6

Comment 11 Fedora Update System 2017-06-27 17:26:12 UTC
nethack-3.6.0-38.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c5e887fc01

Comment 12 Fedora Update System 2017-06-27 20:25:55 UTC
nethack-3.6.0-38.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-74d4aa87df

Comment 13 Fedora Update System 2017-07-06 02:22:32 UTC
nethack-3.6.0-38.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-07-06 08:52:37 UTC
nethack-3.6.0-38.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-07-07 23:00:21 UTC
nethack-3.6.0-38.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.