• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:49
CEST 20:49
KST 03:49
  • 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
Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection6Code S Season 2 (2026) - RO8 Preview5[ASL21] Finals Preview: Two Legacies21Code S Season 2 (2026) - RO12 Preview2
Community News
[BSL22] Non-Korean Championship from 13 to 28 June2Weekly Cups (May 25-31): Clem doubles, 2v2 circuit heads toward finale0StarCraft II 5.0.16 PTR Patch Notes may 26th151Weekly Cups (May 18-24): MaxPax wins doubles0Crank Gathers Season 4: BW vs SC2 Team League6
StarCraft 2
General
TL.net Map Contest #22 - Voting & Ladder Map Selection Code S Season 2 (2026): RO4 and Finals Preview TL Poll: How do you feel about the 5.0.16 PTR balance changes? What kind of tool would you be interested in? Oliveira Would Have Returned If EWC Continued
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament GSL Code S Season 2 (2026) WardiTV Mondays Maestros of The Game 2 announcement and schedule ! Crank Gathers Season 4: BW vs SC2 Team League
Strategy
[G] Having the right mentality to improve
Custom Maps
[D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 529 Opportunities Unleashed Mutation # 528 Infection Detected Welcome to the External Content forum
Brood War
General
25 Years Since Brood War Patch 1.08 FlaSh's ASL S21 Finals Review BW animated web series: seeking contributors BGH Auto Balance -> http://bghmmr.eu/ [BSL22] Non-Korean Championship from 13 to 28 June
Tourneys
[BSL22] Grand Finals - Sunday 21:00 CEST [ASL21] Grand Finals [Megathread] Daily Proleagues Escore Tournament StarCraft Season 2
Strategy
Why doesn't anyone use restoration? Any training maps people recommend? Muta micro map competition [G] Hydra ZvZ: An Introduction
Other Games
General Games
ZeroSpace Megathread Summer Games Done Quick 2026! Nintendo Switch Thread The Perfect Game Path of Exile
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
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
Community
General
US Politics Mega-thread Trading/Investing Thread Things Aren’t Peaceful in Palestine YouTube Thread Russo-Ukrainian War Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion Movie Discussion! [Manga] One Piece
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
Esportsmanship: How to NOT B…
TrAiDoS
Why RTS gamers make better f…
gosubay
ASL S21 English Commentary…
namkraft
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6190 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
Hungary2368 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
1259 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
Poland4267 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
Poland1612 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
Germany176 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
1259 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
Next event in 5h 11m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 310
BRAT_OK 124
ProTech106
trigger 96
mouzStarbuck 68
JuggernautJason51
StarCraft: Brood War
Mini 1020
Britney 920
Shuttle 727
EffOrt 560
Soulkey 185
ggaemo 184
actioN 116
Rush 84
hero 62
Rock 26
[ Show more ]
GoRush 17
Lomo 1
Dota 2
qojqva3550
Fuzer 200
Counter-Strike
fl0m7140
zeus342
Heroes of the Storm
Liquid`Hasu430
Other Games
gofns39573
tarik_tv11031
Grubby3163
FrodaN1119
uThermal304
byalli303
C9.Mang0189
RotterdaM132
QueenE100
Mew2King77
Trikslyr56
CosmosSc2 20
MindelVK6
Organizations
Other Games
BasetradeTV231
StarCraft 2
angryscii 34
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 31
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• imaqtpie790
• WagamamaTV512
• Shiphtur165
Upcoming Events
PiGosaur Cup
5h 11m
Replay Cast
14h 11m
Kung Fu Cup
16h 11m
Maestros of the Game
20h 11m
Classic vs Lambo
Clem vs Maru
Replay Cast
1d 5h
The PondCast
1d 15h
Maestros of the Game
1d 20h
Serral vs Rogue
herO vs SHIN
OSC
2 days
Replay Cast
2 days
Maestros of the Game
2 days
[ Show More ]
Replay Cast
3 days
CranKy Ducklings
3 days
uThermal 2v2 Circuit
3 days
Sparkling Tuna Cup
4 days
uThermal 2v2 Circuit
4 days
OSC
5 days
Wardi Open
5 days
Liquipedia Results

Completed

BSL Season 22
2026 GSL S2
Heroes Pulsing #1

Ongoing

IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
CSCL: Masked Kings S4
YSL S3
Acropolis #4 - GSB
SCTL 2026 Spring
WardiTV Spring 2026
Maestros of the Game 2
uThermal 2v2 2026 Main Event
Murky Cup 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026

Upcoming

BSL 22 Non-Korean Championship
CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
Douyu Cup 2026
Heroes Pulsing #3
Heroes Pulsing #2
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 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.