sync bug

Post bug reports and ask for help with other issues here.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

sync bug

Post by obvert »

I'm curious about the sync bug, which has been involved in most of my turns as an allied player. Maybe all of them, but the issue is I don't really know as the replay I'm watching may have subtle differences to the final actual result that I don't notice every turn. We just re-upgraded, went down to 1123x9 and then back up to 1123x10 to try and stop this, and it's still happening.

Firstly, why do these always show a better Allied result in the replay which is then invariably a worse outcome when the real turn file is opened? Does it have something to do with what the Japanese or Allied player does during the replay, like escaping combats or taking screenshots?

If I'm not seeing the real turn consistently it really downgrades the fun but also may mean I miss things I need to see to play at the highest level. Just looking to see if anyone has thoughts or things that have worked to get rid of this issue.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
btd64
Posts: 12805
Joined: Sat Jan 23, 2010 12:48 am
Location: Lancaster, OHIO

RE: sync bug

Post by btd64 »

Follow this to upgrade to next beta;
1. Run your turn.(IJ)
2. IJ saves and exits game.
3. IJ sends combat replay to Allied player.
4. IJ upgrades to beta
5. IJ issue orders.
6. IJ sends turn to Allied player
7. Allied replays combat.
8. Allied upgrades to latest beta
9. Allied issues orders and sends to IJ
This should fix it. Good Luck....GP
Intel i7 4.3GHz 10th Gen,16GB Ram,Nvidia GeForce MX330

AKA General Patton

DWU-Beta Tester
TOAW4-Alpha/Beta Tester
DW2-Alpha/Beta Tester
New Game Development Team

"Do everything you ask of those you command"....Gen. George S. Patton
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

ORIGINAL: General Patton

Follow this to upgrade to next beta;
1. Run your turn.(IJ)
2. IJ saves and exits game.
3. IJ sends combat replay to Allied player.
4. IJ upgrades to beta
5. IJ issue orders.
6. IJ sends turn to Allied player
7. Allied replays combat.
8. Allied upgrades to latest beta
9. Allied issues orders and sends to IJ
This should fix it. Good Luck....GP

We've upgraded successfully. We're solid on the protocol and order of things. We actually downgrading a re-upgraded following exactly the order to try and solve the issue, but it hadn't worked.

This last turn I didn't get any sync problems and interestingly it was after we had both restarted our actual PCs. Maybe this is also a factor.

I only use this PC for gaming, and have virtually nothing else on it, but it is an older model.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
Lokasenna
Posts: 9303
Joined: Sat Mar 03, 2012 3:57 am
Location: Iowan in MD/DC

RE: sync bug

Post by Lokasenna »

I disagree with better results for the Allied player. In my first sync bug, I lost an Allied BB and CL that weren't even attacked in the real replay [:)].

How old your PC is shouldn't matter. I'm not sure why changing versions of the .exe would affect it, as presumably the random number generator (RNG) seed is stored in the save file, but what do I know? I'm just inferring from what I know about how I would store the seed if I were building a PBEM engine.

I think it's just something that happens from time to time when a very specific set of circumstances arise. Something happens on one or the other of your computers that causes the RNG to get out of sync with the RNG of the other player. For those that don't know, computers don't actually random "create" a number - an RNG is simply a giant list of randomized digits or numbers, each of which is assigned a position (#1, 2, 3...50...500002, etc.). The seed number is used to tell the computer which position to start at in the RNG. What happens to get them out of sync, I'm not sure anybody knows... I use my computers for all kinds of stuff and then WITP, sometimes with crashes occurring mid-turn on one of the machines, and to my knowledge we've only had 3 sync bugs between all of my games (1100+ turns), so activity level on the computer probably doesn't matter either.
Panjack
Posts: 463
Joined: Sun Jul 12, 2009 2:08 am
Location: Southern California

RE: sync bug

Post by Panjack »

I encounter the sync bug about 1 out of 4 replays.

So I've made up a story to explain this. It might be true. It might not be true.

My story: although in theory such a problem can be caused by many things, I think it most reasonable to assume the sync bug is generated by the game code itself. I'm guessing some relic random process introduced for testing purposes was accidentally left in some set of code that gives different outcomes from the same random number seed when that particular set of code is invoked.

As in the replay you can have one event out of sync but then later events be "correct," this suggests the game uses the seed to generate a main sequence of pseudo-random numbers that are then passed long to subroutines that use the next random number in line as the seed for its own random process. One of these subroutines must have a problem in it. But once that subroutine is complete, the game then just goes back to pick from the next random number from the main random number sequence and the fact that something went, for want of a better term, "wrong" with one subroutine doesn't infect later results from the replay.

