The issue was recently brought back into spotlight in a thread about another bugfix.
EdteOfChaos2 wrote:@h3rmit If you're changing the map, I'd also suggest simply removing Lanya from the taverns and -random pool (assuming it's too hard to fix the crashing, this is the next best option)
Q. Lanaya has been broken for years. Why is she still in the map?
Lanaya works correctly in all other versions of Warcraft III, so I've been hesitant to completely remove the hero. After all, this map version is the most faithful to the original 6.83d released by IceFrog, and I'd like to keep it that way.
Q. Why hasn't it been fixed yet?
Crashing (like Phantom Lancer) would have been easy to test and fix. Unfortunately, in the case of Lanaya, it's not a crash - it's a "desynchronization" (or "desync" in short). It's a difference in the game state between players, and it's the sole responsibility of Warcraft III, not the map.
Warcraft III was designed in an era of slow internet connections. In an effort to accommodate this, it has a decentralized design, where every player keeps the entire game state locally (e.g. HPs, mana, positions of all units, etc), and only their actions are transmitted to the other players (e.g. "click at location X,Y"). Each player's computer is running the exact same code (same Warcraft and map) and is expected to produce the exact same results as the others, given the exact same input of actions. To ensure that all players are aligned, Warcraft III periodically sends a small checksum of the entire game state to the other players.
Patch 1.30.1 must have broken something like a spell, attribute, or random number generator, causing it to be calculated in a non-deterministic and unpredictable way, producing different results in different computers - hence the "desynchronization" between players. The bot disconnects the players cause they have drifted off into a different universe, seeing a different world unfold. It's a sort of a butterfly effect. If in one universe I receive 99 damage and survive, but in the other universe it's 101 damage and I die, then history will start changing course.
Due to their nature, desyncs cannot be reproduced and tested locally in Single Player. To even witness the bug with my own eyes and verify it, I had to pick Lanaya in a Multiplayer game and get reported for it.
The process of narrowing down the bug is completely blind and solely relies on trial and failure. In every iteration, I have to:
- Study the map's code related to Lanaya and make a random guess about which of the otherwise perfect-looking commands could be secretly broken.
- Try removing it and re-package the map.
- Deploy it on a test bot, join a lobby and wait for hours until a player shows up to test.
- Go back and forth to the current public game's lobby, in hopes I can chat and find a volunteer or two.
- Play the test game for quite some time to determine if it desyncs or not. The appearance of the desync is completely random and doesn't easily happen with just 2-3 players.
Q. So what's the current status?
Thanks to some tests I ran with the help of a few volunteers (kobz, Mush-), I was able to pinpoint the issue to be related to Lanaya's Refraction bonus damage. This overly compicated spell seems to rely on something that is broken in Warcraft III 1.30.1, but works fine in all other versions. I haven't yet found what it is, specifically.
So the current options are:
- Run another ~100 tests with volunteers until the exact cause of the problem is uncovered, make a fix and re-run a few tests to verify that the fix is stable.
- Add a Warcraft III version detection and nerf Lanaya by removing her Refraction bonus damage if the Warcraft's version is 1.30.1. But then nobody will ever bother again and the bug will remain there forever.
Completely removing Lanaya from the map isn't really an option, and it won't provide any actual benefits at the present.
I'd appreciate to hear everyone's thoughts on the matter here, and not be randomly asked in lobbies or in-game about it.