tullaCC

tullaCC

198k Downloads

Cooldown timer (number) is incorrect

johnsolver opened this issue ยท 8 comments

commented

The cooldown timer gets 'confused' at times, I noticed it with Avenger Shield which has a cooldown reset mechanic. It seems to be related to the reset mechanic, where the timer doesn't get 'reset' correctly when the skill becomes available and instead gets carried over somehow.

PS. to clarify this is after the rewrite commit.

commented

Yes, the one commited 7 days ago

commented

Are you running the latest release, the latest commit here?

commented

Seems inconsistent and hard to reproduce but I have since seen it happen with a few different skills and characters. Mainly with skills that have cooldown reduction/reset mechanics, and once with a skill that doesn't.

(To be clear that is with the current last commit on master 28ad7d3)

Edit: attaching a screenshot of it in action, the left top most button shows Immolation, it's normal cooldown is 13.6s (reduced by haste), but you can see that it's almost up and shows 13.

immolation

commented

I've added a few workarounds that might fix the issue, but I still have not reproduced it myself.

commented

Looks good so far, haven't been able to reproduce it.

PS. it seems to use less cpu cycles but does generate more garbage. I assume since it now creates and deletes timer objects.

Pre-rewrite Post-rewrite Post-fix
cpu 1260 442 299
garbage 0 14kb 697kb
commented

A small issue with number conversion:

start = 4233513.043
duration = 64800000

Message: integer overflow attempting to store 4233513043
Time: 05/16/17 09:23:58
Count: 1
Stack: [C]: in function format' Interface\AddOns\tullaCC\timer.lua:48: in function GetOrCreate'
Interface\AddOns\tullaCC\display.lua:92: in function <Interface\AddOns\tullaCC\display.lua:76>
[C]: in function SetCooldown' Interface\FrameXML\Cooldown.lua:5: in function CooldownFrame_Set'
Interface\FrameXML\WorldMapActionButton.lua:94: in function UpdateCooldown' Interface\FrameXML\WorldMapActionButton.lua:87: in function Refresh'
Interface\FrameXML\WorldMapActionButton.lua:26: in function SetHasWorldQuests' Interface\FrameXML\WorldMapFrame.lua:1019: in function <Interface\FrameXML\WorldMapFrame.lua:939> [C]: in function WorldMap_UpdateQuestBonusObjectives'
Interface\FrameXML\WorldMapFrame.lua:1340: in function WorldMapFrame_Update' Interface\FrameXML\WorldMapFrame.lua:2883: in function WorldMapFrame_UpdateMap'
...
Interface\FrameXML\WorldMapFrame.lua:379: in function <Interface\FrameXML\WorldMapFrame.lua:358>
[C]: in function Show' Interface\FrameXML\UIParent.lua:2420: in function SetUIPanel'
Interface\FrameXML\UIParent.lua:2222: in function ShowUIPanel' Interface\FrameXML\UIParent.lua:2132: in function <Interface\FrameXML\UIParent.lua:2128> [C]: in function SetAttribute'
Interface\FrameXML\UIParent.lua:2914: in function ShowUIPanel' Interface\FrameXML\UIParent.lua:2898: in function ToggleFrame'
Interface\FrameXML\WorldMapFrame.lua:263: in function `ToggleWorldMap'
[string "TOGGLEWORLDMAP"]:1: in function <[string "TOGGLEWORLDMAP"]:1>

Locals: (*temporary) = "%d-%d"
(*temporary) = 4233513043
(*temporary) = 64800000

commented

Next up, I'll pool timers to try and minimize garbage creation.

commented

Not sure which is better considering the increase in cpu usage.

no-pooling pooling
cpu 337 468
garbage 696kb 27kb