Thread Tools Display Modes
12-02-11, 09:00 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
4.3 taint issues and solutions

Is it just me or have others gotten taint issues aswell since 4.3?

I would like to start a thread that gathers issues and possible solutions.

The most visual problem I'm having is that sometimes when entering a raid the default Blizzard raidframe will show up. I have not nailed it down yet because it does not happen all the time. Inconsistence is bad.

Getting the taint:
1) /console taintlog 1
2) /reloadui
3) Copy the blocking message from log/taint.log
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
12-02-11, 09:11 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Just a little note that /console taintLog 1 sets a cvar that persists logins,
so you only need to set it once, then /reloadui whenever you see a taint message popping up.

(realize you probably know this already but just putting it here for any that stumble on the thread).
  Reply With Quote
12-02-11, 09:25 AM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by zork View Post
Is it just me or have others gotten taint issues aswell since 4.3?

I would like to start a thread that gathers issues and possible solutions.

The most visual problem I'm having is that sometimes when entering a raid the default Blizzard raidframe will show up. I have not nailed it down yet because it does not happen all the time. Inconsistence is bad.

Getting the taint:
No taints since 4.3

try this script for blizz raid frames

LUA Code:
  1. local BlizzRaidFrames = CreateFrame("Frame", nil, UIParent)
  2.  
  3. local function OnEvent(self, event, AddOn)
  4.     if AddOn == "Blizzard_CompactRaidFrames" then
  5.         _G["CompactRaidFrameManagerToggleButton"]:EnableMouse(false)
  6.         _G["CompactRaidFrameManager"]:SetAlpha(0)
  7.         _G["CompactRaidFrameManager"].container:SetParent(UIParent)
  8.         _G["CompactRaidFrameManager"]:SetScript("OnMouseUp", CompactRaidFrameManager_Toggle)
  9.         _G["CompactRaidFrameManager"]:SetScript("OnEnter", function(self)
  10.             if(self.collapsed) then
  11.                 UIFrameFadeIn(_G["CompactRaidFrameManager"], 1.2, self:GetAlpha(), 1)
  12.             end
  13.         end)
  14.         _G["CompactRaidFrameManager"]:SetScript("OnLeave", function(self)
  15.             if(self.collapsed) then
  16.                 UIFrameFadeOut(_G["CompactRaidFrameManager"], 0.8, self:GetAlpha(), 0)
  17.             end
  18.         end)
  19.         self:UnregisterEvent(event)
  20.         self:SetScript("OnEvent", nil)
  21.     end
  22. end
  23.  
  24. if (IsAddOnLoaded"Blizzard_CompactRaidFrames") then
  25.     OnEvent(BlizzRaidFrames, "ADDON_LOADED", "Blizzard_CompactRaidFrames")
  26. else
  27.     BlizzRaidFrames:RegisterEvent("ADDON_LOADED")
  28.     BlizzRaidFrames:SetScript("OnEvent", OnEvent)
  29. end
  30.  
  31. for _, bahs in pairs({
  32.     CompactUnitFrame_UpdateVisible,
  33.     CompactUnitFrame_UpdateAll,
  34.     PetFrame_Update,
  35. }) do
  36.     bahs = AftermathhUI.Func
  37. end
  38.  
  39. for _, bah in pairs({
  40.     _G["TutorialFrame"],
  41.     _G["CompactRaidFrameContainer"],
  42. }) do
  43.     bah:UnregisterAllEvents()
  44.     bah.Show = AftermathhUI.Func
  45.     bah:Hide()
  46. end

Last edited by Aftermathhqt : 12-02-11 at 09:29 AM.
  Reply With Quote
12-02-11, 09:26 AM   #4
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Yeah, been getting quite a few from pretty simple things like entering combat. I'll try to find out what's wrong.
  Reply With Quote
12-02-11, 09:48 AM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
AftermathUI.func is
lua Code:
  1. function () return end
Just for notice. Thus I'm going to try
lua Code:
  1. for _, v in pairs({
  2.     CompactUnitFrame_UpdateVisible, CompactUnitFrame_UpdateAll, --PetFrame_Update,
  3. }) do
  4.     v = function() return end
  5. end
  6.  
  7. for _, v in pairs({
  8.     _G["CompactRaidFrameContainer"], --_G["TutorialFrame"],
  9. }) do
  10.     v:UnregisterAllEvents()
  11.     v.Show = function() return end
  12.     v:Hide()
  13. end
