• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Hidden & Random Desynchronisations

Status
Not open for further replies.
Level 4
Joined
Dec 23, 2005
Messages
41
Hi everyone,

I have a problem with desynchronisations...

Actually, I searched everything with GetLocalPlayer(); nothing to say, me and other JASS'er loooked into them and found nothing abnormal.

I then looked at GetLocationZ(); I had somes so I removed them. The problem was still there sadly.

After that I looked for Pan Camera Has Necessary function, nope I wasn't using them (I use a camera function but not that one). Looked for select group for player, not using it, but using select unit for player. I don't have high Damage - Dice... Negative sight range etc... Nothing in the code seems "weird".

After that I saw a post saying that structures could cause desyncs due to global syncing; removed all the structures and transposed that with the cache. That didn't work either.

Now what else, I saved each replays to find out maybee what was going on, nothing. The only thing I can say is; it happens randomly (not every games), and it always happens between 12 minutes and 20 minutes game time. It is not always everyone that is desync'ed, sometimes some players are still there (1-3), but they still have nothing special with the host. Somehow there's nothing at all in the code that happens at that time.

I know the binary search but that is in fact a sure way to find it, but way too long since it does not happens everygame etc. So I'm asking if you have any ideas of how I could fix the problem. It's been many months (3-4) that this problem is there and by myself it seems I can't fix this.

Thanks
 
Level 5
Joined
Aug 27, 2007
Messages
138
Yes, and by doing what GhostWolf said, you can find out what's causing it to crash by process of elimination--I'm sure it's not crashing on its own, or just because it wants to. Here are some things that can cause crashes:

-GetLocalPlayer() while not using local code
-Player[-1] or similar
-UnitDamagePoint()
-Overflows in arrays (possibly, never tested)
 
Level 4
Joined
Dec 23, 2005
Messages
41
I think I'm gonna add a function in each beginning's function, like if GetPlayerName(Player(0))=="xxx" then call DisplayTimedTextToPlayer("function name") endif so maybee that way I will be able to find faster from where its not syncing.
 
Level 4
Joined
Dec 23, 2005
Messages
41
Nah in that case I am not using regions, only rects. I made the DummyDebugMsg function and tested it online. I saved 5 replays with desyncs, happening the same way. The DummyDebugMsg tells me which functions is called (even loop functions). I did check every functions that were called before a desyncs but nothing seems wrong. I don't know if a global mismatch between players and that what's desyncs or I don't know. Still a very annoying problem, hard to find it :(.
 
Level 4
Joined
Dec 23, 2005
Messages
41
I would like to ask if you know something I should check just in case. What is the most weird thing is that those desyncs doesn't deconnect everyone; sometimes 1-2-3 players are still there. I looked from all the DummyDebugMsg and still I can't find. Do you guys have any idea please?

Thanks

Edit : I just read that PolledWait() was known to desyncs. Is that true? (Small waits and big waits whatever, I use both)... If yes, there is 86 different instances of PolledWaits in the code...
 
Last edited:
Level 4
Joined
Dec 23, 2005
Messages
41
You were right... I did removed all PW and replaced them with timers expires but that didn't change anything (except there is more precision)... Actually I really don't know what else could cause the map to desyncs... I don't know if anyone is willing to check the map's script (or the map itself I don't care) and maybee find something weird/wrong in the code. Well, if yes, just ask I'll post it. Thanks in advance.
 
Status
Not open for further replies.
Top