• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Crash] 'HordeVsAlliance wetlands' help with desync

Status
Not open for further replies.
Hello!
That's my first multiplayer map. I have problem with desyncs only at map start (I mean map init). But the point is that no triggers are executed at map initialization, also 'custom script code' at map header is empty. I'm GUI user, dont know JAss. All trigers are turned on or run after 6 sec from start and not together but in queue. But desync appear before any trigger is executed, people are kicked immediately after loading map. Once I was kicked too:) Desync never appears in later game.

In map I used others people systems:
1. Recipe System By Fredbrik(Diablo-dk) (functions in Jass)
2. Unit Indexer and Spell Template by Bribe
3. GUI Damage Engine v2.2.1.0 by Bribe

So that desync appears not always but 1 per 3 or 4 games. Thats not acceptable. According to GUI Damage Engine v2.2.1.0 by Bribe I ask on other forum (here on Hive) a question. Is this posible that Cheat Death Ability from Object Editor from this System can cause desync. Shadowvzs told me that is not a reason. (This ability is used in GUI Damage Engine) and is set to +500000 life gained).

Map is run on hostbot: Ghost++ 1000Mb/s, version 17.1 modified by Living-Bots.net

I have no idea what to do, maybe someone more experienced can help me?
Regards
Zibi
ps I hope Im in right place to ask for help because my 1st post was in wrong section
 
Last edited:
Thank you for your answer Chaosy.
General question:

Is it possible that triggerA will cause desync if this trigger is not running? For example I have triggerA set as 'initialy Off' and in moment when desync appears triggerA is not turned ON, and is not running (by another trigger). So can triggerA cause desync? I think it will not, but I wander your opinion.

If so, my conclusion is that no trigger cause desync, becouse none trigger is running at desync time.

There are players that can easy join without problems, but I saw player who trying to join few times and every time he was dropped by desync.

I have over 170 triggers (all spells triggered) so test with disable triggers will takes ages.

What other reasons are posiible except falling trigger?

regards Zibi
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Are you sure this map really desync's instead of crashes? How did you conclude this?
Did the client (not the host) disconnect from the game? Did it display the disconnected from the game message?
Or did you all just get thrown out of the game with a fatal error/no error at all?

Because I'm pretty certain that GetLocalPlayer() is nowhere to be found.
I just did a global search on your map header script with notepad++ and it didn't return any results...

Search "GetLocalPlayer()" (0 hits in 0 files)

Don't beleave me?

Search the map header yourself, I've attached it to this post...

In theory: this map should not desync since it is not using any local code.
Therefore I can conclude that this is a map crash and not a desync. (Look for null refferences instead or something similar amongst those lines)
If it really is a desync then you sir have stumbled upon a mystery.


EDIT: I think that it got something to do with preloading the spells.
Apparently it brings a lag-spike in the game and if the host of the game can't handle that spike, the entire game disconnects (normal behaviour).
You should probably do the preloading of the spells throughout the game instead of all at once. Or at least with an interval. (Please be reminded that waits are inaccurate. Use timers instead for precision.)
Other then that I couldn't really think of other things that might cause it. To test it, try turning off the spell preloading trigger and host the map with your friends. See if it still disconnects everyone after 6 seconds...
Or ofcourse use your bot, test it thoroughly though ;)
 

Attachments

  • map header.txt
    488.9 KB · Views: 96
Last edited:
First thank you Hashjie for your time and advices.

I fully understand diffrence between crash and desync. After loading map (loading bar says: "press any key" and I press space and enter into the game) then game says somethink like that:
Players in game state #1 - player name1
Players in game state #2 - player name2, player name 3, player name 4
Player name 1 dropped due desync.
It is example cause desync appears not always of course.
And 3 players can play till the end.
Sometimes happends 2 players droped and 2 players are in game

It happends before 1st trigger run.

Now GetLocalPlayer.
All triggers one-by-one I converted to text. In Trigger Editor --> Edit --> Convert to custom text. And then search for GetLocalPlayer. Ideed I found nothing. So there is no GetLocalPlayer calls in map. Thats clear.
BTW I wander how you convert ALL triggers into the txt file?

3rd thing
Preloading, Yes there is a lag in preloading (about 3-5 sec) but desync never appear in this moment. Like I said it only happends just at start.

So is it maybe related with to many variables or GHostBot maybe.
You mentioned about Null refferences. So if some variables has initial value set to zero is it related with desync?
regards Zibi
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
ZiBitheWand3r3r said:
BTW I wander how you convert ALL triggers into the txt file?

This is fairly simple to accomplish.
Click on your map header (the icon of your map with it's name on top of all the trigger categories).

Then simply type in: a
or anything else that causes a syntax error.

Now when you save the map, the compiler should show you the entire map header script. (If not you might want to use JNGP instead of the normal WE)
Select all of it, copy and paste it into notepad++ (fk yeah! ಥ_ಥ) and do a global search and you'll see that it indeed has no GetLocalPlayer() code inside.


Now on to the subject of desynchronization:
Desynchronization ONLY occurs when data is desynchronized between the client and the host. This means that when you are not using code that alters data locally for a player, it is simply impossible that your game desyncs.

Your game can however crash due to other reasons.

Null refferencing is basically when a variable points towards nothing (for example: set myUnit = (Triggering Unit)) if you destroy Triggering Unit before setting this variable then that variable points to null (nothing). This usually causes a crash depending on what you do with the null refferenced variable.

This might not be a very accurate example (I haven't even tested this example), but it's one of the many things that can cause your game to crash. Just make sure you are not using null as a refference for something.


Hmm, about your problem: you are saying it is done for different players randomly and it is at the initialization? I'll have a quick look...


Also. Please do realize that if it says: Waiting for player..., it doesn't mean that that player is desynching.
This is usually because of that player having problems with either his/her connection or their own computer.
This can not be fixed since it is not an issue caused by your map, but simply because the player's computer is failing.

Also, just in case:

  • Force all players to cancel (blah blah key to continue) the loading bar when loading is finnished
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: call ForceUICancel()
A desync (instantly) removes the player from the game displaying a message to him/her saying: you have been disconnected from the game.
All the other players that did not get the desync (depending on how it occured ofcourse) do not see any delay and do not need to wait for this player in order to continue playing.
Most of the time a desync causes everyone to disconnect except the host (since the host has the data that was compared against).
But that all depends on how you've used your local code. If this is not the scenario you are talking about, then you are not talking about a desync.
 
Last edited:
Hello, unfortunately desynchronization probelm is not solved.

Thank you Hashjie for trying to help. You said:
Desynchronization ONLY occurs when data is desynchronized between the client and the host. This means that when you are not using code that alters data locally for a player, it is simply impossible that your game desyncs.
Now Im sure no code is executed, no trigger running, just nothing. But desync appears almost every game ONLY at start. I made small changes, that UnitIndexer and Damage Engine are not running at map init (others triggers too). All the triggers are turned On, or running after 6 sec from map init. I really dont understand this, and thinking that must be related with GhostBot?

Also. Please do realize that if it says: Waiting for player..., it doesn't mean that that player is desynching.
This is usually because of that player having problems with either his/her connection or their own computer.

I fully understand the diffrence between desynchronization And when player laggin ('Waitnig for player' window). Its not lag, its desync.
Its not game crash, its desync.

Most of the time a desync causes everyone to disconnect except the host (since the host has the data that was compared against).
Yes, it happends 4 times - all players were dropped, and game was over (Bot whisper to me: 'Game .... gameName is over (0/8).'). But most time 1 or 2 or 3 players are dropped, and those who not dropped can play till the end without any desync in game. Never happends desync in later game, Only at start.

and you provided custom script code Custom script: call ForceUICancel() how it shoud work? What is it for

ZiBi

Edit:
Added few lines from Log File from GhostBot++
when akk droped:
[GAME: HordeVsAlliance wetlands #7] [Local]: Shortest load by player [Pyskaty10] was 11.37 seconds.
[Tue Dec 11 21:22:03 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: Longest load by player [C-Drummer] was 33.23 seconds.
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] desync detected
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: Warning! Desync detected!
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: Players in game state #1: Pyskaty10, ElessarPL
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: Players in game state #2: RealG4L1F3, C-Drummer
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] can't kick desynced players because there is a tie, kicking all players instead
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] deleting player [C-Drummer]: was dropped due to desync
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: C-Drummer was dropped due to desync.
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] deleting player [Pyskaty10]: was dropped due to desync
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: Pyskaty10 was dropped due to desync.
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] deleting player [RealG4L1F3]: was dropped due to desync
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: RealG4L1F3 was dropped due to desync.
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] deleting player [ElessarPL]: was dropped due to desync
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] [Local]: ElessarPL was dropped due to desync.
[Tue Dec 11 21:22:05 2012] [GAME: HordeVsAlliance wetlands #7] is over (no players left)

and when few players stay
[GAME: HordeVsAlliance wetlands #9] [Local]: Shortest load by player [Desato] was 15.50 seconds.
[Tue Dec 11 22:51:44 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Longest load by player [ZiBitheWand3r3r] was 33.31 seconds.
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] desync detected
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Warning! Desync detected!
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Players in game state #1: Desato, Supre
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Players in game state #2: DIMITRIS501, C-Drummer, ZiBitheWand3r3r, u2too
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] kicking desynced players
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] deleting player [Desato]: was dropped due to desync
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Desato was dropped due to desync.
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] deleting player [Supre]: was dropped due to desync
[Tue Dec 11 22:51:46 2012] [GAME: HordeVsAlliance wetlands #9] [Local]: Supre was dropped due to desync.

22-12-2012
looking for help I send post in other topic, heres copy:
Map Initialization runs before a player finishes loading so is counted as load time
Its very valuable information for me, thanks Dr Good, I didnt know that. You experienced user, maybe you can help with desynchronization problem? On all Hiveworkshop noone can help me with this problem, Im starting to be desperate, and start thinking about abondon my project:( After many, many experiments I still coudn't find a solution why map desynchcing.
My topic is here:
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/hordevsalliance-wetlands-help-desync-226427/

I tryed in two main ways:
1st: Change map so NONE triggers are executed before ElapsedGameTime=6sec
Its desyncing right after start (1 or 2 sec at begining)

2nd way: after read Dr Good advice I put as many as posible settings into trigger with event MApInitialization.
Its desyncing right after start (1 or 2 sec at begining)

NO GetLocalPlayer in my map, NO PanCamera things at begining (only later)
NEVER desync in later game, Only 1 or 2 sec after start - 90% games.

I think it might be related with ObjectEditor: maybe some mistakes in units, items, abilities, buffs or upgrades? Or doodads, units placed on map? Variables maybe (No hashtables in map)??

Please point me out if Im wrong in basic triggers things:
IF triggerA is Enabled but initialy turned OFF, and not run Or turned ON by another trigger, so this triggerA cannot cause desync, am I right?

IF triggerB is Enabled and initialy ON, but has event which not happend (so trigger is not running), and not run by another trigger, so this TriggerB cannot cause desync, am I right? For example one of spells triggers below:


  • Stombolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to -StormBolt
    • Actions
      • -------- --------
      • -------- Create a dummy unit to represent this spell --------
      • -------- --------
      • Set TargetPoint = (Target point of ability being cast)
      • Unit - Create 1 Dummy (Vexorian, Anitarf, Infrane) for (Triggering player) at TargetPoint facing 0.00 degrees
      • -------- --------
      • -------- The variable ID represents this individual cast of the spell --------
      • -------- --------
      • Set TempUnit_1 = (Last created unit)
      • Set ID_1 = (Custom value of TempUnit_1)
      • Set TargetUnit_array[ID_1] = (Target unit of ability being cast)
      • Set TesterSpell_Caster[ID_1] = (Triggering unit)
      • -------- --------
      • -------- --------
      • Set TempReal = (Real((Level of (Ability being cast) for TesterSpell_Caster[ID_1])))
      • Set TesterSpell_Damage[ID_1] = ((0.03 x TempReal) + 0.06)
      • -------- --------
      • Set TesterSpell_Duration[ID_1] = 3.00
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TesterSpell_Group_array[1] is empty) Equal to True
        • Then - Actions
          • -------- --------
          • -------- Turn on the loop trigger as it's currently off --------
          • -------- --------
          • Trigger - Turn on Loop Stormbolt <gen>
        • Else - Actions
      • -------- --------
      • -------- Add the dummy to this spell's group so that it can be referenced over time --------
      • -------- --------
      • Unit Group - Add TempUnit_1 to TesterSpell_Group_array[1]
      • -------- --------
      • -------- Clean leaks of course --------
      • -------- --------
      • Custom script: call RemoveLocation(udg_TargetPoint)



pls help with this mystery
Zibi
 
Last edited:
I found a reason.
There are other maps na Battle.net that provoke desync, my map is clean.

by Dr Super Good:
Below are the most widly used tactics to avoid desyncs.
1. Restart WC3 TFT (exit and then reopen) before playing the map. This resets all the data caches WC3 has after playing a map. Maps that have been effected by widgiitizer curropt this cache in a way that other maps will usually split you.
.

Players who played for example normal 'HordeVsAliance x3' and then join my game are dropped.

Question is:
Is there a way to clean game casche useing scripts? Some code I can put into my map?
Or is it only possible to clean game casche by close Warcraft3 and then reopen it like Dr SuperGood said?
You know players are lazy and dont read warnings, and they dont want to exit game and run it again..

Zibi
 
I saw your message on wc3c and I want to discus about your map.

First of all terrain:

- Trees looks silly, really, you should change map tile sets to barrens or replace trees with mushrooms (or recolor them into red/brown changing their RGB value).
- Shrubs are bad again, but just set RGB value to 255/150/150 it will work awesome (you can even edit this for different types to mix them with rest of the environment).
- Well everything else that is green is bad (green -> yellow/orange/brown).
- Use lower/rise tool, especially near water, it will look awesome ;)
- Base and map borders are huge empty space, you should spam this area with a lot of trees or other doodads.
- Add special effect like doodads (I like to use models like fire and edit model to spell effect or buffs, my favorite faerie fire model ;) ). note: remove pathing ground, and try different scaling values as well as RGB setting.
- Now when I mentioned pathing ground is horrible, as you can see there is empty space between doodads (trees for example) when your unit can get stacked.
- Add lightning effect doodads as well (best examples by Blizzard are fire/lightning cinematic doodads, you can see lightning around models shining upon nearby area), find awesome models in UTM map or all around wc3 resources.
- Add live doodads, such as birds or anything that move all around map, or play some animation in background, like some bear sleeping on the hill or some owl doing some shit somewhere periodically or not.
- Fix ramps please, they look sharp, rise/lower tool, often do job ;)

