Quantcast The Big Taint thread - WoWInterface
Thread Tools Display Modes
02-02-15, 09:13 AM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,277
The Big Taint thread

Since many of the addons suffer from taints, and it's very hard to track some of them, i tought it would be a good idea to make a thread to create the list of the most common taints, and how to avoid them.
If any of you have more usefull information from any of the existing taints, i would like to ask you to share it in this thread.

Dropdown taint

Error Message: [ADDON_ACTION_BLOCKED] AddOn "AddonName" tried to call the protected function "CompactRaidFrame1-8:Show()".

Caused by: This taint happens when you use Blizzard's built in dropdown menu templates from the UIDropDownMenu.lua, UIDropDownMenuTemplates.xml and EasyMenu.lua. The taint sooner or later will spread to the CompactRaidFrames, because it's using the same templates when you right click on raid members. Additionally it can also infect the Battleground dropdown queues, making it impossible to queue to battlegrounds.

Spread by: UIDropDownMenu_SetSelectedName, UIDropDownMenu_SetSelectedValue, UIDropDownMenu_SetSelectedID calls.

Fix: Use NoTaint UIDropDownMenu instead of the Blizzard ones, or use your own customly created dropdowns.

ActionButton taint

Error Message: [ADDON_ACTION_BLOCKED] AddOn 'AddonName' tried to call the protected function 'ActionButton1-12:Show()'.

Caused by: It's pretty similar to the dropdown taint, mostly spread by using templates from ActionBarFrame.xml, ActionButton.lua and ActionButtonTemplate.xml. Also can be caused by ActionButton_ShowOverlayGlow and ActionButton_HideOverlayGlow API calls.

Spread by: ActionButton_ShowOverlayGlow, ActionButton_HideOverlayGlow calls.

Fix: I have a half-fix notaint template lib coming for this soon.

More coming soon...
  Reply With Quote
02-02-15, 09:13 AM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,277
Reserved for the future.
  Reply With Quote
02-02-15, 01:21 PM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,676
See if you can make any sense out of this one:

Code:
8/22 20:29:10.594  Interface\FrameXML\WatchFrame.lua:328
8/22 20:29:10.594  An action was blocked in combat because of taint from Overhead - NamePlate690:SetScale()
8/22 20:29:10.594      Interface\AddOns\Overhead\Overhead.lua:161 Initialize()
8/22 20:29:10.594      Interface\AddOns\Overhead\Overhead.lua:224
Overhead is my nameplate addon, it has no fancy features, just skinning the nameplates.
This happened before 6.0 though.
  Reply With Quote
02-02-15, 02:27 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,056
You can't call SetScale on a nameplate in combat because they're protected unit frames, I don't know what that has to do with the watchframe though.
  Reply With Quote
02-02-15, 03:25 PM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,277
Originally Posted by p3lim View Post
See if you can make any sense out of this one:

Code:
8/22 20:29:10.594  Interface\FrameXML\WatchFrame.lua:328
8/22 20:29:10.594  An action was blocked in combat because of taint from Overhead - NamePlate690:SetScale()
8/22 20:29:10.594      Interface\AddOns\Overhead\Overhead.lua:161 Initialize()
8/22 20:29:10.594      Interface\AddOns\Overhead\Overhead.lua:224
Overhead is my nameplate addon, it has no fancy features, just skinning the nameplates.
This happened before 6.0 though.
Thats intresting, since if i know well WatchFrame.lua got removed from the game, it's called Blizzard_ObjectiveTracker.lua now and it's an AddOn.
  Reply With Quote
02-02-15, 06:02 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Resike View Post
Thats intresting, since if i know well WatchFrame.lua got removed from the game, it's called Blizzard_ObjectiveTracker.lua now and it's an AddOn.
Yes, as he mentioned in his post, the error was from pre-6.0, so it's probably not relevant to anything at all at this point.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
02-02-15, 08:52 PM   #7
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,676
Originally Posted by semlar View Post
You can't call SetScale on a nameplate in combat because they're protected unit frames, I don't know what that has to do with the watchframe though.
The odd thing is that this happened while not in combat, happened on login in a city.
Might not be relevant any more, but it still boggled me when I encountered it.
  Reply With Quote
04-23-15, 10:47 AM   #8
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 100
Originally Posted by Resike View Post
Error Message: [ADDON_ACTION_BLOCKED] AddOn 'AddonName' tried to call the protected function 'ActionButton1-12:Show()'.

Caused by: It's pretty similar to the dropdown taint, mostly spread by using templates from ActionBarFrame.xml, ActionButton.lua and ActionButtonTemplate.xml. Also can be caused by ActionButton_ShowOverlayGlow and ActionButton_HideOverlayGlow API calls.

Spread by: ActionButton_ShowOverlayGlow, ActionButton_HideOverlayGlow calls.
Any other possible causes for this?

