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

Desync issues in git/master #4304

Closed
wzdev-ci opened this issue Jul 26, 2015 · 15 comments
Closed

Desync issues in git/master #4304

wzdev-ci opened this issue Jul 26, 2015 · 15 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Althalus


I run into systematic desync problems with master. Since bug #4271 seems specific to 3.1.2 and I haven't found a bug report for master desync issues, I'm creating one.
There seems to be at least one related thread on the forums, but from a while ago (http://forums.wz2100.net/viewtopic.php?f=6&t=11261), plus another one more recent but with very little information (http://forums.wz2100.net/viewtopic.php?f=4&t=12143). I'm not even sure the second thread uses master, but I suspect it.

I'm going to use the comments to report the specific issues I have found, and to report progress on fixing them.


Issue migrated from trac:4304 at 2022-04-16 11:51:09 -0700

@wzdev-ci
Copy link
Contributor Author

Althalus uploaded file desync_template.tar.gz (40.0 KiB)

@wzdev-ci
Copy link
Contributor Author

Althalus uploaded file desync_template_scav.tar.gz (30.0 KiB)

@wzdev-ci
Copy link
Contributor Author

Althalus uploaded file desync_T2.tar.gz (40.0 KiB)

@wzdev-ci
Copy link
Contributor Author

Althalus commented


First issue: templates, and more specifically default templates (for players, its the initial truck and cyborgs). As soon as someone produces an unit from such a template, the game desyncs systematically. On maps with scavenger factories, this means right at the beginning of the game. This looks related to the above-mentioned thread, but if it is the same problem I'm very surprised that the desync occurred so late in the game (poster said 5-10 minutes into the game, while I would have expected as soon as someone builds a truck).

The attachments desync_template.tar.gz and desync_template_scav.tar.gz showthis problem.

I have a partial fix for this issue: always resend templates when scheduling a production, but it doesn't work with scavengers (because when sending templates, they are validated against the player's research, and scavengers do not have the research necessary to build their templates).

@wzdev-ci
Copy link
Contributor Author

Althalus commented


Second issue: starting on tier 2 or 3. Each player only applies upgrades to its own units at the beginning, with means immediate desync as units do not have the same number of body points.

Attachment desync_T2.tar.gz shows this problem.

I don't have a fix, but I plan to look at it whenever I find the time

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2015

klasskill commented


templates are screwy, they can also vanish for no reason but I have not seen a desync from them

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 3, 2015

Althalus commented


Using templates I define myself works, but I get systematic desync when one of the players builds a unit from the default templates. I was under the impression, looking at the code, that using them would always trigger a desync. Could you try a map with scavenger factories (I think Sk-Rush qualifies) and tell me if you get an immediate desync ?

@wzdev-ci
Copy link
Contributor Author

klasskill commented


no, don't get immediate desync

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

Per changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

Per changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

Per commented


Fix: perim/warzone2100@ff14b93

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed owner from `` to Per Inge Mathisen <per.mathisen@gmail.com>

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Per Inge Mathisen <per.mathisen@...> committed [78]


In Warzone2100/warzone2100@78c6926:

#CommitTicketReference repository="" revision="78c69265e3a047aad0e007fb3287cbf251029191"
Human droid production using default templates caused immediate desync.

Solved by not sending templates for factory production any more. Instead
we send the template contents, and create a temporary template in the
factory when the network packet is received. Once the droid is produced,
the temporary template is discarded.

Fixes #4304

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