That some people have this problem, and other others, and some people who do have this problem encounter it more frequently implies (if I'm right about the above) that some people do activities (more than others) in their game that lead to this misbehaving set of code to be invoked (more than others).

Of course, adding a complication to it all, although the Japanese player's results are the "official" results we can't assume that the results generated by that player hasn't been affected by this "bad" code. Nor can we assume that those who don't see the sync bug are not actually having this happen: it might be the bad code has the number of shells fired by some ships be 10 for J player and 12 for A player but due to the low probability of hits (and the fact the outcome is discrete, 0, 1, 2) in most circumstances the expected number of hits is only 1 in both cases so that both the J and A players see a single hit in most cases although the outcomes were actually different for the two players (different number of shells fired).

So that's my story, or tall tale depending on your point of view!

Without a doubt, the sync bug is a complicated beast (to mix metaphors).
User avatar
Bullwinkle58
Posts: 11297
Joined: Tue Feb 24, 2009 12:47 pm

RE: sync bug

Post by Bullwinkle58 »

ORIGINAL: Lokasenna

I disagree with better results for the Allied player. In my first sync bug, I lost an Allied BB and CL that weren't even attacked in the real replay [:)].

How old your PC is shouldn't matter. I'm not sure why changing versions of the .exe would affect it, as presumably the random number generator (RNG) seed is stored in the save file, but what do I know? I'm just inferring from what I know about how I would store the seed if I were building a PBEM engine.

I think it's just something that happens from time to time when a very specific set of circumstances arise. Something happens on one or the other of your computers that causes the RNG to get out of sync with the RNG of the other player. For those that don't know, computers don't actually random "create" a number - an RNG is simply a giant list of randomized digits or numbers, each of which is assigned a position (#1, 2, 3...50...500002, etc.). The seed number is used to tell the computer which position to start at in the RNG. What happens to get them out of sync, I'm not sure anybody knows... I use my computers for all kinds of stuff and then WITP, sometimes with crashes occurring mid-turn on one of the machines, and to my knowledge we've only had 3 sync bugs between all of my games (1100+ turns), so activity level on the computer probably doesn't matter either.

FWIW, (not much) the only synch bug I've ever had was playing you. The one in the Aleutians.
The Moose
User avatar
Lokasenna
Posts: 9303
Joined: Sat Mar 03, 2012 3:57 am
Location: Iowan in MD/DC

RE: sync bug

Post by Lokasenna »

ORIGINAL: Bullwinkle58

ORIGINAL: Lokasenna

I disagree with better results for the Allied player. In my first sync bug, I lost an Allied BB and CL that weren't even attacked in the real replay [:)].

How old your PC is shouldn't matter. I'm not sure why changing versions of the .exe would affect it, as presumably the random number generator (RNG) seed is stored in the save file, but what do I know? I'm just inferring from what I know about how I would store the seed if I were building a PBEM engine.

I think it's just something that happens from time to time when a very specific set of circumstances arise. Something happens on one or the other of your computers that causes the RNG to get out of sync with the RNG of the other player. For those that don't know, computers don't actually random "create" a number - an RNG is simply a giant list of randomized digits or numbers, each of which is assigned a position (#1, 2, 3...50...500002, etc.). The seed number is used to tell the computer which position to start at in the RNG. What happens to get them out of sync, I'm not sure anybody knows... I use my computers for all kinds of stuff and then WITP, sometimes with crashes occurring mid-turn on one of the machines, and to my knowledge we've only had 3 sync bugs between all of my games (1100+ turns), so activity level on the computer probably doesn't matter either.

FWIW, (not much) the only synch bug I've ever had was playing you. The one in the Aleutians.

And it wasn't even that much different from the real thing, IIRC. Some things between the results were identical, I think? Which feeds my belief that sync bugs are related to different RNG seeds. Like if you needed a 3 or higher on a six-sided die to "hit", and the sync bug caused the die roll in mine to be a 6 and in yours to be a 4 - there was a hit in both cases. And maybe it was almost impossible for some air unit or other to fail their morale check on an air strike, so it flew in both instances. Things of that nature.
User avatar
Bullwinkle58
Posts: 11297
Joined: Tue Feb 24, 2009 12:47 pm

RE: sync bug

Post by Bullwinkle58 »

ORIGINAL: Lokasenna

And it wasn't even that much different from the real thing, IIRC. Some things between the results were identical, I think? Which feeds my belief that sync bugs are related to different RNG seeds. Like if you needed a 3 or higher on a six-sided die to "hit", and the sync bug caused the die roll in mine to be a 6 and in yours to be a 4 - there was a hit in both cases. And maybe it was almost impossible for some air unit or other to fail their morale check on an air strike, so it flew in both instances. Things of that nature.

I think the only thing different was the result of the LCU combat. In my replay I lost. In the real one I won. It seems to me, based on years of reports, that synch bugs most often are in a naval battle. Land seems more rare.
The Moose
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

I've played about 1,800 PBEM turns as Japan and I've never had a sync bug show a negative result for the Japanese and then turn out better during the turn. It was always a bad Allied result in the game with Jocke, I don't remember having seen one at all in the official patch game with Torsten, and in this game it's always been a bad Allied result for me. Maybe I'm just lucky as Japan!?! [:D]

This game it was getting to the point where it happened in 50-70% of turns at various points in the game. The several turns since we restarted the computers more often have had none. We'll see!

Maybe also my machine is just crap compared to what most players use and that has some affect. I mostly use a Mac but play on an old broken down Toshiba with three keys missing. [:)]
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

