MantisBT - VCMI
View Issue Details
0002459VCMIOtherpublic2016-08-19 20:272016-09-16 03:20
SXX 
SXX 
normalmajoralways
resolvedfixed 
0.98g 
0.99 
0002459: Desync found! - Work toward full sync of save games
At moment after week with memcheck we fixed all uninitialized value reports that related to serializer as well as some leaks. End goal is to make sure save games are in sync between client and server.

Currently we found few important desync points:

CGHeroInstance::SecondarySkillsInfo::rand. First one occur probably since there might be some not initialized heroes on map and so we just set same initial seed for SecondarySkillsInfo rand.

Another one is CGameState::rand. First issue here is at least:
CGameHandler::init. There is code of Beegee that randomize server-side gamestate. Though even with that commented server heavily use rand from GS and client doesn't so it's not easy to fix.

Last one is static "CGObelisk::visited;" in CMap serialize even on maps that don't have obelisks. Though I didn't have chance to investigate this one since.
No tags attached.
parent of 0002383closed SXX AI infinitely loops with this save - secSkill desync 
parent of 0002460closed SXX CGameHandler::setFormation need proper netpack with applyGs 
parent of 0002462closed SXX PlayerState::daysWithoutCastle desync due to CGameHandler code 
parent of 0002463resolved SXX CGameHandler::levelUpHero desync SecondarySkillsInfo RNG 
parent of 0002464closed SXX NewStructures::applyCl desync after town appearance changed 
related to 0002168closed SXX Terra incognito 
Issue History
2016-08-19 20:27SXXNew Issue
2016-08-19 20:27SXXStatusnew => assigned
2016-08-19 20:27SXXAssigned To => SXX
2016-08-19 20:27SXXRelationship addedrelated to 0002383
2016-08-19 20:44SXXRelationship deletedrelated to 0002383
2016-08-19 20:44SXXRelationship addedparent of 0002383
2016-08-19 20:59SXXNote Added: 0006574
2016-08-23 03:39SXXRelationship addedparent of 0002460
2016-08-23 04:19SXXRelationship addedparent of 0002462
2016-08-23 05:00SXXRelationship addedrelated to 0002072
2016-08-23 05:00SXXRelationship deletedrelated to 0002072
2016-08-23 05:10SXXRelationship addedparent of 0002089
2016-08-23 22:01SXXRelationship addedparent of 0002463
2016-08-24 00:18SXXSummaryDesync found! - Works towards full sync of save games => Desync found! - Work toward full sync of save games
2016-08-24 00:48SXXRelationship addedparent of 0002464
2016-09-07 22:22SXXNote Added: 0006630
2016-09-11 10:11SXXRelationship deletedparent of 0002089
2016-09-12 00:42SXXNote Added: 0006648
2016-09-12 00:42SXXStatusassigned => resolved
2016-09-12 00:42SXXFixed in Version => 0.99
2016-09-12 00:42SXXResolutionopen => fixed
2016-09-16 03:20SXXRelationship addedrelated to 0002168

Notes
(0006574)
SXX   
2016-08-19 20:59   
So this one affect at least:

* Heroes skills as posted above.
* Any object created by NewObject::applyGs
(0006630)
SXX   
2016-09-07 22:22   
PR for most of issues:

https://github.com/vcmi/vcmi/pull/209 [^]
(0006648)
SXX   
2016-09-12 00:42   
All I find should be fixed with PR209 merge:
https://github.com/vcmi/vcmi/commit/2543e068acd7e91ad4234ddfd7622c5e4fac664f [^]

Will add related entries to this one in case I find out something else.