Freezes are usually caused by some kind of infinite loop.
A common cause would be a unit entering a region being moved to another location but the immediate vicinity of the other location is sufficiently blocked that the unit is displaced into another move region that moves it back. If both sides end up sufficiently blocked, such as ordering an army to enter such a region, it ends up in an infinite loop with the same unit bouncing between both locations due to being displaced back into the teleport regions. Of course there are many ways to trigger such an infinite loop, some I certainly do not know about.
Looking at the map script I see a ton of location leaks. Examples can be seen in all triggers like MonsterTLBug...
. Every time a unit enters the region a location is leaked. Leaks should not cause freezes but have been known to generally make Warcraft III less stable, likely due to hitting some internal limits if enough leak.
The triggers MonsterYay
and MonsterLvlEnd
leak groups. These are the worst kind of leak. Also they use TriggerSleepAction
which makes them hard to debug as that is not game time accurate, instead using network synchronised real time.
MonsterMoveSecond ...
and Attack Move Order ...
triggers are also using a `TriggerSleepAction`wait and also leak locations for every unit that enters.
The Player ...
triggers that handle players leaving should disable themselves after the actions run since a player cannot un-quit. Ideally merge them into a single trigger and have that poll the player group of still active players.
You are using a lot of trigger enhanced abilities. I recommend disabling them and seeing if a freeze still happens. Could easily be a bug with one of them interacting with some other trigger.
Your map leaks a lot. Fixing these leaks can help as mentioned above. Generally if anything will run more than a few times it is worth fixing leaks.
Your map uses a lot of TriggerSleepAction
(GUI Wait and Wait Game Time) which is not very accurate as far as game time goes and can cause race conditions if not careful. I recommend moving more towards timers for anything that runs frequently and requires a delay. It should be fine in once-off cinematic triggers.