Author Topic: Desync caused by update?  (Read 1608 times)

Offline Zebreu

  • Newbie Mark II
  • *
  • Posts: 12
Desync caused by update?
« on: November 21, 2012, 10:23:26 am »
Hey,

A friend and I have been playing AI War for more than a year now and have been playing a bit more often lately, and we saw that dreaded DESYNC error twice already.

 The first time it happened when we updated frequently just before the official release of Ancient Shadows, and yesterday it happened in a different game (we had to stop playing the other one) after we updated the game to 6.007-8. In both games, however, there is a massive amount of ships (in the Galaxy Stats panel, it indicates 31 000 enemy ships, but we know that in a planet there's a bunch of carriers with 53 000 ships inside them... we play 9/9 with an AI Progress of 500, going for the Fallen Spire alternate victory). There's no lag in the game, though, apart from when a few thousand ships attack a planet, but even then it's fairly smooth.

 So we're wondering if updating when there's a LOT of ships is bad? Because we also just finished a game where the AI Progress was kept at 60 and we never had a problem with all the updates.

Yesterday, we just had to load a previous save file so it was fine, but once we were both in the game, the message "Waiting for players" was there for a long time for both of us.

The save file that with the desync is attached, but I guess I'll wait to see if our most recent save file also produces a desync before opening a mantis ticket (and my friend isn't online now so I would have to wait for his save file anyway, as per the instructions for desync errors).

« Last Edit: November 21, 2012, 10:30:23 am by Zebreu »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Desync caused by update?
« Reply #1 on: November 21, 2012, 10:43:36 am »
Welcome to the forums :)  Sorry about the troubles, but thanks for letting us know; I wasn't aware of any outstanding desync issues at this point.

Are there steps to reliably reproduce the desync from the save you attached?  Or does it just happen at some random time in the future?

We fixed one recently related to carrier-popping, but it sounds like you're still hitting this in the latest beta.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Zebreu

  • Newbie Mark II
  • *
  • Posts: 12
Re: Desync caused by update?
« Reply #2 on: November 21, 2012, 01:13:47 pm »
It happens just as my friend enters the game. There's a full-game sync when he joins the game, and then he can see the game, with a "Waiting for players" displayed for maybe 20 seconds (which is unusual in our other games, it's generally very fast, but then, there is also much fewer ships), and then the "DESYNC" message is displayed.

The numbers in the UI, like the Threat number, are different for him (when there's a desync), so there's also this anomaly.
« Last Edit: November 21, 2012, 01:34:21 pm by Zebreu »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Desync caused by update?
« Reply #3 on: November 21, 2012, 03:49:28 pm »
Ok, thanks, I can reproduce it, so I think it won't take too long to fix; just gotta narrow down what they're doing differently.  I'm 90% sure it's that the carrier deployment is happening on one and not on the other (or happening differently, anyhow) at the very beginning after the load.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Desync caused by update?
« Reply #4 on: November 21, 2012, 05:05:26 pm »
Ok, this is actually a really old bug (pre-5.0, I believe) in the game-load code; it has to do some of the recalc logic on each unit but specifically isn't supposed to do certain parts of it.  Like the part that can trigger carrier deployment :)  It's just pretty rare that someone would save the game the very instant a carrier was about to deploy, etc.

It so happens that in this case the host would deploy one carrier during load, which would not actually generate units since units cannot be created that way during game load, and then the client would deploy a second carrier when it read in the game data (it would also not actually create any units).  So the client would wind up with one fewer carrier than the host and it's a slam-dunk desync.

Anyway, that's fixed in 6.009 which is out now.  I tested for a while with your save with both the "natural" carrier deployments and force-popping some of the carriers.  Much delightful Heavy Beam Cannon fire (and accompanying explosions) was seen, but no desyncs once that bug was fixed, so I think you should be good to go :)

Let me know if you run into anything else, and thanks for this report; very good to have this one fixed.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Zebreu

  • Newbie Mark II
  • *
  • Posts: 12
Re: Desync caused by update?
« Reply #5 on: November 21, 2012, 05:21:39 pm »
Oh wow, thanks for the explanation (I also program, so it's always nice to know what things are happening under the hood) and for the quick fix!

(A bit like a Schrödinger's Carrier, haha)
« Last Edit: November 21, 2012, 05:23:19 pm by Zebreu »