WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Action blocked taint spam. (https://www.wowinterface.com/forums/showthread.php?t=55789)

Lesteryoung 10-04-17 10:03 AM

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.

MunkDev 10-04-17 12:59 PM

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.

Lesteryoung 10-04-17 01:24 PM

Thanks, do you think I should be hiding frames that way anyway?

Should I just be doing "FrameName:Hide()" for each of those?

MunkDev 10-04-17 02:12 PM

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.

sirpucna 12-16-17 07:35 AM

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

Resike 12-16-17 08:12 AM

Quote:

Originally Posted by sirpucna (Post 326161)
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?


All times are GMT -6. The time now is 03:03 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI