Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Sync Issues #4271

Closed
wzdev-ci opened this issue Dec 30, 2014 · 122 comments
Closed

Sync Issues #4271

wzdev-ci opened this issue Dec 30, 2014 · 122 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_Needs reevaluating for current version (3.2.3) type_bug | by effigy


I've played a couple games where a joiner lost sync.

I've attached the logs.


Issue migrated from trac:4271 at 2022-04-16 11:48:28 -0700

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file netplay-20141230_205252.log (24.6 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p5.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p5.txt (237.5 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file WZlog-1230_190728.zip (468.7 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p2.txt (237.5 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p3.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p0.txt (237.5 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p1.txt (237.5 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p4.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p3.txt (237.5 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p2.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p4.txt (237.3 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync202_p4.2.txt (237.3 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p0.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy uploaded file desync102_p0.2.txt (241.9 KiB)

@wzdev-ci
Copy link
Contributor Author

effigy commented


Btw, host was running Windows 7 and the map was DA-Julia-6-v1 :)

@wzdev-ci
Copy link
Contributor Author

@wzdev-ci
Copy link
Contributor Author

NoQ commented


In the first log, player 4 gets zero power at start, and on gameTime==202 we also see that the number of 1300 is actually there, but not pre-multiplied by 2^32^:

-	[syncDebugEconomy] < economy0 = 5583457484800
-	[updatePlayerPower] updatePlayerPower0 5583457484800->5583457484800
-	[syncDebugEconomy] < economy0 = 5583457484800
+	[syncDebugEconomy] < economy0 = 0
+	[updatePlayerPower] updatePlayerPower0 0->1300
+	[syncDebugEconomy] < economy0 = 0

Endianness issues (??)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

KlassKill commented


if you look at the file desync102_p4.txt you will see that they show

[setPower] setPower0 0->0
[setPower] setPower1 0->0
[setPower] setPower2 0->0
[setPower] setPower3 0->0
[setPower] setPower4 0->0
[setPower] setPower5 0->0

and everyone else has [setPower] setPower# 0->1300.
player 4 didn't start with the same power as everyone else. I am trying to find where this is set now.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

KlassKill commented


I think I found it in rules.js there is a line that says setPower(1300, playnum);
OP was this a no base game?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

KlassKill commented


does anyone know if only the host runs these scripts or does each player run their own scripts?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

effigy commented


eek... I think there are two games in that log, and I'm going to guess I hosted with no bases... but, as I remember it, it was player 5 that was showing desync in the second game, at least.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

bendib commented


Me and NotANick are having this issue too, so are a lot of other people.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

bendib commented


Replying to Warzone2100/old-trac-import#4271 (comment:5):

does anyone know if only the host runs these scripts or does each player run their own scripts?
Each player runs their own version of rules.js.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 1, 2015

KlassKill commented


Replying to Warzone2100/old-trac-import#4271 (comment:7):

Me and NotANick are having this issue too, so are a lot of other people.
attach your logs as the OP did
we tried 2 4p games and did not have sync issues

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2015

KlassKill commented


we played a 8p lan game that lasted 6 hours with no sync issues with this map http://addons.wz2100.net/256
if we would change rules.js then it would always desync when one person put setPower(3000, playnum); and the rest had setPower(1300, playnum);

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2015

effigy uploaded file desync202_p3.2.txt (118.5 KiB)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2015

effigy uploaded file desync202_p0.2.txt (118.7 KiB)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2015

effigy commented


uploaded some new desync files, where multiple players had desync.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2015

crab_ commented


Hey. I played 7 MP games this day. Sync issues were in each game. Message 2+2=5 was displaying constantly with different players and different maps.

@wzdev-ci
Copy link
Contributor Author

klasskill commented


Replying to [comment:47 Tzeentch]:

So basically I've got no update but I take it you are asking as this is still being personally experienced?

no, that is the thing, I haven't seen this except when playing with random players.
I was wondering if you discovered how this is triggered since nobody has any information on what do we do with the desynch logs and how do we use those to figure out anything like in ticket #4158 request for information.

@wzdev-ci
Copy link
Contributor Author

Tzeentch commented


"No, he is going to fix it. Positive thinking!"

haha, Guess I have no choice :) - Let me get at least some things out the way then revisit this probs few weeks.

"what do we do with the desynch logs" - I can't really answer that part as well as other admins/devels.
maybe needs to be some FAQ or knowledge base stating the steps to take and why.One reason is from players cheating,(I ran into this a few times, including a guy explicitly offering in the lobby chat to do it) and possibly other faults already discussed. what platform you runnning on? Are you able to make any local tests? Try this one for us- https://www.youtube.com/watch?v=4gJLJdF4g-U and discussed in http://forums.wz2100.net/viewtopic.php?f=6&t=11261

@wzdev-ci
Copy link
Contributor Author

vexed commented


Also see ticet #4083 for more sync stuff.

@wzdev-ci
Copy link
Contributor Author

Tzeentch commented


thanks, I managed to get virtuals working so setting up windows 7 64 bit and xp SP3 32 bit to attempt replication in same fashion

@wzdev-ci
Copy link
Contributor Author

Tzeentch uploaded file Screenshot-4.png (764.8 KiB)

win and xp
Screenshot-4.png

@wzdev-ci
Copy link
Contributor Author

Tzeentch commented


I dont know how people get this to work, on XP SP3 I was able to find old WZ links to DL from as I couldn't open sod all using the old IE. Firefox worked, got 3.1.2 and on win 7. I cannot get them to run to diagnose with. The messages attached are from both virtuals shown in the screenshot.

Does this mean this won't work in the virtual? Done all latest updates on both. Maybe I should use opengl on windows?

@wzdev-ci
Copy link
Contributor Author

Tzeentch commented


got win 7 to launch game then it crashes, thinking this is not easy to even do. Is this due to some issue with XP? does OS even matter here I wonder. With XP being no longer supported we should probs state the same and maybe disallow it's installation if its on XP?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2015

klasskill commented


see #4304 that guy thinks he knows the problem

@wzdev-ci
Copy link
Contributor Author

Tzeentch commented


He hasn't, no other proof apart from those attempting to cheat. I have another Q. "Look at ​https://github.com/Warzone2100/warzone2100/search?utf8=%E2%9C%93&q=setPrecisePower
and you will see that absolutely nothing uses setPrecisePower(), and that can't be called via WZ script or JS script, there are no hooks to it." - why do we have a function that doesn't do anything? Why not remove this so it cannot be modified and therefore reduce people trying to hack the existing unfinished code in place. If you wanted to use it in future then simply add it in when you do so surely?

Tz

@wzdev-ci
Copy link
Contributor Author

klasskill commented


I see no reports of sync problems in newest version.
what changed?

@wzdev-ci
Copy link
Contributor Author

vexed commented


Nothing.

Seems to me that it was either user cheats, map cheats, or something that is so random that it is going to take someone who is very, very patient to find the issue.

Until we can replicate this, it is pretty much impossible to come up with a logical fix.

I am not even sure it is worth keeping this ticket open still.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment3 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment1 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment2 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 commented


02 April downloaded game, same did my friend and brother, we play at version 3.1.3. We play 03 April at standard map first Sk-RollingHills-T1, second Sk-RollingHills-T3, always without base at start.
I use Windows 7 x64, my brother too, my friend use Windows 8.

At Sk-RollingHills-T3 around 20-40 minutes of the game my friend got desync and because of that disconnected(game write to him that i leave game, for me that he done that), after that, after ~10 minutes, we got desync with brother, game write at right-up corner "2+2=5?".
I was the host of the game.

Sorry for my english, its not my native language.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment4 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 changed _comment5 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Samael2500 uploaded file logs.zip (714.1 KiB)

logs of desync 04.04.16

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Tzeentch changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Tzeentch changed _comment1 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

Tzeentch commented


This has been crossing my mind now and again... I'd like to find out as it is bothering me and those players too. Agreed it may be solid though, I reckon we could either keep this open for now and stop adding so many comments or perhaps a new ticket with the facts we now have and can disclude. I'm easy either way.

Thanks Samael, that is good. This desync you have looks different to the others I have seen, even from that log. What were you guys doing at that point just before desync? It looks to me like you built something, then attempted to place something in the exact same location of the same size using each of those (179+1, 9+1), I'm not clear about what this "No turret for template" regards and wonder if it is important in this.

I.e. the log files contain these relevant lines: (with my slight comments appended) (I read all log files)

info |01:18:38: [structSetManufacture:994] Assert in Warzone: structure.cpp:994 (!psTempl || (validTemplateForFactory(psTempl, psStruct) && researchedTemplate(psTempl, psStruct->player, true)) || psStruct->player == scavengerPlayer() || !bMultiPlayer), last script event: 'N/A'
info |01:18:52: [structSetManufacture:994] Wrong template for player 2 factory, type 16.

info |01:44:38: [structSetManufacture:994] Assert in Warzone: structure.cpp:994 (!psTempl || (validTemplateForFactory(psTempl, psStruct) && researchedTemplate(psTempl, psStruct->player, true)) || psStruct->player == scavengerPlayer() || !bMultiPlayer), last script event: 'N/A'
error |01:47:57: [buildFeature:283] Артефакт(163443) already placed at (179+1, 9+1) when trying to place Артефакт(163691) at (179+1, 9+1) - removing it

error |10:12:56: [intValidTemplate:3336] No turret for template - from the unit creation design menu? (wondering)
error |10:12:56: [recvTemplate:1500] Illegal template received from player 1 - What can cause an illegal template? What happens between clients when an illegal template is created?
error |10:20:11: [checkDebugSync:3679] Inconsistent sync debug at gameTime 2400702. My version has 773 entries, CRC = 0x06ED1BA3.
error |10:20:11: [dumpDebugSync:3611] Dumped player 0's sync error at gameTime 2400702 to file: E:\Users\Samael\Documents\Warzone 2100 3.1\3.1.3\logs/desync2400702_p0.txt
error |10:20:12: [gameTimeUpdate:216] Synch error, gameTimes were: {2400702, 2400702, 2400702, 0}
error |10:20:12: [gameTimeUpdate:217] Synch error, CRCs were: { 0x1BA3, 0x1BA3, 0x14D7, 0x0000}
error |10:20:12: [dumpDebugSync:3611] Dumped player 2's sync error at gameTime 2400702 to file: E:\Users\Samael\Documents\Warzone 2100 3.1\3.1.3\logs/desync2400702_p2.txt
info |10:20:53: [NETrecvNet:1853] Player, (player 1) seems to have dropped/disconnected.
info |10:20:53: [recvPlayerLeft:260] ** player 1 has dropped, in-game!

info |09:33:05: [NETallowJoining:2600] **Rejecting player(192.168.1.1), reason (6). - what is reason (6)?

Worth a look into around "validTemplateForFactory" lines starting 5613? - https://github.com/Warzone2100/warzone2100/blob/master/src/structure.cpp

or... even still - starting line 943 and looking at "/* psTempl might be NULL if the build is being cancelled in the middle */
ASSERT_OR_RETURN(false, !psTempl
|| (validTemplateForFactory(psTempl, psStruct, true) && researchedTemplate(psTempl, psStruct->player, true, true))
|| psStruct->player == scavengerPlayer() || !bMultiPlayer,
"Wrong template for player %d factory, type %d.", psStruct->player, psStruct->pStructureType->type);"

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 3, 2016

vexed commented


Yeah, not sure what to do about this ticket.
There isn't really anything new going on here.

As for your comments...
The reason 6 is wrong password, so that is nothing.
The invalid turret was a faulty check (but, wouldn't cause a desync), but, that is now fixed in 3.1.4.

His specific issue is, a droid tried to build something, ([actionDroidBase] 161059 does DACTION_BUILD) however, ([fpathSetBlockingMap] blockingMap(2409702,3,3,0) = 79011671 4932A055) is different between the machines, THAT caused the desync, no idea what was built, or where. Somehow, we need to get that information.

For the logs, what sticks out the most is this ** info |08:38:05: [recvReadyRequest:2106] Host only routine detected for client! **

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Apr 4, 2016

Samael2500 commented


Without coordinates its hard to say who and what build at that time :(
But even with coordinates i can only assume who and what tried to build.
If logs other players can help, i can attach them.

I know that I at that time build AA turrets at hills around left-south starting position.(Player 0 from logs)

My brother at that moment take upper half center of map and build factory and some turrets for defense and some buildings at left-north starting position.(Player 2 from logs)

My friend at that moment tried re-build his base at right-north starting position after some attacks from AI and build some buildings at left-north starting position.(Player 1 from logs)

I will ask my friend what he build at that moment or what he tried to build.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 4, 2016

Cyp changed status from assigned to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 4, 2016

Cyp changed resolution from `` to Needs reevaluating for current version (3.1.5)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 4, 2016

Cyp commented


In master, there was a race condition causing desynch on the last value of «[fpathSetBlockingMap] blockingMap(2409702,3,3,0) = 79011671 4932A055», which is now fixed. Apart from that, I'm not sure if this ticket's desynchs are reproducible in 3.1.5, and I think the main issue had nothing to do with the game (someone using broken versions of Qt libraries, or something?).

@wzdev-ci wzdev-ci closed this as completed May 4, 2016
@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 4, 2016

klasskill commented


you mean this fix? Warzone2100/warzone2100@a25d43d

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 4, 2016

Cyp commented


Replying to [comment:63 klasskill]:

you mean this fix? Warzone2100/warzone2100@a25d43d

Yes, that looks like the one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant