Dismissing a unit crashed the game

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
howwitty
Posts: 74
Joined: May 29th, 2006, 5:05 am
Location: U.S.

Dismissing a unit crashed the game

Post by howwitty »

Hi, I am playing Wesnoth 1.18.5, which I compiled from source with cmake to run on Ubuntu 24.04.3 in English. I encountered an error while playing WC II yesterday, and attempted to generate a backtrace but ran into another error where wesnothd would not install. I did notice wesnothd is already in the same folder as the original installation which I was using to run Wesnoth, but I could not run it by double clicking on it.

However, when I tried to re-install with the debug flag I got the error in the attached image.

I noticed there were a few recent patches in the past 6 years where this bug occurred, so I assume the bug is already well understood. Anyway I attached some details about the run conditions and I can try uninstalling some add-ons and trying to reproduce the bug if necessary.

The bug occurred when I tried to dismiss a unit from the recall list after advancing to a new WC II scenario. The game immediately crashed to the Desktop. This happened multiple times until I decided to stop trying it.

Code: Select all

Battle for Wesnoth v1.18.5 x86_64
Started on Wed Dec 17 09:54:53 2025


Data directory:               /usr/local/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
Checking lua scripts... ok
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Shifter'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Shifter'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Shifter'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Shifter'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Shifter'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Wilderman'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Wilderman'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Wilderman'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Wilderman'
20251217 09:55:05 error config: Skipping duplicate unit variation ID: '' of unit_type 'WOTG_Dalefolk_Wilderman'
20251217 09:58:19 error replay: Unexpected Error during synced executionillegal disband

wesnoth: /home/USER/Downloads/wesnoth-1.18.5/src/synced_context.cpp:160: static void synced_context::default_error_function(const std::string&): Assertion `!"Unexpected Error during synced execution, more info in stderr."' failed.
Attachments
build information.txt
(2.18 KiB) Downloaded 8 times
Screenshot from 2025-12-18 15-49-28.png
I'm tired.
Soliton
Site Administrator
Posts: 1755
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Dismissing a unit crashed the game

Post by Soliton »

Not much point in a debug build when you have the exact line number of the "crash". Doesn't happen for me though so the question is how to trigger the assert.
"If gameplay requires it, they can be made to live on Venus." -- scott
howwitty
Posts: 74
Joined: May 29th, 2006, 5:05 am
Location: U.S.

Re: Dismissing a unit crashed the game

Post by howwitty »

Do you know how I can access stderr while running wesnoth? It's been a long time since I did anything with C++. I am able to open the savegame and dismiss units, so I think this only happens in WC II on the Wesnoth server.
I'm tired.
gnombat
Posts: 975
Joined: June 10th, 2010, 8:49 pm

Re: Dismissing a unit crashed the game

Post by gnombat »

howwitty wrote: December 18th, 2025, 9:05 pm However, when I tried to re-install with the debug flag I got the error in the attached image.
You probably just need to use sudo? Like this:

Code: Select all

sudo make install
howwitty wrote: December 18th, 2025, 10:01 pm Do you know how I can access stderr while running wesnoth?
You already posted it - the log file just contains stderr. The "more info in stderr" that was mentioned is just this message:

Code: Select all

error replay: Unexpected Error during synced executionillegal disband
gfgtdf
Developer
Posts: 1457
Joined: February 10th, 2013, 2:25 pm

Re: Dismissing a unit crashed the game

Post by gfgtdf »

More information is neeed here, in particular:
1) wre you playing alone when the error happens?
2) Did you use the planning mode, and if yes how exactly?
3) Did you have any add-ons active during the game?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
Posts: 1457
Joined: February 10th, 2013, 2:25 pm

Re: Dismissing a unit crashed the game

Post by gfgtdf »

howwitty wrote: December 18th, 2025, 9:05 pm
I noticed there were a few recent patches in the past 6 years where this bug occurred, so I assume the bug is already well understood.
Actually no, this is the first time we have heared of this problem, there doesnt seems to be in issue in our issue tracker ( https://github.com/wesnoth/wesnoth/issues ) for it
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
howwitty
Posts: 74
Joined: May 29th, 2006, 5:05 am
Location: U.S.

Re: Dismissing a unit crashed the game

Post by howwitty »

gfgtdf wrote: December 19th, 2025, 5:28 pm More information is neeed here, in particular:
1) wre you playing alone when the error happens?
2) Did you use the planning mode, and if yes how exactly?
3) Did you have any add-ons active during the game?

I was playing online with someone who said the planning mode was making them lag, so I tried to use planning mode less. I don't recall using any addons, but may have used plan advance.
I'm tired.
gfgtdf
Developer
Posts: 1457
Joined: February 10th, 2013, 2:25 pm

Re: Dismissing a unit crashed the game

Post by gfgtdf »

howwitty wrote: December 19th, 2025, 8:38 pm
gfgtdf wrote: December 19th, 2025, 5:28 pm More information is neeed here, in particular:
1) wre you playing alone when the error happens?
2) Did you use the planning mode, and if yes how exactly?
3) Did you have any add-ons active during the game?

I was playing online with someone who said the planning mode was making them lag, so I tried to use planning mode less. I don't recall using any addons, but may have used plan advance.
Planning mode does't make it lag, but they cannot see your planned moves so they receive them only when you actually commit your moves, so it might look like it. (this is not specific to planning mode though, the game clients always only sends moves once it's certain that the player cannot undo them)



Anyways, what i think is happening is that you are trying to dismiss units while its not really your turn, planning mode makes it looks like this works but it actually doesn't and just results in a crash. We can try to fix this in the engine (although the fix would probably just be to grey out the button while its not your turn), in the meantime i reccomend to just wait with dismissing units until it is your turn.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
howwitty
Posts: 74
Joined: May 29th, 2006, 5:05 am
Location: U.S.

Re: Dismissing a unit crashed the game

Post by howwitty »

gfgtdf wrote: December 19th, 2025, 9:11 pm
howwitty wrote: December 19th, 2025, 8:38 pm
gfgtdf wrote: December 19th, 2025, 5:28 pm More information is neeed here, in particular:
1) wre you playing alone when the error happens?
2) Did you use the planning mode, and if yes how exactly?
3) Did you have any add-ons active during the game?

I was playing online with someone who said the planning mode was making them lag, so I tried to use planning mode less. I don't recall using any addons, but may have used plan advance.
Planning mode does't make it lag, but they cannot see your planned moves so they receive them only when you actually commit your moves, so it might look like it. (this is not specific to planning mode though, the game clients always only sends moves once it's certain that the player cannot undo them)



Anyways, what i think is happening is that you are trying to dismiss units while its not really your turn, planning mode makes it looks like this works but it actually doesn't and just results in a crash. We can try to fix this in the engine (although the fix would probably just be to grey out the button while its not your turn), in the meantime i reccomend to just wait with dismissing units until it is your turn.
Yes, that's correct. I am now able to reproduce the crash in single player by turning off the acceleration and AI move skips
I'm tired.
Post Reply