bugfix(crc): Fix spurious mismatches for disconnected players at low CRC intervals#2796
Merged
xezon merged 2 commits intoJun 18, 2026
Merged
Conversation
ae476f1 to
7fbffaf
Compare
7fbffaf to
e2bd3ef
Compare
e2bd3ef to
872efd3
Compare
Skyaero42
reviewed
Jun 15, 2026
xezon
reviewed
Jun 15, 2026
872efd3 to
b9e744e
Compare
Mauller
approved these changes
Jun 16, 2026
Mauller
left a comment
There was a problem hiding this comment.
Looks okay to me, i don't think it can be much simpler since zero can be a valid CRC funnily enough for crc32.
xezon
reviewed
Jun 16, 2026
xezon
reviewed
Jun 16, 2026
xezon
left a comment
There was a problem hiding this comment.
This change assumes that all player disconnects are perfectly in sync. Is this guaranteed?
| Bool sawCRCMismatch = FALSE; | ||
| Int numPlayers = 0; | ||
| DEBUG_ASSERTCRASH(TheNetwork, ("No Network!")); | ||
| if (TheNetwork) |
There was a problem hiding this comment.
For a follow up, consider moving the Network test before the above TheNetwork->sawCRCMismatch()
xezon
approved these changes
Jun 18, 2026
|
Needs replicate in Generals |
Author
|
Replicated in Generals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a small to fix to avoid spurious mismatches that can occur if the following conditions are met simultaneously:
As players disconnect they stop sending data to other players to speed up the disconnect process. If that coincides with a decrease in runahead, it's possible that a single execution frame contains e.g. 5 CRC messages per player, but fewer for the disconnecting player. The game only checks a player's most recent CRC value. This would lead to a mismatch because the most recent CRC value for the disconnecting player is not up-to-date with the other (connected) players.
You can see it mismatch here as the player disconnects (this was with a special test build):
https://www.youtube.com/live/RM27jEkTGfw?t=2099s
https://www.youtube.com/live/V_l-q9Y-DmA?t=7576s
Here's a replay for the second match. The mismatch happens at frame 3836 because of player index 6 disconnecting from the game: MM NED.zip
I have no idea how to reproduce this in a test environment, unfortunately.
TODO: