Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003865Zandronum[All Projects] Bugpublic2020-10-14 00:352022-03-30 13:09
Reporterphineas 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformPC architecture x86-64OSLinux Mint 20 UlyanaOS VersionLinux 5.4.0-47-g
Product Version3.1-beta 
Target VersionFixed in Version 
Summary0003865: game stops responding to keyboard control input
DescriptionI selected 3.1 beta though I've not downloaded such yet. This problem exists in both 3.01 and 3.1alpha. I've uploaded a complete description of this bug on my website including a WAD file I used to test. See:
'http://chapsoftware.com/linuxKeyboard.htm [^]' for better description
and
'http://chapsoftware.com/Files/forwardTest.wad [^]'
for my test wad file.
Steps To ReproduceLoad wad file into game, move forward with up arrow key, turn left or right slightly with left or right arrow key, keep up arrow key down the whole time and watch as you crawl to a stop. Go to end of hall and pick up repeating fire weapons and hold left ctrl key down to fire, see ammo inventory when you stop firing. For me, it's every 14 shots, so stops would be 386, 372, etc.
Additional InformationI may be reached at prfunky-AT-altslashgo.com for questions.
Attached Files? file icon forwardTest.wad [^] (125,541 bytes) 2020-10-14 00:35

- Relationships

-  Notes
User avatar (0021781)
phineas (reporter)
2021-10-07 10:31

This issue seems to be fixed in ZandroDev3.1-200501-1847linux-x86_64.
thank you!
User avatar (0022171)
Zardoz (reporter)
2022-03-28 19:25

It isn't fixed on 3.1 .
Tested on Ubuntu 21.10, using the DEB pagackage from DRDTeams repository.
Looks that it's a bug of SDL 1.2 on Linux :'https://www.bay12games.com/dwarves/mantisbt/view.php?id=7778 [^]'
 
> With the help of an X protocol tracer (http://www.chiark.greenend.org.uk/~sgtatham/xtruss/ [^]), the X Input Method protocol specification (http://www.x.org/releases/X11R7.7/doc/libX11/XIM/xim.html [^]), and several mugs of tea, I think I've found the cause.

When there's an X Input Method server (IMS) present, as there usually is on Ubuntu, Dwarf Fortress (DF) sends all its keyboard events to the IMS using the XIM protocol. In normal operation, when DF receives a KeyPress event from the X server, it passes it to the IMS in an XIM_FORWARD_EVENT message. The IMS (assuming it's not interested in this event) passes it back in another XIM_FORWARD_EVENT message, this time with the "synchronous" flag set. The "synchronous" flag tells DF that it now needs to send an XIM_SYNC_REPLY message, which it duly does.

When things go wrong, DF sends the XIM_FORWARD_EVENT message as usual, but fails to read the reply message and hence never sends the XIM_SYNC_REPLY message. Instead, it just carries on sending XIM_FORWARD_EVENT messages. It looks like the IMS refuses to deal with these, presumably because it's still waiting for XIM_SYNC_REPLY. This means that the keypresses never get forwarded back to DF, and it sits there unresponsive.

I've found that I can reproduce the bug simply by pressing F11 a few times in rapid succession (about five times in a second is usually enough).

I doubt that DF deliberately interfaces with input methods itself, so presumably this bug is somewhere in the depths of SDL or whatever library is implementing the XIM protocol.

For the record, on my Ubuntu 14.04 LTS system, the version of the SDL packages is "1.2.15-8ubuntu1.1".

With GZDoom looks that this not happens, as uses SDL 2 (and have better support of multiscreen setups as side effect).
As workaround, looks that killing the XIM related daemon should stop the problem (I couldn't totaly verified this, as tthis bug it's pretty random, and sometime only strikes when I'm playing a few hours. )
User avatar (0022175)
Zardoz (reporter)
2022-03-30 13:09

I confirm (95% sure of) that closing/killing the "X Input Method" program avoid this problem. And that it's the same bug SDL 1.2 reported on the dwarf fortres forums

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: Zardoz
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2020-10-14 00:35 phineas New Issue
2020-10-14 00:35 phineas File Added: forwardTest.wad
2021-10-07 10:31 phineas Note Added: 0021781
2022-03-28 19:25 Zardoz Note Added: 0022171
2022-03-30 13:09 Zardoz Note Added: 0022175






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker