Thread Tools Display Modes
10-04-17, 10:03 AM   #1
Lesteryoung
A Black Drake
Join Date: Aug 2015
Posts: 81
Action blocked taint spam.

I've been getting action blocked errors consistently and so did a taintLog and this showed up,
Code:
10/3 01:42:50.577  An action was blocked in combat because of taint from ModifyFrames - Boss1TargetFrame:SetPoint()
10/3 01:42:50.577      Interface\FrameXML\UIParent.lua:2861 <unnamed>:UIParentManageFramePositions()
10/3 01:42:50.577      Interface\FrameXML\UIParent.lua:2160
10/3 01:42:50.577      <unnamed>:SetAttribute()
10/3 01:42:50.577      Interface\FrameXML\UIParent.lua:2912 UIParent_ManageFramePositions()
10/3 01:42:50.577      Interface\FrameXML\BuffFrame.lua:331 BuffFrame_UpdateAllBuffAnchors()
10/3 01:42:50.577      Interface\FrameXML\BuffFrame.lua:104 BuffFrame_Update()
10/3 01:42:50.577      Interface\FrameXML\BuffFrame.lua:49
.

The lua that is tainting is this:

Lua Code:
  1. --[[PetActionBarFrame:ClearAllPoints()
  2. PetActionBarFrame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 322, 112)
  3. PetActionBarFrame:SetScale(.87)]]
  4.  
  5. LossOfControlFrame:SetScale(.93)
  6. SpellActivationOverlayFrame:SetScale(.94)
  7.  
  8. PlayerFrame.feedbackText = PlayerFrame:CreateFontString(nil, "OVERLAY", "NumberFontNormalHuge")
  9. PlayerFrame.feedbackStartTime = 0
  10. PetFrame.feedbackText = PlayerFrame.feedbackText
  11. PetFrame.feedbackStartTime = 0
  12.  
  13. local noop = function() return end
  14.  
  15. for _, objname in ipairs({
  16.     "PlayerStatusTexture",
  17.     "PetAttackModeTexture",
  18.     "UIErrorsFrame",
  19.     "PetName",
  20.     "PlayerFrameGroupIndicator",
  21.     "MainMenuBarRightEndCap",
  22.     "MainMenuBarLeftEndCap",
  23.     "PlayerFrameRoleIcon",
  24.     "PlayerAttackGlow",
  25.     "PlayerPrestigeBadge",
  26.     "PlayerPrestigePortrait",
  27.     "FocusFrameTextureFramePrestigeBadge",
  28.     "FocusFrameTextureFramePrestigePortrait",
  29.     "TargetFrameTextureFramePrestigeBadge",
  30.     "TargetFrameTextureFramePrestigePortrait",
  31.     "FramerateLabel"
  32. }) do
  33.     local obj = _G[objname]
  34.     if obj then
  35.         obj:Hide()
  36.         obj.Show = noop
  37.     end
  38. end
  39.  
  40. local obj = PlayerPlayTime:GetParent().MultiGroupFrame
  41. obj:Hide()
  42. obj:HookScript("OnShow",function(self) self:Hide() end)
  43.  
  44. FramerateText:SetPoint("LEFT",FramerateLabel,"RIGHT",-19,0)

Could someone tell me what would be causing errors in that lua? Thanks.
  Reply With Quote
10-04-17, 12:59 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Lua Code:
  1. obj.Show = noop

This line that replaces the Show function for each of those objects also taints every one of them. Anytime :Show() is called for one of those objects from signed code, the execution path will get tainted and break if it hits a protected function call afterwards. This happens because the noop function is not from signed code.

A better approach to forcing them to stay hidden would be:
Lua Code:
  1. hooksecurefunc(obj, 'Show', obj.Hide)

Instead of replacing the Show function, this line will make sure it immediately calls :Hide() on the object any time :Show() is called on it.
__________________

Last edited by MunkDev : 10-04-17 at 01:02 PM.
  Reply With Quote
10-04-17, 01:24 PM   #3
Lesteryoung
A Black Drake
Join Date: Aug 2015
Posts: 81
Thanks, do you think I should be hiding frames that way anyway?

Should I just be doing "FrameName:Hide()" for each of those?
  Reply With Quote
10-04-17, 02:12 PM   #4
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Sure, but if their visibility state is altered by the UI at any point they will show up again. Since you're getting errors with taint, that tells me at least one of them has their state altered through the execution path. And you can't hook the script handler on textures, because they don't have any script handlers.
__________________
  Reply With Quote
12-16-17, 07:35 AM   #5
sirpucna
An Aku'mai Servant
Join Date: Nov 2016
Posts: 33
bit of a necro
but i also ran into the same problem
the line thats tainting this example is:
"PlayerStatusTexture"

also another example is:
"PlayerRestGlow"

hope this helps someone else who might be searching
  Reply With Quote
12-16-17, 08:12 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by sirpucna View Post
bit of a necro
but i also ran into the same problem
the line thats tainting this example is:
"PlayerStatusTexture"

also another example is:
"PlayerRestGlow"

hope this helps someone else who might be searching
You are probably trying to move the player frame insecurely?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Action blocked taint spam.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off