I'm not using any of the templates and I'm not messing with ActionButton_* but still encounter that error most of the time upon engaging combat or shortly after combat ends (but not every time - it's hard to debug where it comes from, I have absolutely no idea yet because everything works as expected).
  Reply With Quote
04-23-15, 03:12 PM   #9
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 725
Code:
/console taintLog 1
This enables a logfile which gets big quite fast. So you should not run it too long or while raiding.
Going through this file (logs/taint.log) you'll see the order in which taints are happening and where.
If you're still not happy with that switch it to verbose mode
Code:
/console taintLog 2
and never forget
Code:
/console taintLog 0
to disable.

Its a painful process digging through a gigabyte logfile ...
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
04-23-15, 03:39 PM   #10
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 100
Originally Posted by Rilgamon View Post
Code:
/console taintLog 1
This enables a logfile which gets big quite fast. So you should not run it too long or while raiding.
Going through this file (logs/taint.log) you'll see the order in which taints are happening and where.
If you're still not happy with that switch it to verbose mode
Code:
/console taintLog 2
and never forget
Code:
/console taintLog 0
to disable.

Its a painful process digging through a gigabyte logfile ...

Thanks but the taintLog doesn't help because it doesn't tell me where the error occurs in my addon, only where it happens in Blizzard's code?

Code:
4/23 23:37:50.364  An action was blocked in combat because of taint from sUI - ActionButton9:Show()
4/23 23:37:50.364      Interface\FrameXML\ActionButton.lua:301
4/23 23:37:50.364      ActionButton_Update()
4/23 23:37:50.364      Interface\FrameXML\ActionButton.lua:263 ActionButton_UpdateAction()
4/23 23:37:50.364      Interface\FrameXML\ActionBarController.lua:145 ActionBarController_ResetToDefault()
4/23 23:37:50.364      Interface\FrameXML\ActionBarController.lua:134 ActionBarController_UpdateAll()
4/23 23:37:50.364      Interface\FrameXML\DraenorZoneAbility.lua:75
  Reply With Quote
04-23-15, 03:53 PM   #11
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Taint means "user code touched this" which then taints the rest of that codepath. You didn't touch the action buttons directly, but you (or someone else - the taint reporting isn't always foolproof) tainted part of the Blizzard code which at some point calls the action button code. That's why there's a stack track in the "action blocked" report; you trace back and hopefully discover where things went pear-shaped.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
04-23-15, 03:58 PM   #12
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 100
Originally Posted by Torhal View Post
Taint means "user code touched this" which then taints the rest of that codepath. You didn't touch the action buttons directly, but you (or someone else - the taint reporting isn't always foolproof) tainted part of the Blizzard code which at some point calls the action button code. That's why there's a stack track in the "action blocked" report; you trace back and hopefully discover where things went pear-shaped.
This means the only way to fix the taint is to disable everything step by step, right?
  Reply With Quote
04-23-15, 04:29 PM   #13
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by sezz View Post
This means the only way to fix the taint is to disable everything step by step, right?
If the blocked action is easily reproducible, that's definitely a way to go. There is an inherent problem in that you (or someone else) may have tainted a codepath via a completely unrelated subsystem; doing certain things with UIDropDownMenu, for example, can cause CompactRaidFrame to complain with a blocked action because at some point that system uses the dropdowns.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
04-23-15, 05:39 PM   #14
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,277
Originally Posted by sezz View Post
This means the only way to fix the taint is to disable everything step by step, right?
It's really hard to detect even after you know which addon is causing it, mostly thats why i made this threat to let the authors know the most common issues/mistakes.
  Reply With Quote
04-23-15, 07:53 PM   #15
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,556
/console taintLog 11



(Note: this is only available on test servers, and will FLOOD your log.)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-24-15, 11:16 AM   #16
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 100
Thanks for your help, my issue seems to be fixed, took me 8 hours of testing, guessing and goggleing (is that an english word?) :/
The thing is, I don't know what exactly caused it.

I've been using my own UI since 2008 and there is a lot of code from back then. I only changed/updated everything that appeared in the taint log that looked like it could lead to errors (like directly replacing blizzard functions with my own, not checking for InCombatLockdown() and stuff like that) and also changed some variables that were accidentially declared as globals.

Originally Posted by Torhal View Post
If the blocked action is easily reproducible, that's definitely a way to go.
The problem is, that the error didn't always occur. It had something do to with getting in combat/out of combat and joining/leaving groups. Sometimes it happened after being AFK for a minute and getting in combat after that time.

Originally Posted by Seerah View Post
/console taintLog 11



(Note: this is only available on test servers, and will FLOOD your log.)
Haha

Well, I'm happy it's gone and I hope it stays like that. The good thing is I switched to using Git 2 years ago, so whenever it occurs again, it should be easy to track down #beingoptimistic.

PS: Sorry for my crappy english.
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » The Big Taint thread

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