Units and other more or less important object

- Increase altar size, main unit is MAIN UNIT ^_^. Scale it properly :p
- Night elf archer in human army looks stupid, it's just horrible idea.

Script

JASS:
function InitRecipe takes nothing returns nothing
    set udg_RT=CreateTrigger()
    set udg_RC=true
    call TriggerRegisterAnyUnitEventBJ( udg_RT, EVENT_PLAYER_UNIT_PICKUP_ITEM )
    call TriggerAddAction(udg_RT,function Recipe_Main)
endfunction
//call this at map init.


//forced by WE
function InitTrig_Recipe takes nothing returns nothing
endfunction
// End Recipe

This is silly, function above forced by WE will run on map initialization, there is no need to create new one and fire it on map initialization from another function.
JASS:
//forced by WE
function InitTrig_Recipe takes nothing returns nothing
    set udg_RT=CreateTrigger()
    set udg_RC=true
    call TriggerRegisterAnyUnitEventBJ( udg_RT, EVENT_PLAYER_UNIT_PICKUP_ITEM )
    call TriggerAddAction(udg_RT,function Recipe_Main)
endfunction
// End Recipe
This will do just fine ;)

You run Damage Engine trigger but it contains broken actions.
  • (TempUnit is A structure) Equal to False
need to be fixed (just reset it).
  • Countdown Timer - Start DmgEvTimer as a One-shot timer that will expire in 0.00 seconds
