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 15 Mar 2014 03:26:12 AM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Networking
Status: Ready For TestPrivacy: Public
Assigned to: Chris Beck <involution>Open/Closed: Open
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.

 

Tue 18 Mar 2014 10:31:21 PM UTC, 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.

https://github.com/wesnoth/wesnoth/commit/7708d06a93b6b97923cafa162286f0739faa4a16

Chris Beck <involution>
Project MemberIn charge of this item.
Sun 16 Mar 2014 05:12:22 PM UTC, 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 16 Mar 2014 07:16:50 AM UTC, comment #3:

I pushed a solution to (1):

https://github.com/wesnoth/wesnoth/commit/af383e8ebb01094f47ec4712db47ea31adf8fc22

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 16 Mar 2014 05:45:52 AM UTC, 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 15 Mar 2014 10:08:49 PM UTC, comment #1:

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

https://github.com/wesnoth/wesnoth/blob/master/data/multiplayer/scenarios/2p_Silverhead_Crossing.cfg#L36

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 15 Mar 2014 03:26:12 AM UTC, 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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Mar 2014 10:31:21 PM UTCinvolutionStatusIn Progress=>Ready For Test
    Sun 16 Mar 2014 05:12:22 PM UTCinvolutionStatusReady For Test=>In Progress
    Sun 16 Mar 2014 07:16:50 AM UTCinvolutionStatusNone=>Ready For Test
      Assigned toNone=>involution
    Sat 15 Mar 2014 03:26:12 AM UTCelvish_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