Fix Aura Designer cold-cache miss on first aura application#53
Merged
Merged
Conversation
When the Aura Designer renders a frame whose unit hasn't had a UNIT_AURA event processed yet (hasFullScan = false), GetUnitAuras fell through to a legacy GetUnitAuras fallback that no longer exists on Midnight 12.0+. The elseif condition silently evaluated false and returned an empty table, causing indicators to not fire on the very first aura application. Replace the dead legacy branch with a synchronous ScanUnitFull call so the cache is bootstrapped in-place before the result is built. All subsequent calls hit the normal fast path (hasFullScan is now true). Fixes bug #834. Same root cause as bug #836.
DanderBot
added a commit
that referenced
this pull request
May 8, 2026
- Auras.lua: gate pinned-frame UNIT_AURA fallback on set.enabled and child:IsVisible() to mirror TriggerAuraUpdateForUnit; fix misleading 'children are contiguous' comments in both OnUnitAura and DirectScanAllUnits since pinned headers pre-create all 40 children. - AuraAdapter.lua: remove dead 'elseif GetUnitAuras' branch in the unmatched-IDs debug-logging block — GetUnitAuras was removed in Midnight 12.0+ and the branch is unreachable now that ScanUnitFull bootstraps the cache. - AuraDesigner/Options.lua: remove redundant Mixin(banner, BackdropTemplateMixin) — the banner is already created with the BackdropTemplate so SetBackdrop is always present. - Locales/enUS.lua: remove orphan L["Trigger"] and L["Alert When Expiring"] keys no longer referenced after the sound-indicator rework.
Owner
|
Merged in v4.3.8-alpha.1 — thanks for the fix, @Krathe82! Bug #834 (and its sister bug #836) is now marked Fixed - Next Update on Discord and fixed_in_alpha on Lab. CI will publish to the CurseForge alpha channel shortly. |
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.
Summary
GetUnitAurasfallback code that has been a no-op since Midnight 12.0+ removed that APIRoot cause
AuraAdapter:GetUnitAuras()has a fast path (reads fromDF.AuraCache) and a legacy fallback for whencache.hasFullScanis false. The fallback usedGetUnitAurasdirectly — an API that no longer exists on Midnight 12.0+. Theelseif GetUnitAurascondition silently evaluated false, so the function returned an empty table. Indicators didn't fire, then corrected themselves on the next UNIT_AURA event once the cache was properly populated.The race window is ~0.2s after a roster change (the
DirectModeRosterUpdatedelay), so it's hard to hit in normal play but real in scripted scenarios or on zone entry with existing auras.The code itself had a TODO comment flagging this exact fix since ~2026-04-15.
Fix
Replace the dead
elseif GetUnitAurasbranch with a synchronousScanUnitFull(unit)call. If the cache is cold whenGetUnitAurasis called, populate it right now and read from it. All subsequent calls take the normal fast path.Test plan
/rlwith AD enabled