I hope this message finds you guys well. I am learning and creating my Warcraft 3 map, which frequently crashes both at the game startup and around the 10-minute mark during gameplay. To address this, I have used a leak detection tool (Memory Leaks Checker v1.6) and systematically checked my triggers. After learning about unit group leaks and point leaks, I encountered a difficult-to-understand issue:
Before the game begins, I use triggers to ally players and save their alliances, so that I can apply technology bonuses to the players all at once later. However, after investigation, the leak detection tool informed me that this code causes a Force leak of 20 times per second. This appears to be a one-time code, and I am unsure how to resolve the issue. The code is as follows:
I have performed two checks on it:
here is the information when these code activated (before) and deactivated (after)
Before the game begins, I use triggers to ally players and save their alliances, so that I can apply technology bonuses to the players all at once later. However, after investigation, the leak detection tool informed me that this code causes a Force leak of 20 times per second. This appears to be a one-time code, and I am unsure how to resolve the issue. The code is as follows:
I have performed two checks on it:
- I compared the leak information when it is activated and deactivated. When it is activated, the Force leak significantly increases.
- I tried adding a [call BJDebugMsg("game the team triggered!")] function to confirm whether it is being repeatedly executed, and also attempted to disable the original trigger and activate a new trigger that uses this part of the code (to avoid it being called elsewhere). The result was that it did not repeatedly execute and was not called by any other triggers (at least in the two tests I conducted).
-
game the team
-
Events
-
Time - Elapsed game time is 0.20 seconds
-
-
Conditions
-
Actions
-
Trigger - Turn off (This trigger)
-
Player - Change color of Player 6 (Orange) to Gray, Changing color of existing units
-
Player Group - Add Player 1 (Red) to goodguy
-
Player Group - Add Player 2 (Blue) to goodguy
-
Player Group - Add Player 3 (Teal) to goodguy
-
Player Group - Add Player 9 (Gray) to goodguy
-
Player Group - Add Player 6 (Orange) to goodguy
-
Player Group - Add Player 5 (Yellow) to badguy
-
Player Group - Add Player 4 (Purple) to badguy
-
Player Group - Add Player 7 (Green) to badguy
-
Player Group - Add Player 8 (Pink) to badguy
-
Player Group - Add Player 10 (Light Blue) to badguy
-
Player Group - Add Player 11 (Dark Green) to badguy
-
Player - Change color of Player 11 (Dark Green) to Yellow, Changing color of existing units
-
Player - Change color of Player 10 (Light Blue) to Yellow, Changing color of existing units
-
Player Group - Pick every player in goodguy and do (Actions)
-
Loop - Actions
-
Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 2 (Blue) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 3 (Teal) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 9 (Gray) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 6 (Orange) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 4 (Purple) as an Enemy
-
Player - Make (Picked player) treat Player 5 (Yellow) as an Enemy
-
Player - Make (Picked player) treat Player 7 (Green) as an Enemy
-
Player - Make (Picked player) treat Player 8 (Pink) as an Enemy
-
Player - Make (Picked player) treat Player 10 (Light Blue) as an Enemy
-
Player - Make (Picked player) treat Player 11 (Dark Green) as an Enemy
-
-
-
Player Group - Pick every player in badguy and do (Actions)
-
Loop - Actions
-
Player - Make (Picked player) treat Player 1 (Red) as an Enemy
-
Player - Make (Picked player) treat Player 2 (Blue) as an Enemy
-
Player - Make (Picked player) treat Player 3 (Teal) as an Enemy
-
Player - Make (Picked player) treat Player 9 (Gray) as an Enemy
-
Player - Make (Picked player) treat Player 6 (Orange) as an Enemy
-
Player - Make (Picked player) treat Player 4 (Purple) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 5 (Yellow) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 7 (Green) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 8 (Pink) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 10 (Light Blue) as an Ally with shared vision
-
Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally with shared vision
-
-
-
-
here is the information when these code activated (before) and deactivated (after)
Attachments
Last edited: