Triggers - Memory Leaks

SFilip

Gone but not forgotten
Reaction score
634
If those actions worked the player would get defeated. :rolleyes:
You must only remove things that get recreated such as points or unit/player groups.
 
C

Capt Griffen

Guest
You missed out several types that can leak, and you have nothing about handle index leaks.
 
Z

Zerotech

Guest
Sorry to bring this up, I was wondering if it's possible to use the custom scripts call destroy fucntion on Array-Enabled Variables. It would certainly beat having to write x amount of times to remove for eg. 14 point variables and I would have to write 14 lines of point removals if one line of code can do it.

So far I've tried to use the For Integer A and adding the [Integer A] Array variable will not work.

UPDATE:
OK I see why, is that custom scripts are considered to be string variables as there aren't any viable solutions to workaround this.

It would be nice though that if you can remove x amount of lines and it would certainly make it a lot better.
 

SFilip

Gone but not forgotten
Reaction score
634
> for eg. 14 point variables
Why do you need so much? Two at most is all you will ever need to fix all leaks.
 
Z

Zerotech

Guest
call RemoveLocation(udg_myArray[bj_forLoopAIndex])

Thanks for the info.

Atm I'm not ready to enter the JASS Coding phase as I'm still learning the whole coding structure for world editor.

The 14 point variables that I've mentioned were for an arena map that I am currenlty working on.
 
T

tsbergman

Guest
Excellent tut! BTW, we are working on a ROC map and Custom Script requires TFT. Do we have to get into JASS to eliminate these leaks? I can also just setup a bunch of points on init and then keep using these over and over to avoid the leak. We are doing a maze map and have creeps bouncing between multiple point so we are using lots of center of region calls. Each time a point is leaked. About 60K in under an hour. Not too bad I think but still would like to get rid of the leaks.
 

SFilip

Gone but not forgotten
Reaction score
634
You can convert the whole trigger to Jass and add the custom script line, but unless you know Jass, don't do this until you are sure the thing is working perfectly.
 
Z

Zpothu

Guest
i have another question.... why should I keep removing these region points with the custom script if i am just going to create that point in that same spot every time. :banghead:
 
L

LucidWay

Guest
When i was working on this sheep farmer game (I fixed it up a lot, it wasnt my original map), there were HUGE memory leaks, the biggest one was an array memory leak. Ex:
You define a global array of length 10.
Then you set the array[12] = XXX
(This will create a copy of the original array that is now 12 long with the new values)
I know just creating the new array can be very expensive on the cpu. Im about 90% sure that it will also leave the old array behind as garbage.
Figured this could be added. Cheers.
 

emjlr3

Change can be a good thing
Reaction score
395
i do not believe that is the case, it does not really matter what you set it to, after u defined the array size

at the map init, it goes throgh all arrays and sets them to null/0

just because your array[12] was never set to null does not mean using it will leak anything
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
Hi

I would like to know, argh hard 2 explain i'll show you:^^


Here are some examples

Video - Turn cinematic mode Aus for Playergroup
Spielergruppe - Add (Picked player) to NoControlPlayerGroup
((Picked player) is in NoControlPlayerGroup) Ungleich True
Set Rechtsgehen[(Player number of (Picked player))] = -15.00


do these lines cause a leak?
Asking about wheter beeing in playergroup or not might not cause leaks i think.
But whats about get player number or so?

I somewhere read that only bj functions cause leaks.
These are no bj functions, i think they do not create leaks but i am not sure.

Can u check wheter something leaks or not by checking if it uses/is a bj function?


ty
 

Cilla

is watching you! Ahh, fresh meat!
Reaction score
39
To remove player group leaks, replace "Group" with "Force".


You can not replace group with force,
there is no set bj_wantDestroyForce = false


Can you tell me, what is the script to remove a force?

Edit: sry 4 doublepost
 
B

BIackSheep

Guest
trigger problem

hi,
something in the following trigger gets totaly wrong. In singleplayer everything works correct, but if i play with others, all other players leave without lagging out at the same time. It must be this trigger, because if i set a "wait game time seconds 1000000" before it, nobody leaves. I dont see what the problem could be. Could it be that i created the trigger in version 1.20e of warcraft and not 1.21? Please help me :(
Code:
Ereignisse
    Map initialization
Bedingungen
Aktionen
    
    Auslöser - Turn off plus 500 gold <gen>
    Wait 5.00 seconds
    Einheit - Change color of Hauch Gottes gelb 0270 <gen> to Gelb
    Spiel - Display to (All players) the text: Euer Gott wird in K...
    Video - Clear the screen of text messages for Spielergruppe - Spieler 1 (Rot)
    Wait 0.50 seconds
    Kamera - Pan camera as necessary for Spieler 1 (Rot) to (Position of Himmelsschloss 0160 <gen>) over 0.50 seconds
    Wait 0.50 seconds
    Video - Send transmission to Spielergruppe - Spieler 1 (Rot) from Gott 0020 <gen> named Turtorial: Play Kein Sound and display Du bekommst jetzt e....  Modify duration: Hinzufügen 5.00 seconds and Warten
    Wait 4.00 seconds
    Auslöser - Turn on video abbruch <gen>
    Video - Send transmission to Spielergruppe - Spieler 1 (Rot) from Gott 0020 <gen> named Turtorial: Play Kein Sound and display Wenn du aber schon ....  Modify duration: Hinzufügen 7.00 seconds and Nicht warten
    Wait 9.00 seconds
    Auslöser - Turn off video abbruch <gen>
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top