Input Redundancy Serializer does not check for empty snapshots#573
Open
Riordan-DC wants to merge 1 commit intofoxssake:mainfrom
Open
Input Redundancy Serializer does not check for empty snapshots#573Riordan-DC wants to merge 1 commit intofoxssake:mainfrom
Riordan-DC wants to merge 1 commit intofoxssake:mainfrom
Conversation
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.
Issue: Input Redundancy Serializer does not check for empty snapshots
Input redundancy serializer will send a short history of inputs to the server. When a client connects, if it has yet to generate an input history to send. The serializer sends empty snapshots. The input redundancy decoder on the server doesnt know how to handle empty snapshots and decodes them as normal. This reads garbage memory into the snapshot, most importantly, its tick value. A garbage tick value is often a huge unsigned number. When the server's rollback input history buffer tries to find a place for it, subsequent snapshots (with normal tick numbers) will not be allowed in. The server then stores no input it receives, in therefore cant do rollback, cant send rollback updates, etc.
This PR checks if a snapshot is empty on both ends of the input redundancy serializer and skips or breaks if found.
Criticism: Why don't we just not record empty snapshots. Then we wont have the chance to send an empty snapshot.
Answer: I think the system is designed such that a snapshot is going to be recorded at a tick regardless if anything is inside. A more experienced contributor could help me out here.