Seeking help narrowing desync cause

Desync is solved!

Original notes

Bug in our code.



Memory hacking of exe for cheaters, or sending modified packets.



Modified dat file (however the game should prevent a MP game from launching in this case).



Different RMS and/or scenario file (real world maps use both) -- but the game checks for these too prior to launch.



Game does NOT check for modded AI files, and would almost certainly cause an early game desync if the appropriate AI was involved. But I've also heard that AI mods don't technically work right now, so we'll be checking this out.



check for modded AI files, and would almost certainly cause an early game desync if the appropriate AI was involved. But I've also heard that AI mods don't technically work right now, so we'll be checking this out. Language specific differences. We've encountered an desync in the distance past because script tags used to be in the language file and certain languages modified them, so mixing languages would trigger a desync. For example: Translating HUGE_MAP in Spanish to something else and mixing Spanish with English would cause the Spanish version to fail to find the right map size and the game would desync because the Spanish player generated a different sized map than HUGE_MAP.



Exit logic, the way people leave a game.



Possibility another player may have been in a different mode prior to the game that might have escaped certain data from being reset.

Report info about all players - dat/scenario/rms info - as well as all active mods.

Report game settings (map, size, victory conditions, player civs, etc.)

Log info about when AI commands have been issued (in case of AI players in game)

As well as existing info such as logs and replays, and the desync logs that are generated.

The desync was a result of team matches where flares were used. The flares would corrupt objects 1-8 which were almost always trees. Corrupted trees couldn't be interacted with by the team that saw the flare, but could be for the opposing team. Once a lumberjack evaluated that tree for target selection, the game would desync.I've spent the past week trying to narrow down the common "late game desync" that is currently happening. I've decided to focus on improving diagnostic information for the next patch.But in the meantime, if anyone has any information that could help, please post it here. The sooner I can repro this the better.But judging from the behavior, I suspect there is a bug in some code that is only triggering late game, and frequently hearing "after 2 hours". Very recently I fixed a bug where auto-formation consolidation was triggering an infinite loop, but it would freeze for everyone. Generally this typically could only happen if you were drag selecting a bunch of units and issuing move orders while facing heavy losses, but it was so rare we could never repro it -- but had a replay that triggered it every time. But that wouldn't have caused the desync, but there could be something wrong inside the pathfinder, or perhaps some specific.I've also heard that the way people quit the game can trigger it, but we haven't been able to repro that case either.And we've heard comments that it could be certain mods triggering desyncs.Nothing has panned out so far, so my intention is to continue to gather information and write additional code to generate better diagnostics that can be uploaded to us. Things I'd like to add are:I'm not sure about #3 because I suspect the desyncs are happening without AI. At least I haven't heard anything about "only games with AI" desync.Alright, those are my thoughts, but feel free to chime in with additional information. In the meantime, please try to report specific settings and what people may have been doing when the game desynched. And if you have any ideas of certain behavior that can only happen so late into the game. Basically, this is the worst kind of desync -- to track and get to the root cause.Providing download links to replays after a desync would also be super helpful, because they internally contain almost all the information we need.