Skip to content

fix(12.0): guard secret aura curve color in PostUpdateAura (script ran too long)#1865

Open
mjodheim wants to merge 1 commit into
tukui-org:mainfrom
mjodheim:fix/12.0-secret-aura-curve-color
Open

fix(12.0): guard secret aura curve color in PostUpdateAura (script ran too long)#1865
mjodheim wants to merge 1 commit into
tukui-org:mainfrom
mjodheim:fix/12.0-secret-aura-curve-color

Conversation

@mjodheim

Copy link
Copy Markdown
Contributor

Problem

In-game error in Midnight (12.x):

ElvUI_Libraries/.../oUF/elements/auras.lua:360: script ran too long
  auras.lua:360 in function <auras.lua:345>   (filterIcons)
  auras.lua:406 in function 'func'            (UpdateAuras)
  oUF/events.lua:85

auras.lua:360 is just if result == VISIBLE then — it's where the watchdog tripped, not the bug. As with the other 12.0 taint reports, tainted execution gets a drastically reduced budget, so once the per-aura loop is tainted a later iteration trips "script ran too long".

Root cause

C_UnitAuras.GetAuraDispelTypeColor returns a color whose r/g/b are secret numbers. ElvUI already treats it as secret everywhere else:

  • UnitFrames/Elements/AuraHighlight.lua names the result secretColor and feeds color.r/.g/.b straight into the setter (never branches on them).
  • The standalone Auras/Auras.lua does color = (curve and GetAuraDispelTypeColor(...)) or fallback and passes color.r/.g/.b directly into SetBackdropBorderColor.

But UF:PostUpdateAura (UnitFrames/Elements/Auras.lua) extracted the components:

if color then
    r, g, b = color:GetRGB()   -- r,g,b become SECRET numbers
end
...
if not r then                  -- <-- branches on a secret number -> TAINT
    r, g, b = unpack(fallback)
end

if not r branches on a secret number, tainting the per-aura update loop (PostUpdateButton runs for every visible aura), which collapses the script budget and trips the watchdog above.

Fix

Mirror the AuraHighlight / standalone-Auras pattern: keep the curve result as an object (the object reference itself is not secret, only its fields are) and pass its components directly into SetBackdropBorderColor, never branching on the extracted numbers.

Strict no-op when the color is not secret.

🤖 Generated with Claude Code

In Midnight (12.x) C_UnitAuras.GetAuraDispelTypeColor (used via
UF:GetAuraCurve) returns a color whose r/g/b are SECRET numbers - ElvUI
already treats this as secret elsewhere (AuraHighlight's `secretColor`,
and the standalone Auras module which feeds color.r/.g/.b straight into
the setter).

PostUpdateAura instead extracted them with `r, g, b = color:GetRGB()`
and then did `if not r then`, branching on a secret number. That taints
the per-aura update loop; tainted execution gets a drastically reduced
budget in 12.0, so a later iteration trips the watchdog with
"oUF/elements/auras.lua:360 script ran too long" (the line is just where
the budget collapsed, not the bug).

Keep the curve result as an object and pass its components directly into
SetBackdropBorderColor (widget setters accept secret values), mirroring
the AuraHighlight / standalone-Auras pattern. Strict no-op when the color
is not secret.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant