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

LEAKs still exist!

Status
Not open for further replies.
Level 6
Joined
Sep 28, 2009
Messages
222
Forget this, its the trigger debug window that leaks, not the game itself. see my second post for more, sry.

just found out that leaks still exist in SC2.

you can download my test map in the attachments.

with this simple trigger:

  • leak
    • Events
      • Timer - Every 0.05 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • Player Group - Pick each player in (All players) and do (Actions)
        • Actions
          • UI - Display ((Text((Number of times (Current trigger) has been executed))) + (Name of player (Picked player))) for (Player group((Picked player))) to Subtitle area
i was able to create a lag that gets bigger and bigger as longer the map is running, which is a clear proof of leak.

so, why is this? is the garbage collector not deleting the 2 player grps that get created in every run? hf testing :)
remember: this trigger executes not even 20 times a second, which is not really often.

my try to fix the issue:

i created a global player grp variable, to destroy the grp after use like in wc3:

  • leak
    • Events
      • Timer - Every 0.05 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • Variable - Set tempgrp[0] = (All players)
      • Player Group - Pick each player in tempgrp[0] and do (Actions)
        • Actions
          • Variable - Set tempgrp[1] = (Player group((Picked player)))
          • UI - Display ((Text((Number of times (Current trigger) has been executed))) + (Name of player (Picked player))) for tempgrp[1] to Subtitle area
          • Variable - Set tempgrp[1] = (Empty player group)
          • Variable - Set tempgrp[1] = No Player Group
      • Variable - Set tempgrp[0] = (Empty player group)
      • Variable - Set tempgrp[0] = No Player Group
STILL THE SAME LEAK.
so, what now? :)

lets remove all the stuff and make the trigger even more easy:

  • leak
    • Events
      • Timer - Every 0.05 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • UI - Display (Text((Number of times (Current trigger) has been executed))) for (All players) to Subtitle area
it still leaks.
why? i dont really know but it does. maybe "all players" also creates a unit grp that isnt destroyed. or chat messages arent deleted and leak automatically. but i can tell you that i had other tests already without chat messages, and the same problem accured, for exmaple with camera actions.

map download: http://www.2shared.com/file/YYfQglUX/leakproof.html
 
Last edited:
Level 6
Joined
Sep 28, 2009
Messages
222
We wait until the realease of the actuall game that most likely has all the functionalities added. This is beta.

you wont believe it.
i did all tests in windowed mode and with trigger debug window.
if i turn off the trigger debug window all leaks are gone.

so its the trigger debug window thats leaking, not starcraft itself, i lold :D
i thought of this bevore, but i never disabled it, i just closed the window, but this had no effect. quite interessting.
(its still a bug)

conclusion: never test with trigger debug window if you got periodic triggers, otherwise you will think your map is leaking like hell ~~
 
Status
Not open for further replies.
Top