• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Desync in custom map

Status
Not open for further replies.
Level 2
Joined
Apr 24, 2015
Messages
19
Please help me solve the issue with my map!
The thing is that I've made a map called "Medieval Invasion" which I've played several times now online. But somtimes people desync for no apparent reason, but not all (mostly 2-8 players). I have tried looking for the issue but I can't manage to find it and I've searched all over the web to find a solution without any luck. All I know from a replay from a game, when I was one of the few remaining poeple in the game, is that it has to do with where you look, which makes we think it might be a model. But still the game doesn't crash every time either. The game crashes at any point in the game (but mostly at the start of end). Many times (most of them) the game works fine without any desync.
I've uploaded the map, the saved replay and one of the crash.txt (which is always the same at every crash). If you follow Dark Green in the replay you don't crash. But if you follow one of the crashing players (for example Red) you crash (4 min in) from the replay.
I don't have any custom scripts such as "GetLocalPlayer()" in the map.

Edit: I have fixed the memory leaks for upcoming version of the map, but I don't think that is the issue since the game can crash all from 4-40 min into the game.
 

Attachments

  • 2016-07-26 02.04.12 Crash.txt
    13.5 KB · Views: 109
  • Medieval Invasion MASS DESYNK.w3g
    48.9 KB · Views: 93
  • Medieval Invasion 2.9.w3x
    3.3 MB · Views: 60
Last edited:
Level 2
Joined
Apr 24, 2015
Messages
19
I couldn't find anything desync worthy in the triggers, but I must say I have never seen so many leaks in one map before. You literally clear none of the points, unit groups, special effects, player forces, etc.

I suggest you take a read at Memory Leaks.

Yeah this my first map ever you see so I had no idea about that, thank you! I've read the link but I just wondered what I should do about my trigger "Spawn zombie in kill" which creates a unit at the position of every unit DG or Brown kills. Do I have to do a "remove" trigger to remove every one of these created unit that dies? I understand the concept of removing created effects and such, but what exactly do I have to make a "remove" trigger for? Should I have a trigger like:
"A unit (dies) -> remove (dying unit) from game"
Or do I have to make some sort of custom script?
 
Level 2
Joined
Apr 24, 2015
Messages
19
In my opinion, only if its a dummy unit. This of course can be avoided by just setting the dummy unit's death type to can't raise, does not decay.
I think I've solved the memory leak issue by changing every event that uses a "creat ---- at region" by saving the region as a variable ("set (tempPoint) = (center of region)") and then referring to the variable instead of the region itself and then using the custom script "call RemoveLocation( udg_tempPoint )" to remove that point. i've done the same for unit groups but instead saving the group as a variable and refering to it and then removes it by using the custom script "call DestroyGroup( udg_tempGroup )".
Memory Leak fix.PNG

It should work if I understand the whole thing correctly and remove all memory leaks, and if so then the only issue is the crash/desync that sometimes happens to several people (different people).
 
Level 4
Joined
Jul 26, 2016
Messages
88
@nicolas97p Correct me if I am wrong, but AFAIK, and from experience, desyncs can be caused by leaks as well. When me and my friend used to playtest leaking maps together, and my crummy computer's ram started saturating while his still had margin, we would start desyncing.

Just my two cents, try cleaning all your leaks first (really ALL of them), and then check whatever problems still occur.

(though, for me, desyncs only started occuring once at 5- FPS, so that might not be your situation at all)

The trigger you have here doesn't leak btw. Good job! Or does it?

Did you instantiate Position of Killing unit to a variable as well? Won't that cause a leak? o:
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
When me and my friend used to playtest leaking maps together, and my crummy computer's ram started saturating while his still had margin, we would start desyncing.
Memory does not work like that thanks to the "page file".

Technically the larger the memory used is, the more likely a crash/OOS is due to random memory corruption. However seeing how most modern games never suffer this with over 2GB of memory used, I doubt that is an issue unless your memory is approach its end of life.
 
Level 2
Joined
Apr 24, 2015
Messages
19
@nicolas97p Correct me if I am wrong, but AFAIK, and from experience, desyncs can be caused by leaks as well. When me and my friend used to playtest leaking maps together, and my crummy computer's ram started saturating while his still had margin, we would start desyncing.

Just my two cents, try cleaning all your leaks first (really ALL of them), and then check whatever problems still occur.

(though, for me, desyncs only started occuring once at 5- FPS, so that might not be your situation at all)

The trigger you have here doesn't leak btw. Good job! Or does it?

Did you instantiate Position of Killing unit to a variable as well? Won't that cause a leak? o:
Thank you for your comment! I thought as well that the memory leak could have had something to do about the crashing, but then I realized that the game have crashed both 4 min in as well as 40 min in which wouldn't make mush sense since not much memory could have leaked after just 4 min that could cause a crash. Becuase if the game would crash 4 min in cause of memory leak then why would it not crash until 40 min in another time, when a ton more of leaking already have occured? But lets say that it is the memory leaking that is causing these seemingly random crashes, then it would be fixed! I will just have to try to play my leak fixed version of the map and see if it crashes anytime soon, but as I said I highly doubt that that is what causes the crash/desync.

No the only things I saved as a variable is that which is in the picture, the position of duying unit since the position of the killing unit has no effect on the trigger what so ever. I've done as in the picture I posted to all of the triggers in the map now (and the same thing with unit groups but with their respecitve variable and custom script "call DestroGroup").
 
Level 2
Joined
Apr 24, 2015
Messages
19
This is some internal game crash, Addresses involved are nowhere near 4GB range and the crash is in game.dll as opposed to another library. Without the source code or debug symbols it is near impossible to know what the cause is exactly.
Is it possible for me to aquire the source code or debug symbol? If so, then how do I do it?

And by the way, does triggers like these cause memory leak: "Quest - Display to Player Group - 11 (Dark Green) the Quest Update message: .......)"?
If they do, how should I make the trigger to avoid the leak?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Is it possible for me to aquire the source code or debug symbol?
No it is not.
If so, then how do I do it?
You could try working for Blizzard on their classic games team. I heard they were looking for people a while back but I am guessing all those places have been filled by now.
And by the way, does triggers like these cause memory leak: "Quest - Display to Player Group - 11 (Dark Green) the Quest Update message: .......)"?
They cause a unique string to be allocated, however unless that string is dynamic then it will always be reused for all players who trigger it so it does not really class as a leak.
If they do, how should I make the trigger to avoid the leak?
Cannot stop string leaks, its a game fault.

The quest objects themselves may leak which is why you need to allocate them to a variable. However if that is just a glorified wrapper for displaying game text then that will not leak.
 
Level 2
Joined
Apr 24, 2015
Messages
19
No it is not.

You could try working for Blizzard on their classic games team. I heard they were looking for people a while back but I am guessing all those places have been filled by now.

They cause a unique string to be allocated, however unless that string is dynamic then it will always be reused for all players who trigger it so it does not really class as a leak.

Cannot stop string leaks, its a game fault.

The quest objects themselves may leak which is why you need to allocate them to a variable. However if that is just a glorified wrapper for displaying game text then that will not leak.
Okey thank you for your help!
 
Status
Not open for further replies.
Top