- Joined
- Jul 10, 2008
- Messages
- 353
I suspect this func has a leak cause its the only place TimerGetElapsed is called in the entire war3map.j
From error logs:
Log 1:
Log 2:
In those 2 logs, these are the last parts of the logger before game crashes. Any suggestions on how I can fix this or if the function posted is "alright" ?
JASS:
function Func0001 takes real local_real01 returns nothing
local real local_real02
local real local_real03=TimerGetElapsed(timer009)
if local_real03<=0 then
set timer009=CreateTimer()
call TimerStart(timer009,1000000,false,null)
endif
if(local_real01>0)then
loop
set local_real02=local_real01-TimerGetElapsed(timer009)+local_real03
exitwhen local_real02<=0
if(local_real02>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*local_real02)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
From error logs:
Log 1:
Execlayer[number:9]...[Player] OK [9]
Exec:GetTriggerUnit[]...[GetTriggerUnit] OK [1185052('h06Y')]
Exec:GetUnitUserData[unit:1185052('h06Y')]...[GetUnitUserData] OK [5]
Exec:GroupAddUnit...[GroupAddUnit] OK [Group:1049918, unit:1185052('h06Y')]
Exec:GroupRemoveUnit...[GroupRemoveUnit] OK [Group:1049866, unit:1185052('h06Y')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.25]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2562]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2688]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.275]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1185584('h02D')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1185218('h087')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1185814('h04D')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1185836('h04D')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1185712('h04D')]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:RemoveUnit...[RemoveUnit] OK [unit:1186906(0)]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2938]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2938]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3375]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3688]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.375]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.375]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.375]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3813]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2125]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2188]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.425]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4313]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4313]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.7125]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.475]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.475]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.475]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4875]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4938]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4938]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.5]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6125]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.625]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6313]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6438]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6625]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6688]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.5563]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.6688]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.675]
Exec:TimerGetElapsed[Timer:1052994]...[TimerGetElapsed] OK [4317]
Exec:TriggerSleepAct
Log 2:
Exec:IsPlayerInForce[player:0, Force:1132097]...[IsPlayerInForce] OK [true]
Exec:SetTextTagVisibility...[SetTextTagVisibility] OK [t:99, flag:false]
Exec:RemoveLocation...[RemoveLocation] OK [Location:1132101]
[ForGroup] OK [Group:1131690, callback:574]
ExecestroyGroup...[DestroyGroup] OK [Group:1131690]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.5875]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.3125]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.4438]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.525]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.525]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.1]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.2125]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeout:0.25]
Exec:TimerGetElapsed[Timer:1053012]...[TimerGetElapsed] OK [1393]
Exec:TriggerSleepAction...[TriggerSleepAction] OK [timeou
In those 2 logs, these are the last parts of the logger before game crashes. Any suggestions on how I can fix this or if the function posted is "alright" ?
Last edited: