• 🏆 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!

[Trigger] This map seems to leak somewhere, need help finding it

Status
Not open for further replies.
Level 1
Joined
Sep 20, 2016
Messages
3
Hi guys!

I'm new here and not sure if this is the right kind of question or right place to ask... Hope this doesn't upset anyone.

3 friends and I were playing the map Autumn Crossing 1.3 Gold and in some games it would disconnect one of us (without prior wait/drop notice). First we thought it had to do something with WiFi, Tunngle, firewalls, host system, wc3 patch or so and tried a lot of things to fix but with no success.

Then suddenly, last round the game looked differently to some of us and we were in fact de-synced. This was completely new to me so I tried to look up what may or may not cause this. I found that it's most likely an issue with the maps triggers and that one or more of them cause memory leaks and therefore so-called server splits (again, totally new thing for me).

So I did the most natural thing and tried to fix it by myself but lo and behold: no success. The whole World Editor and JASS code is (at least for now) way too complicated for me to find and fix memory leaks. Maybe someone here can give me a hint where to look? No need to fix it for me, I'd love to learn this sooner or later. :)

This is the map in question: Autumn Crossing v1.3 Gold - Warcraft 3 Maps - Epic War.com

And I know there are other versions available, some of which may or may not have the leak. Nonetheless I'd really prefer fixing this specific version because it's cool and has poison towers and stuff... :D

TL;DR This map leaks and I have no idea how to fix it.
 
One single leak is not really important that it will have an impact on gameplay.
But it becomes important if they occur more often and/or periodicly.

For example if you have a periodic trigger that runs each 0.1 seconds of the game, and you leak unit groups, locations and such in it, then yes it is important.
Triggers that run often are important.

Startup/Setup/Initializaion triggers run only once, and so they have less potential to do leak damage. How ever if they also leak a ton of objects there, it's also not really good.

For some deeper understanding about leaks you can also read this. Memory Leaks
 
Last edited:
Level 1
Joined
Sep 20, 2016
Messages
3
One single leak is not really important that it will have an impact on gameplay.
But it becomes important if they occur more often and/or periodicly.

Thanks for the link! I'm beginning to understand more and more about how map development works in WC3. I'm not 100% sure if I did it right but I managed to reduce the amount of detected leaks in JASS checker a lot. The map worked fine yesterday, but then again it's only every 2nd to 3rd round that weird stuff happens.

If you disconnect during the map, it's most likely a desync. Leaks would cause your map to crash, not disconnect. Look for any GetLocalPlayer() in the code and just comment them out for now to see if the desync still happens.

I've learned that there is a difference between scripting in GUI and directly in JASS. This map is GUI scripted as far as I can tell so I can't easily look for GetLocalPlayer() mentions. If leaks don't cause de-syncs, what else could it be?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
I've learned that there is a difference between scripting in GUI and directly in JASS.
No there isn't. Where did you hear that from?

This map is GUI scripted as far as I can tell so I can't easily look for GetLocalPlayer() mentions.
There are some GUI functions that can cause desyncs. Off the top of my head, I think there is "Pan camera as neccessary" and terrain deformations.
 
Status
Not open for further replies.
Top