bugBattle for Wesnoth - Bugs: bug #21903, Scenario transitions in networked...

 
 
Show feedback again

bug #21903: Scenario transitions in networked MP don't work unless host transitions first

Submitted by:  Chris Beck <involution>
Submitted on:  Thu 10 Apr 2014 06:41:49 AM UTC  
 
Category: BugSeverity: 5 - Blocker
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: Andrius Silinskas <thunderstruck>Open/Closed: Closed
Release: 1.11.9-1.13.0Operating System: Linux Mint 16

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)

Wed 08 Oct 2014 05:41:27 PM UTC, comment #10:

for the log:
1.12 commit is: https://github.com/wesnoth/wesnoth/commit/986002b44880093e848e7c10a8a08581d53e3796
master commit is: https://github.com/wesnoth/wesnoth/commit/35f781d428aed486752d65d01624d9a236a363d5

Daniel <gfgtdf>
Project Member
Wed 23 Apr 2014 03:01:40 AM UTC, comment #9:

Let's be sure to test how observers are handled as well. Ideal behavior would be that observers also progress. I can help test that, hit me up on IRC (as happygrue) and we can make sure this works.

George <wintermute>
Project Member
Tue 22 Apr 2014 11:25:13 PM UTC, comment #8:

As someone who has played a lot of MP campaigns as both host and player, that seems a reasonable way to handle it IMO. We just need to make players aware of this now, though really they will also figure it out.

George <wintermute>
Project Member
Mon 21 Apr 2014 05:32:43 PM UTC, comment #7:

ok i implemented what i said below in the following way:
Hosts can always end linger mode, non host can never end linger mode. Instead, the linger mode is ended on non hosts when it's ended on hosts.

Daniel <gfgtdf>
Project Member
Sun 20 Apr 2014 10:16:09 PM UTC, comment #6:

ok i think the orignal plan to make this work was to disable the end_turn button when starting linger mode, and reable it when receivong notifynextscenario, in playturn.cpp with:

gui::button* btn_end = resources::screen->find_action_button("button-endturn");
if(btn_end) {
btn_end->enable(true);
}
return PROCESS_END_LINGER;

however this doesn't work because the state of the endturn button get reassigned by the hotkeys code to the value of
can_execute_command(end turn hotkey, null)
so i tihnk in order to fix this problem we have to ensure
can_execute_command(hotkey::HOTKEY_ENDTURN) returns the correct value.
Note the it shoudl always return true for the host when in linger mode.

Daniel <gfgtdf>
Project Member
Sat 19 Apr 2014 04:45:11 PM UTC, comment #5:

Also related: the button should probably be greyed out and unclickable for observers as well, until the host gives the next level.

Chris Beck <involution>
Project Member
Sat 19 Apr 2014 04:51:53 AM UTC, comment #4:

I think the problem is actually just a UI problem and not with any of the engine -- the end scenario button in linger mode should not be clickable when it is greyed out!

Chris Beck <involution>
Project Member
Fri 11 Apr 2014 07:06:30 AM UTC, comment #3:

Hmm so this is pretty strange. I seemed to get this exact bug in 1.10 also just now while playing World Conquest. -- two players tried to proceed to next scenario before host and instead received the current level and went OOS. I'm quite surprised if it's never been reported, and I couldn't reproduce it with the looping test scenario in 1.11.5, but maybe that is just a bad test case. Will try to do another proper test in 1.10 soon...

Anyways it would be great to fix it, but if it isn't actually a new bug and it is too hard to fix then it's not clear if we should consider it a blocker.

Chris Beck <involution>
Project Member
Thu 10 Apr 2014 06:05:56 PM UTC, comment #2:

I have tested this now in 1.11.5: There's no mp campaign mechanism there, but I used the looping test scenario in a networked setting. Then there is still a bug here but the character is different:

If P2 ends the scenario before the host, they transition to the next level, but they believe they should play before the host and cause OOS this way.

Chris Beck <involution>
Project Member
Thu 10 Apr 2014 03:38:48 PM UTC, comment #1:

Sorry, I didn't include all the details I intended to in the OP.

1.) DO NOT use debug mode, that will result in a different problem. (https://gna.org/bugs/?21902).
2.) Instead cheat by using the following patch to Kalenz's definition in data/campaigns/Legend_of_Wesmere/utils/characters.cfg:

#define KALENZ
...
[object]
[effect]
apply_to=attack
range=ranged
increase_attacks=100
[/effect]
[effect]
apply_to=attack
range=ranged
increase_damage=100
[/effect]
[/object]
...
#enddef

(Patch included for convenience, use git apply to use it.)

You may consistently win on turn 2 by moving Kalenz directly to the enemy leader.

3.) Launch 3 local clients on a local server. To create the bug, end linger mode using P2 before ending it for the host.

(file #20504)

Chris Beck <involution>
Project Member
Thu 10 Apr 2014 06:41:49 AM UTC, original submission:

When a scenario ends and goes to linger mode before transitioning to the next scenario, players may linger as long as they like until they end turn and move to the next scenario. It turns out that there is a sort of race condition here -- if the host transitions first it is fine, but otherwise it isn't.

Tested with LoW and also a simple 2p MP scenario that loops on itself for testing. Appears to affect every build since at least 1.11.9.

If the client (non-host) ends turn before the host, they will be dropped from the game and kicked to the lobby, while the host will be left to reassign them. Reassigning them also doesn't work, wesnoth reports controller type errors after the host transitions. ("Side 4 doesn't have a controller! To proceed with the game...")

If an observer ends turn before the host, they will be moved to the mp wait dialog. If the host ends turn, they will transition correctly and the observer will as well. The host may even reassign controllers in this time and give obs control, and the obs will launch the scenario correctly. Only the non-host clients seem to have a problem here.

Chris Beck <involution>
Project Member

 

(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 mattsc (Updated the item)
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by wintermute (Posted a comment)
  • -unavailable- added by gfgtdf (Posted a comment)
  • -unavailable- added by thunderstruck (Updated the item)
  • -unavailable- added by involution (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 13 Oct 2014 08:06:45 PM UTCmattscStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 23 Apr 2014 01:00:11 AM UTCshadowmasterStatusWorks For Me=>Ready For Test
    Mon 21 Apr 2014 05:32:43 PM UTCgfgtdfStatusNone=>Works For Me
    Thu 10 Apr 2014 06:38:48 PM UTCthunderstruckAssigned toNone=>thunderstruck
    Thu 10 Apr 2014 03:38:48 PM UTCinvolutionAttached File-=>Added overpower_kalenz.patch, #20504
    Thu 10 Apr 2014 06:46:03 AM UTCinvolutionSummaryScenario transitions in MP don\'t work unless host transitions first=>Scenario transitions in networked MP don't work unless host transitions first
    Thu 10 Apr 2014 06:42:21 AM UTCinvolutionSeverity3 - Normal=>5 - Blocker
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup