Conversation
The cause of the infamous "Index error writing string table baseline" error appears to be a timing issue between the engine's network message processing, the stringtable encoding, and command processing when adding stringtable entries in OnConfigsExecuted. When the first client connects the map is re-loaded which causes a full refresh, the game's stringtable entries are added at tick 65, the client connection is registered at tick 66, and stringtable entries added in OnConfigsExecuted are registered as being added in tick 67. The engine later calls WriteBaselines with the client's signon tick, and neglects to encode the SM added entries as it considers them from the future. To avoid this, always pass INT_MAX as the current tick when encoding the baseline, so all stringtable entries are included regardless of when they were added. Tested on both Windows and Linux.
Member
|
Are you sure there are no side effects from always passing |
Member
Author
|
It’s definitely fine, for later clients their signon tick is already far in the future than the added entries. |
Member
|
Can we get this in cstrike? |
psychonic
approved these changes
Jul 19, 2019
voided
approved these changes
Jul 19, 2019
Member
Author
As far as I know CS:GO is the only engine branch with this delta stringtable encoding, all the older games unconditionally send the entire table on signon and never again. |
Member
Which is why it should have been in cstrike ;-). |
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.
The cause of the infamous "Index error writing string table baseline"
error appears to be a timing issue between the engine's network message
processing, the stringtable encoding, and command processing when adding
stringtable entries in OnConfigsExecuted.
When the first client connects the map is re-loaded which causes a full
refresh, the game's stringtable entries are added at tick 65, the client
connection is registered at tick 66, and stringtable entries added in
OnConfigsExecuted are registered as being added in tick 67. The engine
later calls WriteBaselines with the client's signon tick, and neglects
to encode the SM added entries as it considers them from the future.
To avoid this, always pass INT_MAX as the current tick when encoding
the baseline, so all stringtable entries are included regardless of when
they were added. Tested on both Windows and Linux.