need to be fixed (same as above).

Oh my, a lot of triggers are really unneeded, but I won't post them here, instead I will link few tutorials, please spare some time and check them :)
http://www.hiveworkshop.com/forums/...quick-tutorial-common-triggering-tips-190802/
http://www.hiveworkshop.com/forums/...stanceabilty-timers-custom-values-more-96460/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/getlocalplayer-225738/
http://www.hiveworkshop.com/forums/...s-279/dialog-buttons-advanced-systems-186390/

Also I don't like empty space in your multiboard, you should remove empty space for each missing player :)

And finally the most important one:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/debugging-188204/

Also small note, do not destroy triggers, there is no need for it really :)

EDIT:

I just saw that you run Damage Engine before Unit Indexer that is used by Damage Engine, this may be problem.
You must understand that all triggers you created run one by one, there is some order, initialization function first then other shit etc (regular triggers).
You must know exactly right order what system use what variables and functions, you can't run system that use unit HERO variable if you didn't give HERO variable value example.

JASS:
// Here you go basic example
// If we run B before A function nothing will happen 
// (in best case and in this example, game crushing in worst).
// But if we run A before B udg_HERO unit will be hidden.
function A takes nothing returns nothing
    set udg_HERO = CreateUnit(...)
endfunction

function B takes nothing returns nothing
    call ShowUnit(udg_HERO, false)
