Page 2 of 2

RE: sync bug

Posted: Tue Sep 23, 2014 11:12 am
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.

RE: sync bug

Posted: Tue Sep 23, 2014 11:39 am
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.

RE: sync bug

Posted: Tue Sep 23, 2014 12:20 pm
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.

RE: sync bug

Posted: Tue Sep 23, 2014 12:33 pm
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.

RE: sync bug

Posted: Tue Sep 23, 2014 12:34 pm
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. [:)]

RE: sync bug

Posted: Wed Sep 24, 2014 8:06 am
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'.

RE: sync bug

Posted: Thu Sep 25, 2014 5:05 am
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!