Xwayland crash when alt tab/mouse leaving screen
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Xwayland crash when alt tab/mouse leaving screen
Hello
I am running into issues with wayland and wesnoth crashing while running under xwayland (I assume that's how it's running anyway) since updating Fedora KDE to the latest version where wayland is enforced. This issue was not present before when I was running under X11, and occurs when swapping focus away from wesnoth and back (detailed steps below). If nothing else takes focus it works fine, and either way also only crashes when in the scenario not the main menu which is fine with alt tabbing. Seems to be related to the mouse but that's just a guess, so maybe not happy with how mouse access works in wayland?
I'm open to this being a packaging issue of course - if so I'll need to go bug the maintainer - and as stated with the same hardware and distro (granted 39 not 41) it worked fine so wayland (and thus xwayland) are the only notable change which, combined with the fact the graphical output dies but the audio keeps running, really points towards that being the cause. I am using some very low level configuration to rebind some mouse buttons because of the annoying way wayland words so that might be involved too as it does seem to be the mouse that drives this problem.
Operating system, including its version; and Wesnoth version, including the configured language.
OS: Linux, Fedora 41 (KDE Plasma) x86_64
Wesnoth: 1.18.2 x86_64
If you installed Wesnoth from a Linux repository using the terminal, make sure that you downloaded the full package that includes all campaigns and music.
Yes
The build information provided by the game by clicking on the Image icon on the bottom-left corner of the main menu and then the Image Copy button.
The Battle for Wesnoth version 1.18.2 x86_64
Running on Fedora Linux 41 (KDE Plasma) x86_64
Distribution channel: Default
Game paths
==========
Data dir: /usr/share/wesnoth
User config dir: /home/USER/.config/wesnoth
User data dir: /home/USER/.local/share/wesnoth/1.18
Saves dir: /home/USER/.local/share/wesnoth/1.18/saves
Add-ons dir: /home/USER/.local/share/wesnoth/1.18/data/add-ons
Cache dir: /home/USER/.cache/wesnoth
Logs dir: /home/USER/.local/share/wesnoth/1.18/logs
Libraries
=========
Boost: 1.83
Lua: 5.4.6
OpenSSL/libcrypto: 3.2.0b-dev (runtime 3.2.0b-dev)
libcurl: 8.9.1 (runtime 8.9.1)
Cairo: 1.18.0 (runtime 1.18.0)
Pango: 1.54.0 (runtime 1.54.0)
SDL: 2.30.3 (runtime 2.30.3)
SDL_image: 2.8.2 (runtime 2.8.2)
SDL_mixer: 2.8.0 (runtime 2.8.0)
Features
========
Lua console completion: yes
D-Bus notifications back end: yes
Current video settings
======================
SDL video drivers: [wayland] x11 KMSDRM offscreen dummy evdev
Window size: 1920x1080
Game canvas size: 1920x1080
Final render target size: 1920x1080
Screen refresh rate: 60
Screen dpi: 92.54x92.68
Renderer: opengl (hw)
Maximum texture size: 16384x16384
VSync: off
Current audio settings
======================
SDL audio drivers: [pulseaudio] alsa jack pipewire dsp disk
Number of channels: 2
Output rate: 44100 Hz
Sample format: signed 16 bit little-endian
Sample size: 1024 bytes
Installed add-ons
=================
ANLEra: 3.3.7
A_Fiery_Birth: 1.4.2
A_Group_in_a_War: 0.3.0b
A_Song_of_Fire: 1.0.7
A_Vision_Blinded: 1.0.28
Adventure_of_Soul_Keeper: 0.1.4
An_Independence_War: 0.4.1b
Archaic_Era: 1.18.2
Archaic_Resources: 1.18.1
Archaic_Sounds: 1.18.0
Ascension: 1.2.4
Ashen_Hearts: 3.0.1
Ashevieres_Shadow: 1.4.3
Assault_on_the_Citadel: 1.0.6
Bad_Moon_Rising: 1.18.3
Civil_Warfare: 0.1.2
Desert_Map-Pack: 18.0.0 beta
Dirty_Blood: 1.0.0
Dream_in_the_Sand: 2.2.3
Drunkards_Dwarves_And_Doubloons: 1.3.0
Epic_Between_the_Tides: 3.0.0
Era_of_Four_Moons: 0.1.2
Era_of_Magic: 4.7.1
Era_of_Magic_Resources: 3.0.0
Fate_of_a_Princess: 1.5.0-4
Five_Fates: 1.14.2
Forgotten_Conflicts: 1.1.1
Galis_Contract: 0.4.4
Glubul_Saga: 1.1.3
Halfelven: 18.0.0 beta
Horn_of_Faith: 2.5.5
Imperial_Era: 0.25.7
In_Defense_of_Kharos: 0.2.5
Inky_Quest: 1.7.1
LSB: 1.0.1
Lifetime_of_Stones: 1.1.0
Mages_University_alternative: 0.0.3
Missing_Scepter: 0.9.1
Refumees_Saurian_Pack: 1.5.1g
Region_Esalunwa: 0.1.5
Resurgence_of_the_Forgotten: 0.1.3
Return_from_the_Abyss: 1.1.14g
RftA_Music: 1.0.0b
Roar_of_the_Woses: 1.2.15
Rustling_in_the_Wind: 2.2.8
Santa_Must_Die: 1.2.0
Shakespeares_Ghost: 1.1.0
Story_of_Wose: 0.11.0
Struggle_For_Freedom: 1.0.8
Swamp_Witch_Curse: 0.1.3
TWLP_Music: 1.0.0b
Tales_of_the_Rubies: 2.1.4
Tamanegi_Jukebox: 0.1.9a
The_Dark_Master_Project_Resources_Music: 0.0.4
The_Dark_Master_full_pack_Images01: 0.0.6
The_Dark_Master_full_pack_Images02: 0.0.6
The_Dark_Master_full_pack_beta: 1.0.8
The_Garardine_Ascendancy: 3.1.3
The_Nameless_Fellowship_Saga: 1.5.0
The_Return_of_the_Sea_Hag: 1.0.8
The_Rootless: 1.2.8
The_Wolves_Last_Path: 0.1.4c
To_Lands_Unknown: 3.10.0
To_Lands_Unknown_Resources_1: 2.4.0
To_Lands_Unknown_Resources_2: 2.4.0
Tunnel_Wars: 18.0.1 beta
UMC_Music_Book_10: 1.0.0
UMC_Music_Book_11: 1.0.0
UMC_Music_Book_12: 1.0.1
Undead_Empire: 1.0.3i
Up_From_Slavery: 0.5.0
Vendraxis_Prophecy: 1.5.1e
War_Plan_Scarlet: 18.0.1 beta
War_of_Legends: 1.2.7.68
saurian_coast: 1.2.7
A step-by-step walkthrough of how to reproduce the problem. If the problem cannot be reproduced, our ability to identify its cause and fix it will be severely limited.
For what it's worth my logs were located in userdata and trying to output to file as was suggested in the forum thread didn't work. Either way they weren't particularly enlightening I don't think.
I am running into issues with wayland and wesnoth crashing while running under xwayland (I assume that's how it's running anyway) since updating Fedora KDE to the latest version where wayland is enforced. This issue was not present before when I was running under X11, and occurs when swapping focus away from wesnoth and back (detailed steps below). If nothing else takes focus it works fine, and either way also only crashes when in the scenario not the main menu which is fine with alt tabbing. Seems to be related to the mouse but that's just a guess, so maybe not happy with how mouse access works in wayland?
I'm open to this being a packaging issue of course - if so I'll need to go bug the maintainer - and as stated with the same hardware and distro (granted 39 not 41) it worked fine so wayland (and thus xwayland) are the only notable change which, combined with the fact the graphical output dies but the audio keeps running, really points towards that being the cause. I am using some very low level configuration to rebind some mouse buttons because of the annoying way wayland words so that might be involved too as it does seem to be the mouse that drives this problem.
Operating system, including its version; and Wesnoth version, including the configured language.
OS: Linux, Fedora 41 (KDE Plasma) x86_64
Wesnoth: 1.18.2 x86_64
If you installed Wesnoth from a Linux repository using the terminal, make sure that you downloaded the full package that includes all campaigns and music.
Yes
The build information provided by the game by clicking on the Image icon on the bottom-left corner of the main menu and then the Image Copy button.
The Battle for Wesnoth version 1.18.2 x86_64
Running on Fedora Linux 41 (KDE Plasma) x86_64
Distribution channel: Default
Game paths
==========
Data dir: /usr/share/wesnoth
User config dir: /home/USER/.config/wesnoth
User data dir: /home/USER/.local/share/wesnoth/1.18
Saves dir: /home/USER/.local/share/wesnoth/1.18/saves
Add-ons dir: /home/USER/.local/share/wesnoth/1.18/data/add-ons
Cache dir: /home/USER/.cache/wesnoth
Logs dir: /home/USER/.local/share/wesnoth/1.18/logs
Libraries
=========
Boost: 1.83
Lua: 5.4.6
OpenSSL/libcrypto: 3.2.0b-dev (runtime 3.2.0b-dev)
libcurl: 8.9.1 (runtime 8.9.1)
Cairo: 1.18.0 (runtime 1.18.0)
Pango: 1.54.0 (runtime 1.54.0)
SDL: 2.30.3 (runtime 2.30.3)
SDL_image: 2.8.2 (runtime 2.8.2)
SDL_mixer: 2.8.0 (runtime 2.8.0)
Features
========
Lua console completion: yes
D-Bus notifications back end: yes
Current video settings
======================
SDL video drivers: [wayland] x11 KMSDRM offscreen dummy evdev
Window size: 1920x1080
Game canvas size: 1920x1080
Final render target size: 1920x1080
Screen refresh rate: 60
Screen dpi: 92.54x92.68
Renderer: opengl (hw)
Maximum texture size: 16384x16384
VSync: off
Current audio settings
======================
SDL audio drivers: [pulseaudio] alsa jack pipewire dsp disk
Number of channels: 2
Output rate: 44100 Hz
Sample format: signed 16 bit little-endian
Sample size: 1024 bytes
Installed add-ons
=================
ANLEra: 3.3.7
A_Fiery_Birth: 1.4.2
A_Group_in_a_War: 0.3.0b
A_Song_of_Fire: 1.0.7
A_Vision_Blinded: 1.0.28
Adventure_of_Soul_Keeper: 0.1.4
An_Independence_War: 0.4.1b
Archaic_Era: 1.18.2
Archaic_Resources: 1.18.1
Archaic_Sounds: 1.18.0
Ascension: 1.2.4
Ashen_Hearts: 3.0.1
Ashevieres_Shadow: 1.4.3
Assault_on_the_Citadel: 1.0.6
Bad_Moon_Rising: 1.18.3
Civil_Warfare: 0.1.2
Desert_Map-Pack: 18.0.0 beta
Dirty_Blood: 1.0.0
Dream_in_the_Sand: 2.2.3
Drunkards_Dwarves_And_Doubloons: 1.3.0
Epic_Between_the_Tides: 3.0.0
Era_of_Four_Moons: 0.1.2
Era_of_Magic: 4.7.1
Era_of_Magic_Resources: 3.0.0
Fate_of_a_Princess: 1.5.0-4
Five_Fates: 1.14.2
Forgotten_Conflicts: 1.1.1
Galis_Contract: 0.4.4
Glubul_Saga: 1.1.3
Halfelven: 18.0.0 beta
Horn_of_Faith: 2.5.5
Imperial_Era: 0.25.7
In_Defense_of_Kharos: 0.2.5
Inky_Quest: 1.7.1
LSB: 1.0.1
Lifetime_of_Stones: 1.1.0
Mages_University_alternative: 0.0.3
Missing_Scepter: 0.9.1
Refumees_Saurian_Pack: 1.5.1g
Region_Esalunwa: 0.1.5
Resurgence_of_the_Forgotten: 0.1.3
Return_from_the_Abyss: 1.1.14g
RftA_Music: 1.0.0b
Roar_of_the_Woses: 1.2.15
Rustling_in_the_Wind: 2.2.8
Santa_Must_Die: 1.2.0
Shakespeares_Ghost: 1.1.0
Story_of_Wose: 0.11.0
Struggle_For_Freedom: 1.0.8
Swamp_Witch_Curse: 0.1.3
TWLP_Music: 1.0.0b
Tales_of_the_Rubies: 2.1.4
Tamanegi_Jukebox: 0.1.9a
The_Dark_Master_Project_Resources_Music: 0.0.4
The_Dark_Master_full_pack_Images01: 0.0.6
The_Dark_Master_full_pack_Images02: 0.0.6
The_Dark_Master_full_pack_beta: 1.0.8
The_Garardine_Ascendancy: 3.1.3
The_Nameless_Fellowship_Saga: 1.5.0
The_Return_of_the_Sea_Hag: 1.0.8
The_Rootless: 1.2.8
The_Wolves_Last_Path: 0.1.4c
To_Lands_Unknown: 3.10.0
To_Lands_Unknown_Resources_1: 2.4.0
To_Lands_Unknown_Resources_2: 2.4.0
Tunnel_Wars: 18.0.1 beta
UMC_Music_Book_10: 1.0.0
UMC_Music_Book_11: 1.0.0
UMC_Music_Book_12: 1.0.1
Undead_Empire: 1.0.3i
Up_From_Slavery: 0.5.0
Vendraxis_Prophecy: 1.5.1e
War_Plan_Scarlet: 18.0.1 beta
War_of_Legends: 1.2.7.68
saurian_coast: 1.2.7
A step-by-step walkthrough of how to reproduce the problem. If the problem cannot be reproduced, our ability to identify its cause and fix it will be severely limited.
- Start game
- Start any campaign (stock and custom tested)
- Campaign loads fine and works fine
- alt tab out and back in (if fullscreen)/move mouse out of window, click outside of window then return to window (when running windowed) - seems fine if you just move the mouse out and don't click elsewhere. Also other program notifications that take focus seem to cause it.
- game runs very slowly for a few second, then freezes and then the output goes away/crashes: audio continues to play until remaining process(es) are manually killed. Sometimes the output goes greyscale first too. Feels like it suddenly spikes in resources or something
- fullscreen
- windowed
- vsync on/off
- adaptive sync on/off on monitor
- animations on/off
- limit fps on/off
- custom campaign vs stock (feels like stock might last 4-5 seconds longer without crashing, maybe because smaller maps)
For what it's worth my logs were located in userdata and trying to output to file as was suggested in the forum thread didn't work. Either way they weren't particularly enlightening I don't think.
Code: Select all
Battle for Wesnoth v1.18.2 x86_64
Started on Fri Dec 6 02:42:18 2024
Data directory: /usr/share/wesnoth
User configuration directory: /home/USER/.config/wesnoth
User data directory: /home/USER/.local/share/wesnoth/1.18
Cache directory: /home/USER/.cache/wesnoth
Setting mode to 1920x1080
20241206 02:42:19 warning general: no location found for 'data/add-ons/Era_of_Four_Moons/translations', skipping textdomain
20241206 02:42:19 warning general: no location found for 'data/add-ons/Galis_Contract/translations', skipping textdomain
20241206 02:42:19 warning general: no location found for 'data/add-ons/Imperial_Era/translations', skipping textdomain
20241206 02:42:19 warning general: no location found for 'data/add-ons/In_Defense_of_Kharos/translations', skipping textdomain
20241206 02:42:19 warning general: no location found for 'data/add-ons/Saurian_Pack/translations', skipping textdomain
Checking lua scripts... ok
20241206 02:42:21 warning filesystem: Conflicting files in binary_path: '/home/USER/.local/share/wesnoth/1.18/data/add-ons/Adventure_of_Soul_Keeper/images/units/souls/enlightened_soul.png' and '/home/USER/.local/share/wesnoth/1.18/data/add-ons/The_Dark_Master_full_pack_Images01/images/units/souls/enlightened_soul.png'
20241206 02:42:21 warning image: Replaced missing 'portraits/trolls/whelp.png' with found 'portraits/trolls/whelp.webp'.
20241206 02:42:21 warning image: Replaced missing 'data/core/images/portraits/monsters/cuttlefish.png' with found 'data/core/images/portraits/monsters/cuttlefish.webp'.
20241206 02:42:21 warning image: Replaced missing 'data/core/images/portraits/elves/sorceress.png' with found 'data/core/images/portraits/elves/sorceress.webp'.
20241206 02:42:21 warning image: Replaced missing 'portraits/saurians/skirmisher.png' with found 'portraits/saurians/skirmisher.webp'.
Re: Xwayland crash when alt tab/mouse leaving screen
Probably same as https://github.com/wesnoth/wesnoth/issues/7601.
"If gameplay requires it, they can be made to live on Venus." -- scott
Re: Xwayland crash when alt tab/mouse leaving screen
Yup that looks very similar, I'm not getting the explicit error message reported there but I'd imagine it's related and possibly I'm just missing some sort of verbosity/debug mode flag to output the error. I'm also running AMD rather than Nvidia but it seems like that's not a factor.Soliton wrote: ↑December 9th, 2024, 5:59 pm Probably same as https://github.com/wesnoth/wesnoth/issues/7601.
If there's a good way for me to hunt down better debug information and that'd be of use I could provide that, otherwise I'm happy to hang on and wait for a fix.
I tried running with --log-debug=all and the game barely functions and guessing for domains other than all is shooting in the dark a bit.
Re: Xwayland crash when alt tab/mouse leaving screen
I managed to get it to run with debug=all by directly loading into a campaign on the commandline with -c (as otherwise it froze while loading unit details).
The resulting log is 1151287 lines long and doesn't have an obvious failure point since as I said the game seems to keep running with audio playing until I manually kill it from the terminal (ctrl+c or otherwise) but if that's likely to be useful I can try and provide it. It comes out to something like 75MB though so maybe I will have to upload it somewhere else.
And wouldn't you know it there's our friend the Broken pipe just like the github issue suggests! There's a huge block of these SDL_TEXTINPUT messages around it if that helps at all.
The resulting log is 1151287 lines long and doesn't have an obvious failure point since as I said the game seems to keep running with audio playing until I manually kill it from the terminal (ctrl+c or otherwise) but if that's likely to be useful I can try and provide it. It comes out to something like 75MB though so maybe I will have to upload it somewhere else.
And wouldn't you know it there's our friend the Broken pipe just like the github issue suggests! There's a huge block of these SDL_TEXTINPUT messages around it if that helps at all.
Re: Xwayland crash when alt tab/mouse leaving screen
I think I have this bug too, but I am on Fedora 43.
UPDATE:
I tried the flathub flatpak which is currently on version 1.18.5, and it wasn't crashing for me.
Code: Select all
co@stalwart:~$ dnf info wesnoth
Updating and loading repositories:
Fedora 43 - x86_64 - Updates 100% | 104.1 KiB/s | 31.6 KiB | 00m00s
Repositories loaded.
Installed packages
Name : wesnoth
Epoch : 0
Version : 1.19.17
Release : 1.fc43
Architecture : x86_64
Installed size : 27.0 MiB
Source : wesnoth-1.19.17-1.fc43.src.rpm
From repository : updates
Summary : Turn-based strategy game with a fantasy theme
URL : http://www.wesnoth.org
License : GPL-2.0-or-later
Description : The Battle for Wesnoth is a turn-based strategy game with a fantasy theme.
:
: Build up a great army, gradually turning raw recruits into hardened
: veterans. In later games, recall your toughest warriors and form a deadly
: host against whom none can stand. Choose units from a large pool of
: specialists, and hand-pick a force with the right strengths to fight well
: on different terrains against all manner of opposition.
:
: Fight to regain the throne of Wesnoth, of which you are the legitimate
: heir, or use your dread power over the Undead to dominate the land of
: mortals, or lead your glorious Orcish tribe to victory against the humans
: who dared despoil your lands. Wesnoth has many different sagas waiting to
: be played out. You can create your own custom units, and write your own
: scenarios--or even full-blown campaigns. You can also challenge your
: friends--or strangers--and fight multi-player epic fantasy battles.
Vendor : Fedora ProjectI tried the flathub flatpak which is currently on version 1.18.5, and it wasn't crashing for me.
Re: Xwayland crash when alt tab/mouse leaving screen
I was not even aware it is possible to play wesnoth on xwayland already. Guess I have to try
this eventually. Are there many wesnoth developers testing on wayland?
this eventually. Are there many wesnoth developers testing on wayland?