But it is hard to believe that rewriting Blizzard functions and not hooking them secures does not give you taints.
The best solution I found so far for secure hiding is:
lua Code:
  1. local hideMe = function(self)
  2.   self:Hide()
  3. end
  4. hooksecurefunc(obj, "Show", hideMe)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-02-11 at 09:59 AM.
  Reply With Quote
12-02-11, 11:16 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
Originally Posted by zork View Post
It is hard to believe that rewriting Blizzard functions and not hooking them secures does not give you taints.
Taint happens all the time. The only time it becomes a problem is when Blizzard code tries to run a protected function when the taint still exists.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-02-11, 05:22 PM   #7
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Hi zork. I use rActionBarStyler embedded in my UI:

Code:
12/3 00:17:23.259  Global variable WORLDMAP_WINDOWED_SIZE tainted by FreeUI - Interface\AddOns\FreeUI\scripts\map.lua:3
12/3 00:17:23.259  Execution tainted by FreeUI while reading WORLDMAP_WINDOWED_SIZE - Interface\FrameXML\WorldMapFrame.lua:1653 WorldMapQuestShowObjectives_AdjustPosition()
12/3 00:17:23.259      Interface\FrameXML\WorldMapFrame.lua:1625
12/3 00:17:23.259      WorldMap_ToggleSizeDown()
12/3 00:17:23.259      Interface\AddOns\FreeUI\scripts\map.lua:75
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomLeftButton10:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/3 00:17:23.259      MultiBarBottomLeftButton10:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/3 00:17:23.259      MultiBarBottomLeftButton11:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomLeftButton11:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/3 00:17:23.259      MultiBarBottomLeftButton10:MultiBarBottomLeftButton10:()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/3 00:17:23.259      MultiBarBottomLeftButton12:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomLeftButton12:Show()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/3 00:17:23.259      MultiBarBottomLeftButton10:MultiBarBottomLeftButton10:()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/3 00:17:23.259      MultiBarBottomRightButton1:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomRightButton1:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/3 00:17:23.259      MultiBarBottomLeftButton10:MultiBarBottomLeftButton10:()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/3 00:17:23.259      MultiBarBottomRightButton2:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomRightButton2:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/3 00:17:23.259      MultiBarBottomLeftButton10:MultiBarBottomLeftButton10:()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:246
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/3 00:17:23.259      MultiBarBottomRightButton3:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  An action was blocked in combat because of taint from FreeUI - MultiBarBottomRightButton3:Hide()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:259
12/3 00:17:23.259      ActionButton_Update()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:484 ActionButton_OnEvent()
12/3 00:17:23.259      Interface\FrameXML\ActionButton.lua:105
12/3 00:17:23.259  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
Etc.

This is pretty much as soon as I enter combat, since 4.3 only. I know it says WORLDMAP_WINDOWED_SIZE but I never get taint from that unless something else taints it.
  Reply With Quote
12-02-11, 06:26 PM   #8
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I'm aware of that and ignore it. The buttonstyler hooks a Blizzard function via hooksecurefunc and only by doing so you get that taint. But there is no other secure way of doing so. The show/hide even happens in the hooked Blizzard function. (ActionButton_Update)
That is the reason why everything is working. Blizzard is telling me they block me for calling Show/Hide in combat (which I don't). And because I don't everything works normally...if that makes sense.

What I find pretty wierd is that it only happens once. (Not every combat)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-02-11 at 06:31 PM.
  Reply With Quote
12-02-11, 07:06 PM   #9
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
As far as I'm aware, as soon as a certain function or variable has been tainted, the UI doesn't report that taint anymore.
  Reply With Quote
12-03-11, 11:23 AM   #10
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
you guys... sheesh... that hooksecurefunction stuff does not make what you have put in the function capable of functioning in the secure environment. In other words just because you use hooksecure does not make it secure.

This is a chunk of secure code that runs the GrimUI context menu. It makes it so the context menu(a tray of buttons) can be shown/hidden in combat without taint.

Code:
local hotSpot = CreateFrame('Button', nil, UIParent, 'SecureHandlerClickTemplate')

hotSpot:SetHeight(16)
hotSpot:SetWidth(16)
hotSpot:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
hotSpot:SetFrameRef("contextMenu", contextMenu)
hotSpot:SetAttribute('_onclick', [[
	local frame = self:GetFrameRef("contextMenu")
	if button == 'LeftButton' then
		if IsControlKeyDown() then
			control:CallMethod("ToggleMiniMap")
		else
			if frame:IsVisible() then
				frame:Hide(true)
			else
				frame:Show(true)
			end
		end
	elseif button == 'RightButton' then
		if IsControlKeyDown() then
			control:CallMethod("ToggleInfoLog")
		else
		control:CallMethod("ToggleCombatLog")
		end
	end
]])
In order to get around taint issues you need to use code like this for any kind of show/hide or reposition of secured frames. A secured frame is any frame bliz has decided you could use an addon to move around during combat in a method that would allow you to "cheat" action bars fall into this catagory, the bosstargetframes, the focus frame, item buttons, the mounted control frame, some others to including the worldmap frame in a strange way... having to do with the questblobframe.

here is another example, this is the GrimUI config button. made secure so it could toggle the micro bar and options windows while in combat, note however that even though the options can be opened in combat 90% of them will not function. You pretty much can not move around any secure frame during combat no mater how you code it.
Code:
local configButton = CreateFrame('Button', configButton, UIParent, 'SecureHandlerClickTemplate')

configButton:SetHeight(30)
configButton:SetWidth(62)
configButton:RegisterForClicks('AnyUp')
configButton:SetNormalTexture([[Interface\AddOns\]] .. addonName .. [[\Media\ConfigButton]])
configButton:SetHighlightTexture([[Interface\AddOns\]] .. addonName .. [[\Media\ConfigButton]])
configButton:SetPoint('BOTTOMRIGHT', addon.skin, 'TOPRIGHT', -2, 0)
	
configButton:SetAttribute('_onclick', [[
	if button == 'LeftButton' and not IsControlKeyDown() then
		local microBar = self:GetFrameRef("microBar")
		if microBar:IsVisible() then
			microBar:Hide()
		else
			microBar:Show()
		end
	elseif button == 'RightButton' and not IsControlKeyDown() then
		control:CallMethod("OpenConfig")
	end
	
]])


function configButton:OpenConfig()
	if addon.configPanel then 
		if addon.configPanel:IsVisible() then
			InterfaceOptionsFrame:Hide()
		else
			addon.configPanel()
		end
	end
end
Also here is some good functions for show/hide/lock frames to prevent the reappearance of pesky frames.
Code:
--[[-----------------------------------------------------------------------------
DoNothing - A simple dummie/do nothing function
-------------------------------------------------------------------------------]]
local function DoNothing()
end
addon.DoNothing = DoNothing

--[[-----------------------------------------------------------------------------
HideTooltip - Hide GameTooltip (several frames use this)
-------------------------------------------------------------------------------]]
function addon:HideTooltip()
	GameTooltip:Hide()
	self.tooltip = nil
end

--[[-----------------------------------------------------------------------------
HideFrame - Hide a frame, prevents it from being reshown
-------------------------------------------------------------------------------]]
function addon:HideFrame(reference)
	local frame = type(reference) == 'string' and _G[reference] or reference
	if type(frame) ~= 'table' then return end
	frame.Show = DoNothing
	frame:Hide()
end

--[[-----------------------------------------------------------------------------
ShowFrame - Show a frame, undoing :HideFrame behavior
-------------------------------------------------------------------------------]]
function addon:ShowFrame(reference)
	local frame = type(reference) == 'string' and _G[reference] or reference
	if type(frame) ~= 'table' then return end
	frame.Show = nil
	frame:Show()
end

--[[-----------------------------------------------------------------------------
LockFrame - Lock a frame, prevents SetPoint and ClearAllPoints from working
-------------------------------------------------------------------------------]]
function addon:LockFrame(reference)
	local frame = type(reference) == 'string' and _G[reference] or reference
	if type(frame) ~= 'table' then return end
	frame.SetPoint = DoNothing
	frame.ClearAllPoints = DoNothing
end

--[[-----------------------------------------------------------------------------
UnlockFrame - Undo :LockFrame
-------------------------------------------------------------------------------]]
function addon:UnlockFrame(reference)
	local frame = type(reference) == 'string' and _G[reference] or reference
	if type(frame) ~= 'table' then return end
	frame.SetPoint = nil
	frame.ClearAllPoints = nil
end
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
12-03-11, 11:30 AM   #11
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
and oh yea... for a lot of stuff involving buttons and frames being repositioned especially if your repositioning bliz frames... you need to disable the bliz position manager or every time your moved frame passes through the position management it will taint.
Code:
UIPARENT_MANAGED_FRAME_POSITIONS['MultiBarBottomLeft'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MultiBarBottomRight'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MultiBarLeft'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MultiBarRight'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MultiCastActionBarFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MULTICASTACTIONBAR_YPOS'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['PetActionBarFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['PETACTIONBAR_YPOS'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['PossessBarFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ShapeshiftBarFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['SHAPESHIFTBAR_YPOS'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['VehicleMenuBar'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ContainerFrame1'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ContainerFrame2'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ContainerFrame3'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ContainerFrame4'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['ContainerFrame5'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS["CONTAINER_OFFSET_X"] = nil
UIPARENT_MANAGED_FRAME_POSITIONS["CONTAINER_OFFSET_Y"] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['BonusActionBarFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['BONUSACTIONBAR_YPOS'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['VEHICLEMENUBAR_YPOS'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['TargetFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['MainMenuBar'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS['Boss1TargetFrame'] = nil
UIPARENT_MANAGED_FRAME_POSITIONS["PlayerPowerBarAlt"] = nil
--UIPARENT_MANAGED_FRAME_POSITIONS['UIParent'] = nil
--table.wipe(UIPARENT_MANAGED_FRAME_POSITIONS);
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
12-04-11, 10:48 AM   #12
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
What I find most disturbing is the following. I'm hooking (hooksecurefunc) the Blizzard function "ActionButton_Update" because I'm using that function to check for new actionbuttons to be styled. If the button is already styled I return. All I do is to change some button textures.

The Blizzard function itself does Show/Hide on condition.

Now the crazy part is that I get a taint for Showing/Hiding. But I'm not doing that in my code. That is part of the Blizzard function. So by just hooking a Blizzard function that does Show/Hide you get a taint.

That wasn't the case with 4.2. I'm pretty sure about that because the functionality is unchanged. But not sure if the Show/Hide inside the Blizzard function is new...

That is pretty annoying because you may not hook any Blizzard functions with a Show/Hide/SetPoint anymore without tainting stuff.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
12-04-11, 01:05 PM   #13
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Protected frames make their parent protected as well.
Do you perhaps SetParent secure frames to yours?
  Reply With Quote
12-04-11, 04:56 PM   #14
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Update. Ok my bad I fixed it. The secure hook is actually working. What I did and what brought errors since 4.3 was preventing specific Show/Hide on hotkey and such.

So basically the taint was misleading.

Now there is only the damn extraActionBarFrame that needs to be workin.

DIFF: http://code.google.com/p/rothui/sour.../functions.lua
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-04-11 at 05:17 PM.
  Reply With Quote
12-05-11, 10:47 AM   #15
tukz
A Fallenroot Satyr
 
tukz's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 20
I was having taint aswell on 4.3 with raid frame, this is what i use atm for hiding raid frames, no bug/taint report on raid frame since using it:

https://github.com/tukz/Tukui/blob/m...d/kill.lua#L14

note: Kill() function is just one of my own function to UnregisterAllEvents() and Hide() on a specific frame.
  Reply With Quote
12-06-11, 04:51 PM   #16
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I'm having problems with the raid aswell.

Using stuff like...
lua Code:
  1. for _, v in pairs({
  2.         CompactUnitFrame_UpdateVisible, CompactUnitFrame_UpdateAll,
  3.     }) do
  4.         v = function() return end
  5.     end
  6.  
  7.     for _, v in pairs({
  8.         _G["CompactRaidFrameContainer"],
  9.         _G["CompactRaidFrameManagerContainerResizeFrame"],
  10.     }) do
  11.         v:UnregisterAllEvents()
  12.         v.Show = function() return end
  13.         v:Hide()
  14.     end

is just bad gives you a taint in combat right away if your raid gets changed infight.

The thing is...I like the CombatRaidFrameManger and I want to keep it.

Using this will make the manager fade in on mouseover.
lua Code:
  1. --add fading to the raidframe manager (code by Alza)
  2.       local listener = CreateFrame("Frame")
  3.       listener.check = function(self, event, addon)
  4.         if(addon~="Blizzard_CompactRaidFrames") then return end
  5.         CompactRaidFrameManagerToggleButton:EnableMouse(false)
  6.         local man = CompactRaidFrameManager
  7.         man:SetAlpha(0)
  8.         man.container:SetParent(UIParent)
  9.         man:SetScript("OnMouseUp", CompactRaidFrameManager_Toggle)
  10.         man:SetScript("OnEnter", function(self)
  11.           if(self.collapsed) then
  12.             UIFrameFadeIn(man, .2, 0, 1)
  13.           end
  14.         end)
  15.         man:SetScript("OnLeave", function(self)
  16.           if(self.collapsed) then
  17.             UIFrameFadeOut(man, .2, 1, 0)
  18.           end
  19.         end)
  20.         self:UnregisterEvent(event)
  21.         self:SetScript("OnEvent", nil)
  22.       end
  23.       if(IsAddOnLoaded("Blizzard_CompactRaidFrames")) then
  24.         listener.check(listener, "ADDON_LOADED", "Blizzard_CompactRaidFrames")
  25.       else
  26.         listener:RegisterEvent("ADDON_LOADED")
  27.         listener:SetScript("OnEvent", listener.check)
  28.       end

Currently the best idea I'm having is to resize the CompactRaidFrame to a tiny little thing and to hide it once we get out of combat.

Basically Hide it by default. Secure hook the Show and if that is called we try to hide it and if we are in combat we just add register the REGEN_ENABLED event and disable the frame once we get out of combat again.

That is the only secure method I can think of.

I'm currently testing this
lua Code:
  1. --check the default raid and make it fade
  2.     local checkRaid = CreateFrame("Frame")
  3.  
  4.     local killRaid = function(self)
  5.       self:Hide()
  6.       self:UnregisterAllEvents()
  7.     end
  8.  
  9.     local hideRaid = function(self)
  10.       if not InCombatLockdown() then
  11.         killRaid(self)
  12.         print("crfc show got called, hide it again")--debug
  13.       else
  14.         print("crfc show got called but cannot hide raid atm, in combat")--debug
  15.         checkRaid:RegisterEvent("PLAYER_REGEN_ENABLED")
  16.       end
  17.     end
  18.  
  19.     checkRaid:RegisterEvent("PLAYER_LOGIN")
  20.     checkRaid:SetScript("OnEvent", function(self,event,...)
  21.       local crfc = _G["CompactRaidFrameContainer"]
  22.       if event == "PLAYER_LOGIN" then
  23.         if crfc then
  24.           crfc:SetScale(0.0001)
  25.           crfc:SetAlpha(0)
  26.           killRaid(crfc)
  27.           hooksecurefunc(crfc, "Show", hideRaid)
  28.         end
  29.       end
  30.       if event == "PLAYER_REGEN_ENABLED" then
  31.         if crfc and crfc:IsShown() then
  32.           killRaid(crfc)
  33.           self:UnregisterEvent("PLAYER_REGEN_ENABLED") --kill the event again
  34.           print("ooc now, hide raid")--debug
  35.         end
  36.       end
  37.     end)

*Edit*
It worked on first try (check chat outputs):

Works in combat aswell. No taint. A big plus is the raid manager which I actually like.

Test:
Code:
/run print(_G["CompactRaidFrameContainer"]:IsShown())
Not sure if I can actually call self:Hide() in the hooksecurefunc while being in combat without tainting.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-06-11 at 06:13 PM.
  Reply With Quote
12-06-11, 05:04 PM   #17
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
This is what I use to completely kill the raid frame and the manager. Worked in 4.2, still seems to work without taint. Disabling PetFrame_Update is necessary.

Code:
F.dummy = function() end
Code:
CompactRaidFrameManager:UnregisterAllEvents()
CompactRaidFrameManager.Show = F.dummy
CompactRaidFrameManager:Hide()
PetFrame_Update = F.dummy
By the way, zork, your updates to rABS made tremendous improvements to the taint I've been getting. This is all I get now:

Code:
12/6 22:14:30.154  Execution tainted by FreeUI while reading GameTooltipMoneyFrame1SuffixText - Interface\FrameXML\MoneyFrame.lua:486 MoneyFrame_Update()
12/6 22:14:30.154      Interface\FrameXML\MoneyFrame.lua:296 MoneyFrame_UpdateMoney()
12/6 22:14:30.154      GameTooltipMoneyFrame1:OnShow()
12/6 22:14:30.154      GameTooltip:SetAction()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:579 ActionButton_SetTooltip()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:311
12/6 22:14:30.154      ActionButton_Update()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:478 ActionButton_OnEvent()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:105
12/6 22:14:30.154  An action was blocked in combat because of taint from FreeUI - BonusActionButton9:Show()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:246
12/6 22:14:30.154      ActionButton_Update()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:478 ActionButton_OnEvent()
12/6 22:14:30.154      Interface\FrameXML\ActionButton.lua:105
12/6 22:26:53.362  Global variable INTERFACE_ACTION_BLOCKED_SHOWN tainted by FreeUI - Interface\FrameXML\UIParent.lua:843
12/6 22:26:53.362      BonusActionButton9:Show()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:246
12/6 22:26:53.362      ActionButton_Update()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:478 ActionButton_OnEvent()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:105
12/6 22:26:53.362  Execution tainted by FreeUI while reading INTERFACE_ACTION_BLOCKED_SHOWN - Interface\FrameXML\UIParent.lua:840
12/6 22:26:53.362      BonusActionButton9:Show()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:246
12/6 22:26:53.362      ActionButton_Update()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:478 ActionButton_OnEvent()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:105
12/6 22:26:53.362  An action was blocked in combat because of taint from FreeUI - BonusActionButton9:Show()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:246
12/6 22:26:53.362      ActionButton_Update()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:478 ActionButton_OnEvent()
12/6 22:26:53.362      Interface\FrameXML\ActionButton.lua:105
  Reply With Quote
12-06-11, 06:00 PM   #18
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Check the updated rActionButtonStyler aswell. I fixed all the taints. Basically the solution is to remove all dummy functions. Check the DIFF: http://code.google.com/p/rothui/sour...ns.lua&old=788

Your raid function does NOT work. I had this aswell. You grab a taint if raid changes size in combat. The raid may not show up but you get a taint.

Using dummy functions to prevent a Blizzard function from being called will net you a taint in combat. You have to work around that by using hooksecurefunc, SetAlpha/SetScale and hide the frame once you are OOC.

Currently I'm taint free. Be it actionbars or raid frames. I'm happy now.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-06-11 at 06:04 PM.
  Reply With Quote
12-06-11, 06:44 PM   #19
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Yes, that was while using the updated button styler too. Might be something on my part then, I'll search on.

I never get taint from the raid frames anymore, so it works for me, I think.

While we're on the subject - does anyone know how I can -properly- rescale the mini world map (including all its sub frames, POI frame, etc) without overwriting WORLDMAP_WINDOWED_SIZE? I tried but I ended up nearly rewriting the whole Blizzard map code :/

Last edited by Haleth : 12-06-11 at 06:46 PM.
  Reply With Quote
12-13-11, 05:24 AM   #20
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Hmmm...Here is a problem I'm having.

In the Looking For Raid people will join and leave a read quite often, even while in combat. This will bring up the default raidframe all the time.

This is a problem because there is no way of securely hiding it. Thus when using any other unitframe in raids you have 2 raidframes active at the same time.

I just asked myself: What would be if we parent the raidframe to another frame that we create and that we Hide().

Basically:
lua Code:
  1. local hideRaid = CreateFrame("Frame")  
  2.   local crfc = _G["CompactRaidFrameContainer"]
  3.   crfc:SetParent(hideRaid)
  4.   hideRaid:Hide()

If the raidframe container does not reparent itself in any way there should be no way it ever gets shown because of the hidden state of the parented frame.

The question that stands, does this provide any benefit in CPU usage? Aka will the events/functions of the raidframe be disabled if the parent frame is hidden? I guess so.

Either that or I have no choice and need to get rid of the RaidFrameManager aswell.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 12-13-11 at 05:26 AM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » 4.3 taint issues and solutions

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