Leak Check v2

Status
Not open for further replies.
P

phatal

Guest
56k.. Would you PLEASE add a feature where you can just paste the trigger directly in to the program instead of having to paste in to the file, save it, load it, check it. Thanks for the AWESOME prog.!
 
T

ThePixelator

Guest
phatal said:
56k.. Would you PLEASE add a feature where you can just paste the trigger directly in to the program instead of having to paste in to the file, save it, load it, check it. Thanks for the AWESOME prog.!

What he said :D
Its a huge hassle to have to save to a file.
 

Nestharus

o-o
Reaction score
84
I don't generally use leack check unless I have some serious leak issues and I just can't find it, but I have a bad leak that I don't know how to remove. it's a location within a location, lol. For some reason, the location inside just won't remove. I tried using a variable to remove it, but that didn't help either.

Code:
Actions
    For each (Integer CenterPointIndexPoisonOrb) from 0 to 7, do (Actions)
        Loop - Actions
            -------- Poison Orbs --------
            For each (Integer A) from 1 to 3, do (Actions)
                Loop - Actions
                    Set PoisonOrbLeak[0] = (Position of PoisonOrbUnit[PoisonOrbUnitIndex])
                    Set PoisonOrbMove = (CenterPointPoisonOrb[CenterPointIndexPoisonOrb] offset by PoisonOrbOffset[PoisonOrbOffsetIndex] towards ((Angle from CenterPointPoisonOrb[CenterPointIndexPoisonOrb] to [B]PoisonOrbLeak[0][/B]) + PoisonOrbDegrees) degrees)
                    Unit - Move PoisonOrbUnit[PoisonOrbUnitIndex] instantly to PoisonOrbMove
                    Point - Remove PoisonOrbLeak[0]
                    Point - Remove PoisonOrbMove
                    Set PoisonOrbUnitIndex = (PoisonOrbUnitIndex + 1)
                    Set PoisonOrbOffsetIndex = (PoisonOrbOffsetIndex + 1)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    Or - Any (Conditions) are true
                        Conditions
                            CenterPointIndexPoisonOrb Equal to 5
                            CenterPointIndexPoisonOrb Equal to 6
                Then - Actions
                    Set PoisonOrbDegrees = 2.00
                Else - Actions
                    Set PoisonOrbDegrees = -2.00
    Set PoisonOrbUnitIndex = 0
    Set PoisonOrbOffsetIndex = 0

The memory leak is in bold.
You see my problem?
 
S

scythetleppo

Guest
------------------
Total lines: 16

Location Leak Detection ON
Unit Group Leak Detection ON
Special Effect Leak Detection ON
Variable Removal Detection ON

(Line: 14 ) (Word: 8 ) Unit Group Leak
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Explode (Picked unit))
Unit Group - Pick every unit in ^Leak
(Suggested fix) Custom Script: set bj_wantDestroyGroup = true
(Suggested fix) Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Explode (Picked unit))


Completed
Total amount of leaks: 1
Leak Rating: Good
------------------


I added the 'Custom Script: set bj_wantDestroyGroup = true', but it still comes up with that.. the exact same thing it showed before..what am I missing?
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
"Triggering Unit" and "Picked Unit" are leaking.
Replace them with variables and you should be fine.
 
G

Gameboybob

Guest
Hey i'm having a problem with this piece of code.
Code:
Total lines: 34

Location Leak Detection ON
Unit Group Leak Detection ON
Special Effect Leak Detection ON
Variable Removal Detection ON

(Line: 23 ) (Word: 8 )  Position Leak in setting of variable
Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardAlliance) + TempInteger)  
Set Multiboard_Spots[(Player number of (Picked player))] = ^Leak

(Line: 27 ) (Word: 8 )  Position Leak in setting of variable
Set Multiboard_Spots[(Player number of (Picked player))] = ((Position of (Picked player) in LeaderboardHorde) + TempInteger)  
Set Multiboard_Spots[(Player number of (Picked player))] = ^Leak


Completed
Total amount of leaks: 2
Leak Rating: Good

