WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (https://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   The Big Taint thread (https://www.wowinterface.com/forums/showthread.php?t=51820)

Resike 02-02-15 09:13 AM

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...

Resike 02-02-15 09:13 AM

Reserved for the future.

p3lim 02-02-15 01:21 PM

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.

semlar 02-02-15 02:27 PM

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.

Resike 02-02-15 03:25 PM

Quote:

Originally Posted by p3lim (Post 305968)
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.

Phanx 02-02-15 06:02 PM

Quote:

Originally Posted by Resike (Post 305975)
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.

p3lim 02-02-15 08:52 PM

Quote:

Originally Posted by semlar (Post 305972)
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.

sezz 04-23-15 10:47 AM

Quote:

Originally Posted by Resike (Post 305953)
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).

Rilgamon 04-23-15 03:12 PM

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 ... ;)

sezz 04-23-15 03:39 PM

Quote:

Originally Posted by Rilgamon (Post 308390)
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


Torhal 04-23-15 03:53 PM

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.

sezz 04-23-15 03:58 PM

Quote:

Originally Posted by Torhal (Post 308392)
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?

Torhal 04-23-15 04:29 PM

Quote:

Originally Posted by sezz (Post 308393)
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.

Resike 04-23-15 05:39 PM

Quote:

Originally Posted by sezz (Post 308393)
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.

Seerah 04-23-15 07:53 PM

/console taintLog 11

;)

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

sezz 04-24-15 11:16 AM

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.

Quote:

Originally Posted by Torhal (Post 308394)
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.

Quote:

Originally Posted by Seerah (Post 308400)
/console taintLog 11

;)

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

Haha :D

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. :cool:

Ferodra 02-10-19 06:09 AM

I usually don't necro threads, but as it just ate about 2 hours of debugging, i'm happy to say that ActionButton_GetOverlayGlow also causes Actionbutton taint, as it seems to create a new overlay frame, which i wasn't aware of.

For me, it just occured when hovering a spell in my spellbook while in combat.


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

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