fix(unitframes): retry the Player Aura Bars unlock registration - #1996
Open
dfrisone wants to merge 1 commit into
Open
fix(unitframes): retry the Player Aura Bars unlock registration#1996dfrisone wants to merge 1 commit into
dfrisone wants to merge 1 commit into
Conversation
Reported for Unlock Mode: after a login or reload the buff frame behaved as though it still had to be placed through Blizzard Edit Mode, and the custom bar styling was not applied. Toggling Use Blizzard Buffs on and back off restored both until the next reload. Nothing persistent differed either side of that workaround: the toggle stores nil when off, so the saved value was the same before and after. What it actually did was re-run CreateBars and the unlock registration late enough to succeed. RegisterPABUnlock and RegisterPABCustomUnlock both opened by returning silently when EllesmereUI.MakeUnlockElement / RegisterUnlockElements were not published yet. That API comes from another file, so CreateBars can reach them first. TryCreateBars already retries for ns.db arriving late, but nothing covered this second readiness condition, and once it was missed no mover was built for the rest of the session. Both now retry on the same capped, once-a-frame pattern. Giving up after the cap stays quiet instead of erroring: the API is legitimately absent all session when the module publishing it is switched off, and erroring there would spam every login.
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.
Reported by @|Me-Galois|<ε (Unlock Mode, 8.9.4). After a login or
/reloadtheplayer buff frame behaves as though it still has to be placed through Blizzard
Edit Mode, and the EUI buff styling is not applied. Toggling Use Blizzard
Buffs on and back off restores both, until the next reload.
Why the workaround is the clue
Nothing persistent differs either side of it. The setter stores
v and true or nil, so toggling on then off returns the value tonil, exactlywhat it already was. No saved state changes, which is why no amount of settings
fiddling helps and why it resets every session.
What the toggle actually does is call
PAB_ApplyUseBlizzard(), which re-runsCreateBars()and the unlock registration -- late enough to succeed.Root cause
RegisterPABUnlockandRegisterPABCustomUnlockboth opened with:That API is published from another file and can arrive after
CreateBarshasalready run. The bail was silent and nothing re-drove it, so no mover was built
for the whole session and the frame read as Blizzard-owned.
This file already handles the sibling race:
TryCreateBarsretries on a cappedbackoff because
ns.dblands a frame afterPLAYER_LOGIN. There are twoindependent readiness conditions here and only one of them was retried.
That also fits "only on my Mage, other characters on the same profile are fine":
a load-order race turns on init timing, not on saved settings, so it can land
the same way every login on one character and never on another.
Fix
Both registrations now retry on the same capped, once-a-frame pattern the file
already uses. Giving up after the cap stays quiet rather than erroring, since
the API is legitimately absent for the whole session when the module that
publishes it is switched off, and erroring there would spam every login for
those users.
Testing
luac -pclean; house style check clean. Click-tested in game and behavingcorrectly. Worth a confirmation from the reporter as well, since the race is
timing-dependent and landed on his character rather than every character.