fix(12.0): guard secret aura curve color in PostUpdateAura (script ran too long)#1865
Open
mjodheim wants to merge 1 commit into
Open
fix(12.0): guard secret aura curve color in PostUpdateAura (script ran too long)#1865mjodheim wants to merge 1 commit into
mjodheim wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In-game error in Midnight (12.x):
auras.lua:360is justif 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.GetAuraDispelTypeColorreturns a color whoser/g/bare secret numbers. ElvUI already treats it as secret everywhere else:UnitFrames/Elements/AuraHighlight.luanames the resultsecretColorand feedscolor.r/.g/.bstraight into the setter (never branches on them).Auras/Auras.luadoescolor = (curve and GetAuraDispelTypeColor(...)) or fallbackand passescolor.r/.g/.bdirectly intoSetBackdropBorderColor.But
UF:PostUpdateAura(UnitFrames/Elements/Auras.lua) extracted the components:if not rbranches on a secret number, tainting the per-aura update loop (PostUpdateButtonruns 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