endfunction
// :P
Hope this helps, map isn't so horrible, it can become great that's why I spend time checking it ;)
 
Just a note to consider:
There are other things than GetLocalPlayer() which are able to cause desync. One of the most likely reasons for desync is Getting the player slot state at map initialization.

For example the typical "Is Player playing" check to create a hero selector unit for that player. It desyncs on map init (well, it does randomly, it's not a 100%), but won't desync 0 seconds after the game started.

Also, getting a location Z value on walkable destructables can desync, as animations are not in sync.
 
Its fixed

Hey, thanks for tip, but I found a reason
It is a copy from Wc3c.net forum:
1. There is map called HordeVsAlliance x3, by Wooj.
2. There is map called HordeVsAlliance wetlands, by ZiBitheWand3r3r.

Map HordeVsAlliance x3, by Wooj is corrupted. If you played this map and then join my map: HordeVsAlliance wetlands (or any other like Dota for example) you will see instead of doodads - coloured boxes.

There was desync issue on map map also (becouse of what I said above). But I fixed desync. I removed one type of doodad (Barrens Canopy Tree) from my map. After that no desync appears. Do not undestand why, but now it's ok. Of course we are talking about issue when you join my map after corrupted HordeVsAlliance x3 by Wooj , ok?

I search for reason of desync on my map few weeks. Thats why you found some strange things with my triggers. I just didnt know what to do, and tryed everything. Thanks to Anitarf and Fledermaus for tips. They moved my attention to doodads and that was that!

PS
Thank you Kobas for your time. Indeed terrain and pathing wasnt right. I followed some of your tips, and changed map a bit. For example your button system you suggested looks much better then normal, but it is only used at beggining to choose game modes by red player, so i decided to keep my old system which is simple but works ;]
-Main unit is now bigger ;]
-Damage Engine by Bribe: I know it is a broken line in DamageEngine trigger, but it is originaly in resourse where I dowloaded. Didnt change anythink i dont fully understand. Link:
http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v2-2-1-0-a-201016/


But most importand for me was idea to make Hero Defence type map where almost all spells are triggered and works on % of target unit(s) life, not static damage. It makes playing much diffrent from others maps, especcialy in mid and later game where one spell damage 24% enemy max life :ogre_hurrhurr: Team Battles are not long but, one miss casted spell can make a team fall.

Map is still hosted on Battlenet on bot named: GoldHostBot
But I think ill close this but because only few ppl want to play on battle net my map. On Garena i can gather full house in few minutes. Of course there are leavers and noobs, (and kids too..) but it looks alive not deserted like battlenet. Sorry to say that but I feel thats the truth.
And this wrong-coded HvsA which destroys others ppl work..

PS Sorry for my horrible english ;]
Kobas - I cannot try your map, is it becouse of old PC with not so strong graphic card?
Zibi
 
Status
Not open for further replies.
Top