ORIGINAL: Bullwinkle58

ORIGINAL: Lokasenna

And it wasn't even that much different from the real thing, IIRC. Some things between the results were identical, I think? Which feeds my belief that sync bugs are related to different RNG seeds. Like if you needed a 3 or higher on a six-sided die to "hit", and the sync bug caused the die roll in mine to be a 6 and in yours to be a 4 - there was a hit in both cases. And maybe it was almost impossible for some air unit or other to fail their morale check on an air strike, so it flew in both instances. Things of that nature.

I think the only thing different was the result of the LCU combat. In my replay I lost. In the real one I won. It seems to me, based on years of reports, that synch bugs most often are in a naval battle. Land seems more rare.

I was getting them with land battles in China almost every time there was an attack. The Allies always didn't like the official result.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

ORIGINAL: Panjack

I encounter the sync bug about 1 out of 4 replays.

So I've made up a story to explain this. It might be true. It might not be true.

My story: although in theory such a problem can be caused by many things, I think it most reasonable to assume the sync bug is generated by the game code itself. I'm guessing some relic random process introduced for testing purposes was accidentally left in some set of code that gives different outcomes from the same random number seed when that particular set of code is invoked.

As in the replay you can have one event out of sync but then later events be "correct," this suggests the game uses the seed to generate a main sequence of pseudo-random numbers that are then passed long to subroutines that use the next random number in line as the seed for its own random process. One of these subroutines must have a problem in it. But once that subroutine is complete, the game then just goes back to pick from the next random number from the main random number sequence and the fact that something went, for want of a better term, "wrong" with one subroutine doesn't infect later results from the replay.

That some people have this problem, and other others, and some people who do have this problem encounter it more frequently implies (if I'm right about the above) that some people do activities (more than others) in their game that lead to this misbehaving set of code to be invoked (more than others).

Of course, adding a complication to it all, although the Japanese player's results are the "official" results we can't assume that the results generated by that player hasn't been affected by this "bad" code. Nor can we assume that those who don't see the sync bug are not actually having this happen: it might be the bad code has the number of shells fired by some ships be 10 for J player and 12 for A player but due to the low probability of hits (and the fact the outcome is discrete, 0, 1, 2) in most circumstances the expected number of hits is only 1 in both cases so that both the J and A players see a single hit in most cases although the outcomes were actually different for the two players (different number of shells fired).

So that's my story, or tall tale depending on your point of view!

Without a doubt, the sync bug is a complicated beast (to mix metaphors).

In a game with random generators applied to so many actions, it's going to be hard to tell which result is real. The fact that most sync bugs show a more positive Allied result in the replay and a less positive Allied result in the turn file is interesting to me, although I have no idea why this might be the case.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
Lokasenna
Posts: 9303
Joined: Sat Mar 03, 2012 3:57 am
Location: Iowan in MD/DC

RE: sync bug

Post by Lokasenna »

ORIGINAL: obvert

In a game with random generators applied to so many actions, it's going to be hard to tell which result is real. The fact that most sync bugs show a more positive Allied result in the replay and a less positive Allied result in the turn file is interesting to me, although I have no idea why this might be the case.

I'm going with small sample size and anecdotes as the reason [:)].
User avatar
Bullwinkle58
Posts: 11297
Joined: Tue Feb 24, 2009 12:47 pm

RE: sync bug

Post by Bullwinkle58 »

ORIGINAL: obvert

I've played about 1,800 PBEM turns as Japan and I've never had a sync bug show a negative result for the Japanese and then turn out better during the turn. It was always a bad Allied result in the game with Jocke, I don't remember having seen one at all in the official patch game with Torsten, and in this game it's always been a bad Allied result for me. Maybe I'm just lucky as Japan!?! [:D]

This game it was getting to the point where it happened in 50-70% of turns at various points in the game. The several turns since we restarted the computers more often have had none. We'll see!

Maybe also my machine is just crap compared to what most players use and that has some affect. I mostly use a Mac but play on an old broken down Toshiba with three keys missing. [:)]

As I understand the issue (!!!) the Japan player always sees truth. In the replay and in his CR. The Allied player might see differences.
The Moose
Panjack
Posts: 463
Joined: Sun Jul 12, 2009 2:08 am
Location: Southern California

RE: sync bug

Post by Panjack »

ORIGINAL: obvert
In a game with random generators applied to so many actions, it's going to be hard to tell which result is real. The fact that most sync bugs show a more positive Allied result in the replay and a less positive Allied result in the turn file is interesting to me, although I have no idea why this might be the case.
Perhaps it's an intentional "bug" designed by the game-makers to give Allied players just a taste of hope, albeit temporary, so they keep on going during the first bad months!

In my case though (we're talking really small sample size here), the major sync problems I remember are 50-50 for which side turned out better in the replay (than in the game save). Your experience might be due to, as Lokasenna says, small sample size but it also might be due to the possibility you have stronger memories for good outcomes rather than for bad outcomes. That is, you have a healthy psychology!
User avatar
Richard III
Posts: 713
Joined: Mon Oct 24, 2005 5:16 pm

RE: sync bug

Post by Richard III »


Not sure this is a sync bug.

I`m seeing consent and increasing "chattering" or "jumping" during the combat replay, usually at the beginning of running it, usually associated with a text sighting report of, or combat with, IJ Naval or air units ? Especially with it seem a USN sub or STF attack attempt.......

PBEM as Allies, Scen. 2 with the 09 Beta.
“History would be a wonderful thing – if it were only true.”

¯ Leo Tolstoy
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

ORIGINAL: Lokasenna

ORIGINAL: obvert

In a game with random generators applied to so many actions, it's going to be hard to tell which result is real. The fact that most sync bugs show a more positive Allied result in the replay and a less positive Allied result in the turn file is interesting to me, although I have no idea why this might be the case.

I'm going with small sample size and anecdotes as the reason [:)].

Could be, but not just my anecdotes at least. [:)]

I've read this about sync bugs for a long time, and heard from others the same experience I'm now seeing on the Allied side. I just don't know what causes them, what might be working solutions players have figured out, and I have no stake in it either way. Just trying to get more info. If you're sure of your bad Japanese result, I believe you 100%. I just haven't experienced it, and I I've not had Nick mention any from his side although it seems there should have been with the number we've been having.

So that seems significant to me even if it's 'mostly' worse Allied results. Why would that be the case?

"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
EHansen
Posts: 360
Joined: Fri Dec 06, 2013 1:31 am

RE: sync bug

Post by EHansen »

I have had one known out of sync game turn. I am Allies and I got a favorable result from the "real" turn and an unfavorable result for the Allied relay file.
Interesting enough my opponent stated that his TFs did not move as he ordered, but they did in the Allied replay.
User avatar
witpqs
Posts: 26376
Joined: Mon Oct 04, 2004 7:48 pm
Location: Argleton

RE: sync bug

Post by witpqs »

On the Allied side, I've seen a few sync bugs. Obviously there could be something minor every turn and I would not know the difference, but I think we've only had a few. I use the ESC key all through the replay, so I doubt that the Allied player using it is causing sync bugs or I would see them all the time. I'm only offering this because I heard someone suggest that when a player (or maybe only the Japanese player?) uses the ESC key that it causes the sync bug, and I am trying to provide a data point, meager though it might be.

Suggestion for MichaelM: Would it be practical to write out a "sync" file or whatever you might want to call it, that would contain some number that should be the same for both players if there is NO SYNC BUG that turn? That way players would know for sure that a replay was solid. Maybe take a hash of the ending value of the random seed or something? The 'j' version of the file (supplied by IJ player) could be compared to the 'a' version (when the Allied player generates it). Or, the 'j' number could be stored in the replay file itself. Then when the Allied player runs the replay, at the end the stored 'j' number gets compared to the newly generated 'a' number. If the same cool. If different, the Allied player gets a message that a sync bug has occured Just an idea.
User avatar
littleike
Posts: 182
Joined: Wed Oct 03, 2007 10:25 am

RE: sync bug

Post by littleike »

Never played PBEM but i read many times about this bug.

Game options and preferences are always exactly the same for both players?
Are these informations controlled by software (stored in the saves and restored when the opponent load a turn file) or can be freely changed by players?
Game map and add ons are the same?



Three jet pilot useless things: Sky above you, airstrip behind you and half second ago.
User avatar
obvert
Posts: 14051
Joined: Mon Jan 17, 2011 11:18 am
Location: PDX (and now) London, UK

RE: sync bug

Post by obvert »

ORIGINAL: EHansen

I have had one known out of sync game turn. I am Allies and I got a favorable result from the "real" turn and an unfavorable result for the Allied relay file.
Interesting enough my opponent stated that his TFs did not move as he ordered, but they did in the Allied replay.

Very interesting. Good to know. Maybe all of those times I thought I wasn't having sync bugs, but actually was pissed off my orders weren't followed ... [;)]
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
Post Reply

Return to “Tech Support”