Skip to content

Fix ADDON_ACTION_BLOCKED for MultiBarBottomLeft:SetFrameStrata in Midnight#1817

Open
lixard-wow wants to merge 3 commits intotukui-org:mainfrom
lixard-wow:fix/settings-panel-taint-midnight
Open

Fix ADDON_ACTION_BLOCKED for MultiBarBottomLeft:SetFrameStrata in Midnight#1817
lixard-wow wants to merge 3 commits intotukui-org:mainfrom
lixard-wow:fix/settings-panel-taint-midnight

Conversation

@lixard-wow
Copy link
Copy Markdown

@lixard-wow lixard-wow commented Apr 5, 2026

Problem

In Midnight (12.0), closing the talent frame produces:

ADDON_ACTION_BLOCKED: AddOn 'ElvUI' tried to call the protected function 'MultiBarBottomLeft:SetFrameStrata()'

This fires every time the talent frame is closed (2x per open/close cycle).

Root Cause

Two patterns in DisableBlizzard() taint SettingsPanel, causing a protected call to fail inside a secure execution context:

1. SetScript on SettingsPanel.OnHide (line ~1323)

-- Before (taints SettingsPanel):
_G.SettingsPanel:SetScript('OnHide', AB.SettingsPanel_OnHide)

SetScript completely replaces the frame's handler with ElvUI addon code, tainting SettingsPanel. When UIParentPanelManager closes SettingsPanel as part of the talent frame's HideUIPanel chain (inside a SetAttribute-triggered secure execution), ElvUI's tainted OnHide runs and poisons the execution context.

2. Direct TransitionBackOpeningPanel replacement (line ~1337)

-- Before (taints SettingsPanel):
_G.SettingsPanel.TransitionBackOpeningPanel = AB.SettingsPanel_TransitionBackOpeningPanel

Direct Lua table assignment replaces a Blizzard method with an ElvUI function, tainting the frame. UIParentPanelManager calls TransitionBackOpeningPanel() inside the same secure execution chain, running tainted ElvUI code, which then causes MultiBarBottomLeft:SetFrameStrata() to be blocked.

Fix

1. SetScriptHookScript
HookScript appends ElvUI's handler after the original without replacing or tainting it.

2. Direct replacement → hooksecurefunc + clear opener
hooksecurefunc preserves the untainted Blizzard implementation. Setting self.opener = nil in the hook prevents the game menu from reopening (the original intent of the replacement) without introducing taint into the secure execution path.

Testing

  • Open and close the talent frame repeatedly — ADDON_ACTION_BLOCKED for SetFrameStrata should no longer fire
  • Verify the game menu does not unexpectedly reopen after closing the Settings Panel
  • Verify SettingsPanel_OnHide behavior (bindings save, micro buttons update) still works correctly

…night

In Midnight (12.0), two patterns in DisableBlizzard() taint SettingsPanel,
causing ADDON_ACTION_BLOCKED for MultiBarBottomLeft:SetFrameStrata() whenever
the talent frame is closed.

Root cause: When the talent frame closes, UIParentPanelManager calls HideUIPanel
which invokes SetAttribute to start a secure execution context. SettingsPanel
may be hidden as part of this chain, triggering its OnHide. ElvUI replaced OnHide
via SetScript (tainting SettingsPanel) and directly replaced TransitionBackOpeningPanel
(also tainting it), so ElvUI's tainted code runs inside the secure execution and
blocks the subsequent MultiBarBottomLeft:SetFrameStrata() call.

Fix:
1. SetScript -> HookScript for SettingsPanel OnHide.
2. Direct TransitionBackOpeningPanel replacement -> hooksecurefunc + clear opener.
…executerange

In Midnight (12.0), EditMode's UpdateSystems runs inside secureexecuterange,
calling BreakFromFrameManager -> SetParent on Blizzard unit frames. This triggers
ElvUI's LockParent hooksecurefunc, which calls frame:SetParent(E.HiddenFrame).
Calling SetParent from tainted code inside a secure execution blocks an internal
protected C call (reported as UNKNOWN).

Fix: defer the re-parent via C_Timer.After(0) to run on the next tick, outside
the secureexecuterange. Added InCombatLockdown() guards for the combat case.
@lixard-wow lixard-wow force-pushed the fix/settings-panel-taint-midnight branch from 223d2a5 to 4811014 Compare April 5, 2026 19:20
…reCalls

Registering AddLinePreCall(LINETYPE_SELLPRICE, TT.AddMoneyInfo) placed a
callback in InsecureLinePreCalls. TooltipDataHandler's ProcessLinePreCalls
checks next(InsecureLinePreCalls) for every line in every tooltip, and when
that table is non-empty it routes through the AttributeDelegate
attribute-crossing path. For C_TooltipInfo.GetTraitEntry data (talent buttons)
inside instances, that crossing taints the secret leftColor values, causing
GameTooltip_AddColoredLine to throw 'attempt to index local color (a secret
table value tainted by ElvUI)'.

Fix: remove the AddLinePreCall registration so InsecureLinePreCalls stays empty,
keeping the talent tooltip line processing on the clean path. The sell price
reformatting is moved to a post-call scan inside GameTooltip_OnTooltipSetItem,
which already runs via the InsecureTooltipPostCalls path (fires after ProcessLines
so it cannot affect the color error).
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