HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A severe leak i cant find :S

08-29-2008, 12:04 AM#1
Darkrider
I need somebody to tell me where is this trigger leaking...

I cant find the cause... but after playing a while with the hero who has this ability ... the game starts to delay... little by little :S

why do i know this is causing lag? coz i changed the periodic time event from 0.03 to 0.06 and the map took a lot longer to show a significant delay... must say that the pcs we use to play are not the best in the world... but... the delay is not from the beginning ... when i use 0.03 it takes more or less 20 minutes to star lagging... if i use 0.06 it takes 44 minutes to star lagging ... so... there is no doubt that this trigger is casing the delay problem... but i cant find the leak...


here is the trigger in conflict

Trigger:
Sagitarius Arrow Movement
Collapse Events
Time - Every 0.06 seconds of game time
Conditions
Collapse Actions
Set Location3[62] = (Position of Sagitarius_Arrow_Dummy)
Set Location3[63] = (Position of Sagitarius_Arrow_Targ)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Distance between Location3[62] and Location3[63]) Greater than or equal to 40.00
Collapse Then - Actions
Set Location3[65] = (Location3[62] offset by 30.00 towards (Angle from Location3[62] to Location3[63]) degrees)
Unit - Move Sagitarius_Arrow_Dummy instantly to Location3[65]
If (((Current flying height of Sagitarius_Arrow_Dummy) Less than or equal to 300.00) and ((Distance between Location3[62] and Location3[63]) Greater than or equal to 2000.00)) then do (Animation - Change Sagitarius_Arrow_Dummy flying height to ((Current flying height of Sagitarius_Arrow_Dummy) + 100.00) at 200.00) else do (Do nothing)
If (((Current flying height of Sagitarius_Arrow_Dummy) Greater than or equal to 200.00) and ((Distance between Location3[62] and Location3[63]) Less than 2000.00)) then do (Animation - Change Sagitarius_Arrow_Dummy flying height to ((Current flying height of Sagitarius_Arrow_Dummy) - 100.00) at 200.00) else do (Do nothing)
Custom script: call RemoveLocation(udg_Location3[65])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Sagitarius_Arrow_Targ is in Spell_Imunity_Group) Not equal to True) and (((Sagitarius_Arrow_Targ is Magic Immune) Not equal to True) and (((Sagitarius_Arrow_Targ is in SleepingGroup) Not equal to True) and (((Sagitarius_Arrow_Targ has buff Eternal Drowsiness ) Not equal to True) and (((Sagitarius_Arrow_Targ has buff Coffin of Ice
Collapse Then - Actions
Unit - Grant shared vision of Sagitarius_Arrow_Targ to (Owner of Sagitarius_Arrow_Dummy)
Unit - Order Sagitarius_Arrow_Dummy to Stop
Unit - Order Sagitarius_Arrow_Dummy to Human Mountain King - Storm Bolt Sagitarius_Arrow_Targ
Wait until (Sagitarius_Arrow_Casted Equal to True), checking every 0.10 seconds
Animation - Play Sagitarius_Arrow_Dummy's death animation
Unit - Hide Sagitarius_Arrow_Dummy
Unit - Kill Sagitarius_Arrow_Dummy
Unit - Remove Sagitarius_Arrow_Dummy from the game
Unit - Deny shared vision of Sagitarius_Arrow_Targ to (Owner of Sagitarius_Arrow_Dummy)
Set Sagitarius_Arrow_Casted = False
Trigger - Turn off (This trigger)
Trigger - Turn off Sagitarius Arrow Target DIES <gen>
Trigger - Turn off Sagitarius Arrow Casted True <gen>
Collapse Else - Actions
Animation - Play Sagitarius_Arrow_Dummy's death animation
Unit - Hide Sagitarius_Arrow_Dummy
Unit - Kill Sagitarius_Arrow_Dummy
Unit - Remove Sagitarius_Arrow_Dummy from the game
Set Sagitarius_Arrow_Casted = False
Trigger - Turn off (This trigger)
Trigger - Turn off Sagitarius Arrow Target DIES <gen>
Trigger - Turn off Sagitarius Arrow Casted True <gen>
Custom script: call RemoveLocation(udg_Location3[62])
Custom script: call RemoveLocation(udg_Location3[63])


could it be the wait for condition accion? (it just wait for an ability to be casted and sets a boolean to true)

Thx in advance ^^
08-29-2008, 04:49 AM#2
Anopob
I THINK there isn't a leak, it's just that probably this trigg runs too many times (look at all the actions for the interval...). If so, how long does your map usually take to finish? If perhaps you change it to 0.09, and your game finishes in ~1 hour, maybe it would be alright?

If there is a leak, my mistake (too hard to look for a specific leak in all that though I tried).
08-29-2008, 05:19 AM#3
DioD
sleep + globals == overwrite and leaks.
08-29-2008, 05:27 AM#4
rulerofiron99
Had a similar problem. Heavy periodic triggers, worked fine without lag for a long time UNTIL I placed doodads. After that, the FPS dropped by about 2 each time I cast the spell. Then when I removed all doodads, all the lag vanished. Not sure if you can do that in your map, but give it a try.
08-30-2008, 04:14 PM#5
Darkrider
/quote mode on


Quote:
Originally Posted by Anopob
I THINK there isn't a leak, it's just that probably this trigg runs too many times (look at all the actions for the interval...). If so, how long does your map usually take to finish? If perhaps you change it to 0.09, and your game finishes in ~1 hour, maybe it would be alright?

If there is a leak, my mistake (too hard to look for a specific leak in all that though I tried).

actually... the thing that bothers me... is that there is no leak.... but im starting to think that the "wait for condition" action is messing everything up... ill change that part of the trigger and see what is going on

the time my map last varies... it could be 45 minutes or 3:30 hrs :/

it is an aos map... and kinda long sometimes

But ill try removing the wait for condition action and remake the trigger in that part and see what is going on...

Quote:
Originally Posted by DioD
sleep + globals == overwrite and leaks.

sleep ?

srry but didnt got you :/

Quote:
Originally Posted by rulerofiron99
Had a similar problem. Heavy periodic triggers, worked fine without lag for a long time UNTIL I placed doodads. After that, the FPS dropped by about 2 each time I cast the spell. Then when I removed all doodads, all the lag vanished. Not sure if you can do that in your map, but give it a try.

doodads always existed in the map... but i cant see the connection between doodads and periodic event triggers... besides... my map is full of them... but the only one with troubles is this one :/


/quote mode off


First of all... it took me a lot to answer coz of issues at work and my studies... now... going back to business i think that the problem might be this

When the unit gets at a distance less than 40 it enters in the "else" part of the if... and then it waits for an ability to be casted... what i think is that (as it is a periodic event) it will enter in the "else" a lot of times before the skill is actually casted... and i think "that" might be messing everything up... causing some serious lag... ill go change that part of the script and see if it is solved that way

soon my results shall be posted ^^
08-30-2008, 04:36 PM#6
Blubb-Tec
sleep = wait, it derives from the jass-syntax for waits
08-30-2008, 06:22 PM#7
Darkrider
humm... what he meant is that while i wait for the condition the variables Location3[62] and Location3[63] are overwritten without being removed and that generates a leak... well mr DioD ... if you would've expended 15 more seconds to explain yourself i could have find out what you meant... (my triggers are in gui... i dont have to know why sleep is wait ¬¬)

thx blubb-tech for the explanation
08-31-2008, 02:52 AM#8
DioD
Every 0.06 + Wait until (Sigaros arrow casted) cheking every 0.10

Next thread starts BEFORE prevous ended and all globals overwritten.
08-31-2008, 05:17 AM#9
Darkrider
hey thx now i get it (:P)

i modified the skill and now it doesnt need the wait for condition action... and it is a lot better than before :)