bugBattle for Wesnoth - Bugs: bug #21797, Saving and loading in multiplayer...

Show feedback again

bug #21797: Saving and loading in multiplayer creates side with no controller

Submitted by:  Eli Dupree <elvish_pillager>
Submitted on:  Sat Mar 15 03:26:12 2014  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Networking
Status: FixedPrivacy: Public
Assigned to: Chris Beck <involution>Open/Closed: Closed
Release: 1.13.0-devOperating System: Debian Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Thu Oct 9 01:27:50 2014, comment #6:

This code was released at least in 1.11.13. The issue seems to be fixed, on both 1.12 and master. I'm marking as fixed and closing.

Chris Beck <involution>
Project MemberIn charge of this item.
Tue Mar 18 22:31:21 2014, comment #5:

It seems the problem is that when the player quits the game, his gamestate doesn't have any "end_level_data", and the engine becomes upset about this.

I pushed a workaround to add this if it finds that it doesn't have it. However, it may indicate a more fundamental bug involving reloaded games, so I only consider this a workaround and not a fix.


Chris Beck <involution>
Project MemberIn charge of this item.
Sun Mar 16 17:12:22 2014, comment #4:

Hmm... I find that this isn't a fix actually... I don't get a server warning about controllers anymore, but I still get "mandatory child missing".

Chris Beck <involution>
Project MemberIn charge of this item.
Sun Mar 16 07:16:50 2014, comment #3:

I pushed a solution to (1):


and it seems to fix the scenario you described. More testing would be a good thing however.

It still remains to fix #18829.

Chris Beck <involution>
Project MemberIn charge of this item.
Sun Mar 16 05:45:52 2014, comment #2:

involution wrote: "That is not a bug."

Actually I guess no one is sure, but if it is a bug it is a duplicate of https://gna.org/bugs/?18829

I find that when I modify your savefile so that the controller type is "network_ai" then everything works.

So there's two issues to fix here, either of which would resolve this particular issue (but ideally we would fix both):

1. Make the mp_game_utils.cpp initial level config function be sure to always set controller type to AI if allow_player = no.

2. Fix bug https://gna.org/bugs/?18829

Chris Beck <involution>
Project MemberIn charge of this item.
Sat Mar 15 22:08:49 2014, comment #1:

I never knew this, but apparently there is a unit "Nani the Shapeshifter" submerged in the upper left corner of this map.


From inspecting your save file, side 3 gets saved with controller type="network" by client B. That is not a bug. When the AI is controlled by another client, the controller type is listed as "network".

This might have something to do with the refactor of the mp_connect_dialog? It might be that the fields "hidden=yes" / "allow_player = no" are causing it to ignore this side and not set it to an AI.

In fact I find that if you change the value of "allow_player" to yes in the save file, then you can load the game correctly without problems. The only issue is, now you have to assign a controller to side 3 in the dialog. So I think there's a logic error somewhere in either the dialog or the mp_game_utils function that builds the WML at the start of an mp scenario.

Chris Beck <involution>
Project MemberIn charge of this item.
Sat Mar 15 03:26:12 2014, original submission:

Start a multiplayer game on 2p - Silverhead Crossing with client A. Have client B join. Don't move any units; simply have client B save the game, then reload from the save, and client A join again. When the game starts, you should receive the warning, "Side 3 has no controller but should! The host needs to assign control for the game to proceed past that side's turn."

This does not happen if the host saves the game, but it does happen regardless of who loads the save and who joins in which slot.

Further, when you quit the reloaded game, you get a dialog saying "Error while reading the WML: Mandatory WML child missing yet untested for. Please report."

Attached is an example of such a save.

Eli Dupree <elvish_pillager>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by elvish_pillager (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Oct 9 01:27:50 2014involutionStatusReady For Test=>Fixed
    Tue Mar 18 22:31:21 2014involutionStatusIn Progress=>Ready For Test
    Sun Mar 16 17:12:22 2014involutionStatusReady For Test=>In Progress
    Sun Mar 16 07:16:50 2014involutionStatusNone=>Ready For Test
      Assigned toNone=>involution
    Sat Mar 15 03:26:12 2014elvish_pillagerAttached File-=>Added 2p_—_Silverhead_Crossing_Turn_1-Default-3.gz, #20340
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup