• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Problem with leaks

Status
Not open for further replies.
Level 19
Joined
Jul 2, 2011
Messages
2,161
Hello, I've just about finished up with all my trig making. The map looks good and the game play is awesome. All I need now is for the final flush over of the trigs. I know for a fact that there are a few leaks and for the life of me I can't fix them.

If your interested, please download my map and fix all my remaining trig leaks.

Then finally my game will be complete, and of course your name will be there in the thank you section... I will even name a boss after you.

If you just want to play my game for kicks, and don't really want to help... please leave a comment in this thread.

Thanks and bye

here's the link
http://www.hiveworkshop.com/forums/pastebin.php?id=q867l1
 

EdgeOfChaos

E

EdgeOfChaos

Every time you used a location and unit group, you leaked it. Center of region, unit selections, they all leaked. Your map was very heavy on unit creations, which means you were literally leaking hundreds of locations and groups every 60 or so seconds. What this did to your warcraft III, I shudder to think...

I will fix them and post them map when I get as many as I can done, but I highly advise you read a tutorial on this. If you don't, you write hundreds of memory leaks rendering your map unplayable, then have to spend hours fixing them.

Will post map when I am done.

Example: When all was done, the "Spawn Master" trigger leaked over 30 locations.

Edit: Done. Here's an example.

Before:
  • spawn master
    • Events
    • Conditions
    • Actions
      • Sound - Play Sound30[wavenumber]
      • Trigger - Turn on GetSpecial <gen>
      • If (wavenumber Equal to 1) then do (Unit - Create 30 Ghoul (01) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 2) then do (Unit - Create 30 Crypt Fiend (02) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 3) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 3) then do (Unit - Create 10 Ghoul (201) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 4) then do (Unit - Create 30 Abomination (04) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 4) then do (Unit - Create 10 Crypt Fiend (02) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 5) then do (Unit - Create 30 Abomination (04) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 5) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 6) then do (Unit - Create 30 Crypt Fiend (02) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 6) then do (Unit - Create 30 Tauren (204) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 7) then do (Unit - Create 30 Abomination (204) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 7) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 8) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 8) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 9) then do (Unit - Create 30 Grunt (201) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 9) then do (Unit - Create 30 Shaman (203) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 30 Grunt (01) for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 5 Doom Guard for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 11) then do (Unit - Create 30 Kodo Beast for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 11) then do (Unit - Create 30 Tauren (204) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 12) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 12) then do (Unit - Create 30 Necromancer (203) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 13) then do (Unit - Create 30 Shadow Wolf (Level 4) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 14) then do (Unit - Create 30 Siege Golem (208) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 15) then do (Unit - Create 30 Skeleton Archer (Dark) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 16) then do (Unit - Create 30 Wraith for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 17) then do (Unit - Create 30 Berserk Wildkin (209) for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 17) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 18) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 18) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 19) then do (Unit - Create 30 Frost Wyrm (05) for Player 12 (Brown) at (Center of Evil Region2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 19) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 20) then do (Unit - Create 30 Frost Wyrm (205) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 20) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 21) then do (Unit - Create 40 Zombie for Player 12 (Brown) at (Center of Evil Region <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 21) then do (Unit - Create 20 Ice Troll Warlord (08) for Player 12 (Brown) at (Center of Evil Region5 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 22) then do (Unit - Create 20 Blue Dragon (09) for Player 12 (Brown) at (Center of Spawn Order <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 22) then do (Unit - Create 40 Zombie for Player 12 (Brown) at (Center of Evil Region2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 23) then do (Unit - Create 40 Nerubian Queen (207) for Player 12 (Brown) at (Center of Evil Region5 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 23) then do (Unit - Create 40 Frost Revenant (S6) for Player 12 (Brown) at (Center of Evil Region4 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 24) then do (Unit - Create 1 Namore (Evil) for Player 12 (Brown) at (Center of Evil Spawn 3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 25) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 26) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 26) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at (Center of Evil Spawn 2 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 27) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at (Center of Evil region3 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 28) then do (Unit - Create 30 Red Dragon (S5) for Player 12 (Brown) at (Center of Evil Region5 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 29) then do (Unit - Create 30 Ogre Magi (S4) for Player 12 (Brown) at (Center of Evil Region4 <gen>) facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 29) then do (Trigger - Run instant rivive death <gen> (checking conditions)) else do (Do nothing)
      • If ((Random unit from (Units in q4 <gen>)) Equal to Chinz Supreme Being 0175 <gen>) then do (Trigger - Run repeat attack <gen> (checking conditions)) else do (Do nothing)

After:
  • spawn master
    • Events
    • Conditions
    • Actions
      • Sound - Play Sound30[wavenumber]
      • Trigger - Turn on GetSpecial <gen>
      • Set TempPoint = (Center of Evil Spawn 3 <gen>)
      • If (wavenumber Equal to 1) then do (Unit - Create 30 Ghoul (01) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 5) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 6) then do (Unit - Create 30 Tauren (204) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 7) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 8) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 9) then do (Unit - Create 30 Shaman (203) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 30 Tauren (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 11) then do (Unit - Create 30 Tauren (204) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 14) then do (Unit - Create 30 Siege Golem (208) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 15) then do (Unit - Create 30 Skeleton Archer (Dark) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 18) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 19) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 20) then do (Unit - Create 30 Frost Wyrm (205) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 24) then do (Unit - Create 1 Namore (Evil) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 12) then do (Unit - Create 30 Necromancer (203) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 13) then do (Unit - Create 30 Shadow Wolf (Level 4) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 16) then do (Unit - Create 30 Wraith for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 17) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil region3 <gen>)
      • If (wavenumber Equal to 2) then do (Unit - Create 30 Crypt Fiend (02) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 3) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 3) then do (Unit - Create 10 Ghoul (201) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 4) then do (Unit - Create 30 Abomination (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 4) then do (Unit - Create 10 Crypt Fiend (02) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 5) then do (Unit - Create 30 Abomination (04) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 6) then do (Unit - Create 30 Crypt Fiend (02) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 7) then do (Unit - Create 30 Abomination (204) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 8) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 9) then do (Unit - Create 30 Grunt (201) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 30 Grunt (01) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 10) then do (Unit - Create 5 Doom Guard for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 27) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil Spawn 2 <gen>)
      • If (wavenumber Equal to 11) then do (Unit - Create 30 Kodo Beast for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 12) then do (Unit - Create 30 Crypt Fiend (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 17) then do (Unit - Create 30 Berserk Wildkin (209) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 18) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 20) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 25) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 26) then do (Unit - Create 30 Death Revenant for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 26) then do (Unit - Create 30 Troll Headhunter (202) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil Region2 <gen>)
      • If (wavenumber Equal to 19) then do (Unit - Create 30 Frost Wyrm (05) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 22) then do (Unit - Create 40 Zombie for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil Region5 <gen>)
      • If (wavenumber Equal to 21) then do (Unit - Create 20 Ice Troll Warlord (08) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 23) then do (Unit - Create 40 Nerubian Queen (207) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 28) then do (Unit - Create 30 Red Dragon (S5) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil Region <gen>)
      • If (wavenumber Equal to 21) then do (Unit - Create 40 Zombie for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Spawn Order <gen>)
      • If (wavenumber Equal to 22) then do (Unit - Create 20 Blue Dragon (09) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set TempPoint = (Center of Evil Region4 <gen>)
      • If (wavenumber Equal to 23) then do (Unit - Create 40 Frost Revenant (S6) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • If (wavenumber Equal to 29) then do (Unit - Create 30 Ogre Magi (S4) for Player 12 (Brown) at TempPoint facing (Player 1 (Red) start location)) else do (Do nothing)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • If (wavenumber Equal to 29) then do (Trigger - Run instant rivive death <gen> (checking conditions)) else do (Do nothing)
      • Set TempGroup = (Units in q4 <gen>)
      • If ((Random unit from TempGroup) Equal to Chinz Supreme Being 0175 <gen>) then do (Trigger - Run repeat attack <gen> (checking conditions)) else do (Do nothing)
      • Custom script: call DestroyGroup(udg_TempGroup)


Download: https://www.mediafire.com/?8xlbpctedqps36j
I didn't remove all leaks, but the ones that I thought were most serious. The game should run OK now. You can remove the rest of the leaks if you want.
 
Last edited by a moderator:
Level 19
Joined
Jul 2, 2011
Messages
2,161
Wow!!!

Thanks, I totally forgot about this as my work started and everything... but now... wow!

No one has ever helped me with this before, now I know what a leak is, and I know how to deal with them!

Thanks!!!!

If I could send rep I would!

WOW!
 
Level 19
Joined
Jul 2, 2011
Messages
2,161
Thanks again, really you are a blessing, no one has ever helped me before which is great that you have fixed my game for good.

It now runs without crashing and that's good enough for me!
 
Status
Not open for further replies.
Top