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

RE: sync bug

Post by obvert »

ORIGINAL: 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.

This seems like it would be really helpful, if practically possible.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
User avatar
Richard III
Posts: 714
Joined: Mon Oct 24, 2005 5:16 pm

RE: sync bug

Post by Richard III »

ORIGINAL: 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.


That would go a long way to stopping these odd reoccurrences ...IMO.
“History would be a wonderful thing – if it were only true.”

¯ Leo Tolstoy
User avatar
Lokasenna
Posts: 9304
Joined: Sat Mar 03, 2012 3:57 am
Location: Iowan in MD/DC

RE: sync bug

Post by Lokasenna »

ORIGINAL: Richard III

ORIGINAL: 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.


That would go a long way to stopping these odd reoccurrences ...IMO.

A simple checksum of the combatreport.txt could suffice.
User avatar
witpqs
Posts: 26376
Joined: Mon Oct 04, 2004 7:48 pm
Location: Argleton

RE: sync bug

Post by witpqs »

ORIGINAL: 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?
The critical options are controlled by the Japanese player, and stored in the save file. As an Allied player you can change things that only affect the display during your own orders phase, like having air unit range circles displayed for example, but they will change back to whatever the Japanese players has next time; so you just hit a hot-key to change them again, which you probably do a few times during each turn anyway.

Things like the map graphics (which are the maps you see on-screen), pwhex files (which are the maps the computer uses in it's processing), etc. have to be the same. Some are checked, like the pwhex files so that you get a message if different. The map graphics files are not checked so you will see a different picture than your opponent, but it's pretty easy to make sure you are using the same files.
User avatar
witpqs
Posts: 26376
Joined: Mon Oct 04, 2004 7:48 pm
Location: Argleton

RE: sync bug

Post by witpqs »

ORIGINAL: Lokasenna

ORIGINAL: Richard III

ORIGINAL: 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.


That would go a long way to stopping these odd reoccurrences ...IMO.

A simple checksum of the combatreport.txt could suffice.
That would work if they are supposed to be identical. [:)]
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: sync bug

Post by michaelm75au »

ORIGINAL: witpqs

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.
I have during some 'sync' testing created a file of all the randoms used in sequence for the turn. I then used that file as the source of random numbers for the replay. The issue is that suddenly a different set of code gets run for some reason and thus the random numbers are 'out of sync'.
Michael
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: michaelm

ORIGINAL: witpqs

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.
I have during some 'sync' testing created a file of all the randoms used in sequence for the turn. I then used that file as the source of random numbers for the replay. The issue is that suddenly a different set of code gets run for some reason and thus the random numbers are 'out of sync'.

Thanks Michael.

Could the sync problems be caused by the actions of a Japanese player in the replay hitting escape or leaving the program window to use other programs like image capturing, notes and other stuff? Are there any other things to look out for that might be causing the sync difference to occur?

Thanks!
"Success is the ability to go from one failure to another with no loss of enthusiasm." - Winston Churchill
Post Reply

Return to “Tech Support”