bugBattle for Wesnoth - Bugs: bug #19258, Errors in replays of reloaded...

 
 
Show feedback again

bug #19258: Errors in replays of reloaded games - a superfluous container

Submitted by:  SlowThinker <slowthinker>
Submitted on:  Mon 09 Jan 2012 11:30:41 AM UTC  
 
Category: BugSeverity: 4 - Important
Priority: 5 - NormalItem Group: Replays
Status: FixedPrivacy: Public
Assigned to: Chris Beck <involution>Open/Closed: Closed
Release: 1.9.13Operating System: Win XP Pro

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)

Tue 14 Oct 2014 12:02:54 AM UTC, comment #9:

Marking as fixed and closing.

Chris Beck <involution>
Project MemberIn charge of this item.
Sat 26 Apr 2014 12:14:07 AM UTC, comment #8:

Proposed fix in 1.12 and master:
https://github.com/wesnoth/wesnoth/commit/effc118f1e14b8b7cccb6e88d5ff1713291b94ca

Chris Beck <involution>
Project MemberIn charge of this item.
Sun 22 Jan 2012 12:43:10 AM UTC, comment #7:

a workaround for the easy case:

just add [variables] disable_replay_corruption="yes" [/variables] to the [scenario]

(if there is at least one variable defined in scenario, the variables block won't be overwritten by save/load/save)

Iurii Chernyi <crab>
Project Member
Sun 22 Jan 2012 12:32:22 AM UTC, comment #6:

as an easy way to test:
add to Den of Onis MP scenario:

[event]
name = side 1 turn 2
[set_variable]
add = 1
name = special_counter
[/set_variable]
[/event]
[event]
name = side 1 turn 3
[unit]
hitpoints = $special_counter
placement = leader
side = 1
type = Elvish Fighter
[/unit]
[/event]

then, after new game/save/load/save/load_replay, in replay, you'll have Elvish Fighter with 2hp instead of 1hp.

Iurii Chernyi <crab>
Project Member
Wed 11 Jan 2012 11:02:37 PM UTC, comment #5:

SlowThinker wrote:
"If you want to test then use Conquest Minus 3.0.14 and lower. The new version 3.0.15 prevents the bug to take any effect."

There is another issue with 3.0.14, so please for testing use Conquest Minus 3.0.13:
http://forums.wesnoth.org/viewtopic.php?p=513932#p513932

SlowThinker <slowthinker>
Tue 10 Jan 2012 11:31:42 AM UTC, comment #4:

SlowThinker wrote:
"You can also test the full procedure (start a game...save...load...save...replay) with any Conquest Minus map if you download Conquest Minus from the 1.8 add-on server"

If you want to test then use Conquest Minus 3.0.14 and lower. The new version 3.0.15 prevents the bug to take any effect.

SlowThinker <slowthinker>
Mon 09 Jan 2012 09:10:43 PM UTC, comment #3:

By "Which scenarios are affected"
I mean "Which scenarios have a real impact on the replay".
(It looks ANY scenario creates the replay_start.variables tag and then tries to use these variables on the replay start.)

In case I didn't explain clearly how the bug emerged:

  • It looks the author of the bug stored the variables in the point of the reload, because he thought he would start the replay from that point.
  • then he started the replay from the very beginning, but still applied the variables from the reload-point.
SlowThinker <slowthinker>
Mon 09 Jan 2012 08:46:48 PM UTC, comment #2:

I mostly tested "SaveGame+MainMenu/Load/ShowReplay_checked", but the problem seems to be identical also with "SaveReplay": again the file contains the replay_start.variables container and OOSes are reported.

how-to-reproduce:
1) Load any game, save immediately, and you will see the new tag replay_start.variables has been added to the savefile: I consider it a buggy behaviour, such saves should be very similar.

2a) If you want to see a real impact on the replay, load the file I just attached (it is the 2nd save) in BfW 1.9.3 with the procedure "MainMenu/Load/ShowReplay_checked".
2b) You can also test the full procedure (start a game...save...load...save...replay) with any Conquest Minus map if you download Conquest Minus from the 1.8 add-on server (let me know if you need it for 1.9)

Which scenarios are affected:

  • the scenarios with variables that aren't cleared before they are used, because the replays don't start with an empty space of variables, but with variables set to their value in the moment of the 1st save:
    • the arrays may have more items
    • the strings may be longer: imagine {VARIABLE aux $aux+asdf}
    • etc.
  • sometimes also the random generator is in a different status during the replays and so yields different random numbers than in the original game. This problem happened with Conquest Minus - you can see the ownerships of villages (they are distributed randomly) in the original game and in the replay are different. (But I usually didn't get this problem with very simple scenarios which produced random numbers only.)

(file #14777)

SlowThinker <slowthinker>
Mon 09 Jan 2012 01:55:19 PM UTC, comment #1:

Can you nail down the how-to-reproduce a bit further please.
-If you "load a replay" it means you are using the "show replay" checkbox in the load game dialog ? Since there are also manually and automatically saved replays (which are only replays and not files which can be used as saves or replays).
-"some scenarios" is bad, we should have a deterministic way to reproduce. From what you write, should it be enough if there is a wml event (turn 2 for instance) which writes a variable into the gamestate ?

Anonymissimus <anonymissimus>
Project Member
Mon 09 Jan 2012 11:30:41 AM UTC, original submission:

The problem:
Replays of some scenarios produce OOS errors if the game was saved/reloaded in the middle.

Rectification:
The savefile contains a container replay_start.variables which causes the errors and is apparently superfluous: If the container replay_start.variables is deleted then replays work well.

More details here: http://forums.wesnoth.org/viewtopic.php?f=4&t=33973

SlowThinker <slowthinker>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #14777:  Replay_bug_save2.7z added by slowthinker (47kB - unknown/unknown)

 

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 shadowmaster (Updated the item)
  • -unavailable- added by crab (Updated the item)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by slowthinker (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 14 Oct 2014 12:02:54 AM UTCinvolutionStatusReady For Test=>Fixed
      Assigned tocrab=>involution
      Open/ClosedOpen=>Closed
    Sat 26 Apr 2014 12:14:07 AM UTCinvolutionStatusNone=>Ready For Test
    Sun 29 Jan 2012 09:06:04 PM UTCshadowmasterStatusPostponed=>None
    Sun 22 Jan 2012 12:32:22 AM UTCcrabStatusConfirmed=>Postponed
    Sat 21 Jan 2012 08:09:59 PM UTCcrabStatusNone=>Confirmed
      Assigned toNone=>crab
    Mon 09 Jan 2012 08:46:48 PM UTCslowthinkerAttached File-=>Added Replay_bug_save2.7z, #14777
    Mon 09 Jan 2012 01:55:19 PM UTCanonymissimusSeverity3 - Normal=>4 - Important
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup