• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:29
CEST 20:29
KST 03:29
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team Liquid Map Contest #22 - The Finalists14[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21
Community News
2026 GSL Season 1 Qualifiers11Maestros of the Game 2 announced32026 GSL Tour plans announced13Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid22
StarCraft 2
General
2026 GSL Tour plans announced MaNa leaves Team Liquid Team Liquid Map Contest #22 - The Finalists Weekly Cups (April 6-12): herO doubles, "Villains" prevail Oliveira Would Have Returned If EWC Continued
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament GSL CK: More events planned pending crowdfunding 2026 GSL Season 1 Qualifiers Master Swan Open (Global Bronze-Master 2) SEL Doubles (SC Evo Bimonthly)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
Data needed RepMastered™: replay sharing and analyzer site Gypsy to Korea ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro16 Group A [ASL21] Ro16 Group B
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion Cricket [SPORT]
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Reappraising The Situation T…
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1538 users

Preventing Observer Desyncs

Forum Index > BW General
Post a Reply
tec27
Profile Blog Joined June 2004
United States3702 Posts
February 08 2022 02:03 GMT
#1
In the latest version of ShieldBattery, we've identified and fixed the bug that has been causing desyncs for observers. Since not every tournament is played through ShieldBattery, I thought I'd explain what the underlying cause is and how you can avoid triggering it in games you are observing.

tl;dr: How you can avoid triggering a desync as an observer
  • Observe games through ShieldBattery. We've fixed the bug so it won't occur in any games there.
  • Don't change the player vision settings once a unit requiring detection is in the game (includes both stealth and burrowed units)


Example of this occurring:

(starts around 44:11 in case the embed doesn't get the time)


What's going on

In StarCraft, detection is not removed immediately when the unit/building providing it goes away. You can see this pretty clearly if you kill a detector, there will be brief period where cloaked units can still be seen. When Blizzard added the observer mode, they mostly reused existing game logic to implement the various features, including switching between different player's vision. At some point they decided that the existing logic around stealth units (that detection would be applied after a delay) was unacceptable for observer mode: they wanted switching to a player's vision to apply the detection status immediately.

So, Blizzard wrote code to call a function to update the sprites for those units immediately, thinking it was safe. *But* that code actually calls through to update the "real" detection status for this unit as well (a value used by the game for simulating actual game logic). If this value differs from the values the actual players have, it risks causing a desync between the players and the observer.

Desyncs are often very subtle, e.g. they may just result in a different amount of random numbers being generated during a particular turn. But these things quickly add up over time: one extra random number during a turn might make a unit miss on one person's game when they hit on everyone else's, which then results in a unit dying when it lived in the "real" game, and then on and on until you get to extremely observable effects: tons of idle workers, units running to their death with no micro, etc.

So in the linked VOD above, the observer changes player visions around 44:27, when a DT is on the field. This triggers this desync, which the broadcast crew + Tastosis do not notice for about 2 minutes (although they are very confused!), which can show you how subtle this is.

On ShieldBattery, we've fixed this by preventing changes to the unit detection status outside of a particular code path, so if you're playing/observing games there, everything will fine. If you're playing games on LAN or Bnet, avoiding changing the player vision once any stealthed units are out should avoid the desync as well.
Can you jam with the console cowboys in cyberspace?
Dakota_Fanning *
Profile Joined January 2008
Hungary2366 Posts
Last Edited: 2022-02-08 11:51:31
February 08 2022 11:51 GMT
#2
Good job tec27, I still don't understand why Blizzard pays its employees instead of you.
https://repmastered.icza.net
Ziggy
Profile Blog Joined June 2013
South Korea2106 Posts
February 08 2022 11:51 GMT
#3
another victory for the private sector
WriterDefeating a sandwich only makes it tastier. @imjustziggy
oxKnu
Profile Joined December 2017
1256 Posts
Last Edited: 2022-02-08 13:07:32
February 08 2022 13:07 GMT
#4
Such a significant game-breaking bug for observing/replays.

At least the players can't be affected by it, which is just the fortunate side of it.
M3t4PhYzX
Profile Joined March 2019
Poland4248 Posts
February 08 2022 17:54 GMT
#5
Man I love this community.
IntoTheWow
Profile Blog Joined May 2004
is awesome32278 Posts
February 08 2022 18:18 GMT
#6
tec27, the one true king
Moderator<:3-/-<
ZZZero.O
Profile Joined July 2011
Poland1599 Posts
February 08 2022 19:06 GMT
#7
So all the desyncs could have been avoided! It was all my fault!
https://www.patreon.com/Bombastic || https://liquipedia.net/starcraft/Bombastic_StarLeague || https://linktr.ee/bombastic
earob84
Profile Joined October 2017
Germany175 Posts
February 08 2022 19:17 GMT
#8
Wow great Job tec!
Maybe you are the first person that found the reason for the obs-desyncing. Or does the korean community know about it?
Cryoc
Profile Joined July 2011
Germany912 Posts
February 08 2022 19:28 GMT
#9
Very nice find! With the workaround of not changing the vision, the future ASL games will be safe as well.
http://www.twitch.tv/cryoc
Grouhh
Profile Joined May 2019
57 Posts
February 09 2022 12:07 GMT
#10
You guys are awesome!
GG WP
oxKnu
Profile Joined December 2017
1256 Posts
February 09 2022 12:15 GMT
#11
Yeah, I imagine that the Korean community also knows about it now.

I know some users here are Koreans and will probably share this on ygosu and whatnot..
y2kid
Profile Joined May 2018
92 Posts
February 09 2022 12:51 GMT
#12
@ZZZero.O I do not think all the desyncs could have been avoided. Correct me if I am wrong, Tec, but he found one of the reasons why this happens. I have noticed that sometimes replays that are saved as LastRep.rep are desynced every time you watch them, but if you find the "auto-saved" replay it renders just fine. So the vision bug is one of the reasons for desync but I do not think all. Of course, we are talking replays vs live games but still it happens for a variety of reasons. Additionally, from watching the BSL casts, I have noticed that desyncs are more likely to occur if the latency between the players is not very good, i.e., when players from two continents play more desyncs occur compared to two opponents located geographically closer.
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2022-02-09 19:49:29
February 09 2022 19:46 GMT
#13
On February 09 2022 03:18 IntoTheWow wrote:
tec27, the one true king

Credit where it's due, neive is the one who found this for us and developed a fix (and also developed our fix for the floating SCV glitch and various other exploits that still work on Bnet). He just doesn't post on TL and I thought this would be helpful for the community in general

On February 09 2022 21:51 y2kid wrote:
@ZZZero.O I do not think all the desyncs could have been avoided. Correct me if I am wrong, Tec, but he found one of the reasons why this happens. I have noticed that sometimes replays that are saved as LastRep.rep are desynced every time you watch them, but if you find the "auto-saved" replay it renders just fine. So the vision bug is one of the reasons for desync but I do not think all. Of course, we are talking replays vs live games but still it happens for a variety of reasons. Additionally, from watching the BSL casts, I have noticed that desyncs are more likely to occur if the latency between the players is not very good, i.e., when players from two continents play more desyncs occur compared to two opponents located geographically closer.

Yeah, replay desyncs are (mostly) a separate issue, and have been around since before SC:R and this change. If the same code is used while watching replays when changing player vision (I'm honestly not sure if it is or not, given that the UIs are implemented differently) this could have caused the same issues there, but there are also other cases where replays desync and I'm not entirely sure what the underlying cause is there.
Can you jam with the console cowboys in cyberspace?
Please log in or register to reply.
Live Events Refresh
IPSL
16:00
Ro24 Group D
JDConan vs TBD
Aegong vs rasowy
Liquipedia
PSISTORM Gaming Misc
15:55
FSL s10 code S playoffs
Freeedom40
Liquipedia
Ladder Legends
15:00
Valedictorian Cup #1 Qualifier
SteadfastSC236
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Liquid`TLO 461
SteadfastSC 236
elazer 102
BRAT_OK 64
JuggernautJason14
StarCraft: Brood War
Calm 3327
Mini 501
firebathero 146
Dewaltoss 99
actioN 79
Killer 36
yabsab 29
Rock 28
Movie 25
GoRush 12
[ Show more ]
Hm[arnc] 10
Dota 2
Gorgc6309
Counter-Strike
fl0m9939
olofmeister2650
byalli595
Super Smash Bros
Mew2King132
Heroes of the Storm
Khaldor697
Liquid`Hasu506
Other Games
Grubby4627
FrodaN993
B2W.Neo690
KnowMe234
RotterdaM72
MindelVK16
Organizations
Dota 2
PGL Dota 2 - Secondary Stream3234
StarCraft 2
ComeBackTV 842
Other Games
BasetradeTV828
gamesdonequick807
StarCraft 2
angryscii 37
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 24 non-featured ]
StarCraft 2
• Shameless 30
• LUISG 23
• Adnapsc2 15
• Reevou 7
• maralekos5
• Response 3
• OhrlRock 1
• Migwel
• LaughNgamezSOOP
• IndyKCrew
• Kozan
• AfreecaTV YouTube
• sooper7s
• intothetv
StarCraft: Brood War
• Airneanach78
• 80smullet 9
• FirePhoenix6
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• TFBlade1689
• Nemesis1562
Other Games
• imaqtpie837
• Shiphtur199
Upcoming Events
BSL
32m
StRyKeR vs rasowy
Artosis vs Aether
JDConan vs OyAji
Hawk vs izu
Replay Cast
5h 32m
Replay Cast
14h 32m
Wardi Open
15h 32m
Afreeca Starleague
15h 32m
Bisu vs Ample
Jaedong vs Flash
Monday Night Weeklies
21h 32m
RSL Revival
1d 7h
GSL
1d 13h
Afreeca Starleague
1d 15h
Barracks vs Leta
Royal vs Light
WardiTV Map Contest Tou…
1d 16h
[ Show More ]
RSL Revival
2 days
Replay Cast
3 days
The PondCast
3 days
KCM Race Survival
3 days
WardiTV Map Contest Tou…
3 days
CranKy Ducklings
4 days
Escore
4 days
RSL Revival
4 days
WardiTV Map Contest Tou…
5 days
Universe Titan Cup
5 days
Rogue vs Percival
Ladder Legends
5 days
uThermal 2v2 Circuit
5 days
BSL
6 days
Sparkling Tuna Cup
6 days
WardiTV Map Contest Tou…
6 days
Ladder Legends
6 days
Liquipedia Results

Completed

Escore Tournament S2: W3
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W4
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.