WeakAuras

WeakAuras

206M Downloads

Errors within Dynamic Info on a Custom Status Trigger can break other auras.

nullKomplex opened this issue ยท 4 comments

commented

Describe the bug
Status trigger auras with Dynamic Info that throws errors can break other unrelated auras.
Intended Behavior: Error is thrown as expected.
Expected Behavior: Only an error is thrown, potentially this specific aura doesn't work at all.
Actual Behavior: Other auras stop operating as intended.

Do you have an error log of what happened?

[string "--[[ Error in 'Combat Load Bug - Working Er..."]:2: in function `durationFunc'
WeakAuras\GenericTrigger.lua:399: in function `ActivateEvent'
WeakAuras\GenericTrigger.lua:550: in function <WeakAuras\GenericTrigger.lua:511>
WeakAuras\GenericTrigger.lua:659: in function `ScanWithFakeEvent'
WeakAuras\GenericTrigger.lua:821: in function `LoadDisplays'
WeakAuras\WeakAuras-2.11.2.lua:1908: in function `LoadDisplays'
WeakAuras\WeakAuras-2.11.2.lua:1767: in function <WeakAuras\WeakAuras.lua:1655>
WeakAuras\WeakAuras-2.11.2.lua:1859: in function `ReloadAll'
WeakAuras\WeakAuras-2.11.2.lua:1544: in function `ScanAll'
WeakAuras\WeakAuras-2.11.2.lua:1494: in function `Resume'
...dOns\WeakAurasOptions\OptionsFrames\OptionsFrame.lua:184: in function <...dOns\WeakAurasOptions\OptionsFrames\OptionsFrame.lua:166>
[C]: in function `Hide'
WeakAurasOptions\WeakAurasOptions-2.11.2.lua:1529: in function <WeakAurasOptions\WeakAurasOptions.lua:1527>

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on a nil value"

To Reproduce

The problem may be reproduced as any class with the auras linked below, but here are the full steps:

  1. Create an aura with a Trigger of Status -> Conditions -> Always active trigger and a Load option of In Combat. I made this a text aura that shows "In combat."
  2. Create another aura:
    a. Trigger of Custom -> Status -> Event(s) -> NULLKOMPLEX (or whatever you desire as the event).
    b. The Custom Trigger simply needs to return true.
    c. In any dynamic info code block (I have tested all of them) return nil - 1 as an error-able line.
    d. Set the Load option to Not In Combat.
  3. Enter and leave combat (I attacked a dummy once).
  4. Observe as the In Combat aura stays loaded even though you have left combat.
  5. Reload and observe more auras breaking.

Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?

Tested with only the 5 official modules loaded (WeakAuras 2, WeakAuras Companion, WeakAuras Model Paths, WeakAuras Options, WeakAuras Templates).

Which version of WeakAuras are you using?

2.11.2

Was it working in a previous version? If yes, which was the last good one?

Unknown.

Additional context

https://wago.io/7AbhLqcH4

A few users have been reporting combat loaded auras behaving oddly recently in the discord, and eventually I discovered the cause to be an out of date version of this aura: https://wago.io/AtBWEonfZ/1.0.0 (that exact version is broken). Eventually I nailed down the cause. This likely runs deeper than merely combat/not in combat auras, but I don't know how to thoroughly investigate that.

Originally I wasn't able to duplicate this bug without using:

function()
    local a = function()
        return
    end
    return a() - 1
end

as one of the dynamic infos, but it's been working with just the above since. I'm leaving this here just in case.

commented

Do you happen to know if this is specific to combat? Or is it every load condition?

commented

I found the issue already.

commented

Using build a7f1781 I can confirm duration info was fixed, however name, icon, texture, and stack infos are all still breakable in this manner.

commented

This time for real it should be done.