2025-06-14 04:58 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002733Spring engineGeneralpublic2011-11-21 13:28
ReporterjK 
Assigned ToKloot 
PriorityimmediateSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version84.0 
Summary0002733: Demos don't save per frame sync checksum
DescriptionWithout them it is impossible to reproduce desyncs with demos.
Something very very important to fix desyncs like we have atm.
Additional InformationTried to fix it myself, but I am too unexperienced with the netcode, also they files are spread across the whole tree ... (can't someone collect them all in one folder?).

Btw, the affected file is GameServer.cpp, the netcommand is NETMSG_SYNCRESPONSE & the function is GameServer::CheckSync.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0007605

Kloot (developer)

Last edited: 2011-11-15 11:56

It is still possible (but hard).

If a game desynced, then its demo can/will usually show different evolutions across multiple runs. So the challenge becomes to find the earliest point where multiple runs of the same demo start diverging, by dumping tons of game-state from each run to different files and diff'ing them. Of course you want to do this only in a small neighborhood around the frame the desync was detected (which is logged in demos), or you will be buried under a mountain of data. And if you are unlucky it takes 10 runs to get a demo to produce two game-states, but that's spring-dev life.

~0007611

jK (developer)

I don't want to know if I desync versus myself. I want to know if I desync to the game recorded in the demo!
E.g. when I run the demo in a devbuild with additional commits, and one of those broke the syncness I want to know that!

~0007613

Kloot (developer)

Last edited: 2011-11-17 20:05

Implemented it, no more constant checking for clumps of idle units (or relying on memory) at least to figure out if you are really watching a desynced demo.

Any non-trivial change in synced code will technically break sync though, so this might still be only of limited use (it depends on how extensive the state-hashing is).

https://github.com/spring/spring/commit/5bd294108092d0bf5c8d1fe3f081d55f0c04040c

~0007623

abma (administrator)

three wishes:

1. we need this commit in the release branch :-/ imo the clean way would be: revert the commit in the develop branch and create a new commit in the release branch. (yeah, the release branch already exists way to long....)

2. it doesn't compile on debug2 builds:http://buildbot.springrts.com/builders/full-linux/builds/1992/steps/buildConfig/logs/stdio

/slave/full-linux/build/rts/Game/GameServer.cpp: In member function 'void CGameServer::ProcessPacket(unsigned int, boost::shared_ptr<const netcode::RawPacket>)':
/slave/full-linux/build/rts/Game/GameServer.cpp:1208:8: error: 'demoRecorder' was not declared in this scope

3. it should be runtime-configureable and not at compiletime. win32 builds are release only, so its impossible for users to enable it, when they can't compile.



(i repoened, because i think it makes more sense to discuss it here...)


for 3., i can do that if nobody complains...

~0007624

jK (developer)

It shouldn't be configurable at all, as currently only the host is able to record it.

~0007625

abma (administrator)

seems that it needs more discussion -> meeting (added to agenda, feel free to add/change points there)
+Notes

-Issue History
Date Modified Username Field Change
2011-11-15 11:30 jK New Issue
2011-11-15 11:33 jK Summary Demo's don't save sync checksum => Demos don't save per frame sync checksum
2011-11-15 11:33 jK Additional Information Updated
2011-11-15 11:50 Kloot Note Added: 0007605
2011-11-15 11:56 Kloot Note Edited: 0007605
2011-11-15 15:40 jK Note Added: 0007611
2011-11-15 18:53 Kloot Note Added: 0007613
2011-11-15 18:56 Kloot Note Edited: 0007613
2011-11-15 22:40 Kloot Note Edited: 0007613
2011-11-15 22:40 Kloot Status new => resolved
2011-11-15 22:40 Kloot Fixed in Version => 84.0
2011-11-15 22:40 Kloot Resolution open => fixed
2011-11-15 22:40 Kloot Assigned To => Kloot
2011-11-17 19:40 abma Note Added: 0007623
2011-11-17 19:40 abma Assigned To Kloot =>
2011-11-17 19:40 abma Status resolved => new
2011-11-17 19:44 jK Note Added: 0007624
2011-11-17 20:05 abma Note Edited: 0007613
2011-11-17 20:11 abma Note Added: 0007625
2011-11-21 13:28 Kloot Status new => resolved
2011-11-21 13:28 Kloot Assigned To => Kloot
+Issue History