As you can see it does not give me a suggested fix and the problem seems to come from an integer Leaderboad - Learderboard position? I did not think integers leaked? or is it the player thats the problem? What is the command to destroy a player veriable? call DestroyPlayer(PlayerVeriable) perhaps? i'm new to Jass and have only used the GUI so far so i'm not sure what to do. Thanks in advance.
 

SFilip

Gone but not forgotten
Reaction score
634
Its just one of many reasons why not to use this program...
No, those things don't leak. No, there is no need to destroy a player variable, that would defeat/disconnect the player. No, integers can't leak.
My advice: don't use Leak Check. Simply don't, read a good tutorial, feel free to create a topic and ask if you removed the leaks correctly and people will help you.
 
J

jus1992

Guest
um......

Well here is the newest version of Leak Check.

I made alot of changes to it awhile ago and forgot what I have added and havent added, so please post any triggers that do leak and Leak Check does not detect it and I will try to fix it right away and upload an updated version.

There are some new features included in version 2. One of them is the duel textboxes, the left textbox shows your trigger and the right is where it displays the leaks your trigger contains.

Another feature is to be able to choose what you want Leak Check to look for, there are 4 checkboxes on the bottom right. Check all checkbox to check for all leaks. They should be checked by default.

There is also now a Save button, this saves the contents of both textboxes into a textfile.

*Note you do not have to download each update that is released, since they may be released weekly or even daily.
Code:
v2.02 changes
--------------
Suggested fix has been updated now showing what to change in the exact leaking action, this may still not show on all leaks but will in later versions as I continue to add it for each leak.
Added Report, this will post a reply to the Leak Check thread on TheHelper.net containing the trigger loaded into the program. This is only to be used to report leaks that leak check is not detecting in a trigger. Abuse of this feature may result in punishment.
Added Options menu, this will be used for new features to help customize and enhance the use of Leak Check.
Check on Startup added, this is in the options menu. If enabled it will check a file for leaks upon startup of the program.

this is nooby question but whats a leak and how does this help one.
 
S

scythetleppo

Guest
Its just one of many reasons why not to use this program...
No, those things don't leak. No, there is no need to destroy a player variable, that would defeat/disconnect the player. No, integers can't leak.
My advice: don't use Leak Check. Simply don't, read a good tutorial, feel free to create a topic and ask if you removed the leaks correctly and people will help you.

It's just buggy, it is seeing "position of" and it thinks it's a location variable, which would say "position of myunit." This program definately has its uses but just don't count on it to be the final word.


this is nooby question but whats a leak and how does this help one.

http://www.thehelper.net/forums/showthread.php?t=27242&highlight=leaks
 

Im_On_56k

Hm...
Reaction score
116
My advice: don't use Leak Check. Simply don't, read a good tutorial, feel free to create a topic and ask if you removed the leaks correctly and people will help you.
That seems a little harsh telling people not to use it when it is actually quite useful.

Not everyone can just look at a tutorial and know how to detect and remove leaks which is what this program is for. For a beginner this program can prove very useful, it was not made for the advanced mapper.

Its just one of many reasons why not to use this program...
Really, what are the other many reasons that make this program worthless?

Sure this program isn't perfect or even near perfect, but it does exactly what it is made for and does a good enough job at it to.

Anyways topic closed, don't have time anymore to work on this. If anyone has questions regarding this a simple PM will do.
 

SFilip

Gone but not forgotten
Reaction score
634
> it was not made for the advanced mapper.
Yet it makes the people rely on it far too much.
"Its ok, this is 100% leakless, LeakCheck says so"
"This trigger is bad, LeakCheck says 'Location variable has not been removed'...well I trust it, I'll just create a new trigger"
If a bug suddenly comes up someone would think a trigger perhaps leaks. Someone might just think that a multiboard position leaks and even dump the trigger.

No, I'm not saying that its bad. Its great until you get the hang of leaks. But a lot of people continue using it even when they do.

> what are the other many reasons that make this program worthless?
The very fact that you would let a computer program judge something like this instead of you.

I'm sorry for demoting it like this, I'm aware it probably took a lot of work and time to make this.
And you might want to consider releasing the source since you stopped developing it. Someone might just want to take over...
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top