tullamods / OmniCC

Cooldown count for everything
https://tullamods.com/omnicc
MIT License
99 stars 21 forks source link

Some Grid2 Debuffs lose the icon cooldown animation if OmniCC is enabled #347

Closed Nercus closed 3 years ago

Nercus commented 4 years ago

Give us a clear and concise description of the problem, and what you expect to happen

From time to time it happens that a Grid2 debuff icon on a unitframe doesn't have the cooldown animation anymore. It mostly happens if multiple debuffs are applied to the group at the same time or on the same player. Important to note is that the cooldown text stays just the animation and that it is definitely not dependent what debuff it is.

Do you have any steps to reproduce this issue?

  1. Create Debuff Status with following settings:
    • Non Boss Debuffs
    • Boss Debuffs
    • Short Duration
    • Long Duration
    • Non Self Casted
    • Self Casted
    • Blacklist (box below filled with several spellnames)
  2. Add Indicator to the unitframe based on that status
  3. Go in group where multiple debuffs get applied at once

Are you getting any error messages?

No error messages at all.

What version of OmniCC are you running?

You can get this via the slash command /omnicc version. If you're not running the latest release, please try that version first.

You are using OmniCC Version (9.0.4)

What version of World of Warcraft are you on?

You can get this via the command, /dump GetBuildInfo().

[1]="9.0.2", 
[2]="36671", 
[3]="Nov 17 2020", 
[4]=90002

What other addons are you running?

Other info If videos/screenshots are needed I can provide some.

Tuller commented 3 years ago

Do you happen to have draw swipes disabled in OmniCC?

Nercus commented 3 years ago

That is enabled. I additionally added a picture for better context. Unbenannt

As you see the bursting debuff on the top 3 group members has no icon animation while the lower 2 are working correctly

Nercus commented 3 years ago

I'm actually not aware if this bug is coming from OmniCC or from Grid2. Any insight if opening a ticket for Grid2 is recommended?

Nercus commented 3 years ago

Someone already opened an issue several months ago on the Grid2 Curseforge page. The issue seems to be present for longer than i expected. For reference: https://www.curseforge.com/wow/addons/grid2/issues/793

michaelnpsp commented 3 years ago

Hi, i am the Grid2 maintaner and after some debugging, this are my preliminary findings: Ocasionally OmniCC is calling SetDrawSwipe(nil) for some Grid2 cooldowns, hidding the cooldown textures. OmniCC is calling Cooldown:UpdateStyle() before cooldown._occ_draw_swipe is initialized (this variable is initialized in Cooldown:SetTimer()). I know that _occ_draw_swipe was not initialized because is nil, and as far as i know Cooldown:GetDrawSwipe() returns true or false but never nil (see the variable assignment in Cooldown:SetTimer(). Anyway GetDrawSwipe() cannot return false too, because Grid2 never calls Cooldown:SetDrawSwipe() (and the default value for a new created cooldown is always true). The commented line below is executed while self._occ_draw_swipe variable is nil, hidding the cooldown texture..

function Cooldown:UpdateStyle()
    local settings = self._occ_settings
    if settings and not settings.drawSwipes then
        self:SetDrawSwipe(false)
    else
        self:SetDrawSwipe(self._occ_draw_swipe) // Line executed while self._occ_draw_swipe = nil
    end
end

I could not investigate further yet, Its difficult to trigger the issue, usually i have to reload the UI in the middle of a combat when auras are active on some players.

Update: The issue is triggered by assigning a zero duration and zero expiration time to the cooldown (for example displaying any aura with no expiration time), example code:

Cooldown:SetCooldown(0,0)
Cooldown:Show()

After executing this code for a new created cooldown, the cooldown swipe becomes invisible forever.

Tuller commented 3 years ago

Thanks for the detailed info

Tuller commented 3 years ago

The 9.0.5 release includes a quick fix for this

Nercus commented 3 years ago

Thanks both of you seems to be fixed.

I think the issue on the Grid2 curseforge page (https://www.curseforge.com/wow/addons/grid2/issues/793) can be closed.