[DEFECT REPORT] UI taint

85 Tauren Druid
6765
ISSUE: Spurious taint warnings are being created and interfering with the operations of many addons, and appear to be coming from Blizzard UI code itself.

Expected behavior:
Normal run for addons

Observed behavior:
Code taints and taint spreads, in spite of using allowed/approved methods

How to reproduce:

Clear the taint log, do a simple frame creation and enter combat. Enter the Interface window and exit it. Observe large number of subsequent taint entries from Blizzard UI code.

Step By Step:

1. Disable all addons
2. Run the following from a command line:
/console taintLog 1
3. Run the following from a command line:
/reload
4. Run the following from a command line:
/run local frame=CreateFrame("Frame","TaintTest") frame.name="Taint Test" InterfaceOptions_AddCategory(frame)
5. Enter combat on a target dummy using only autoattack
6. While in combat enter the Interface window via ESC->Interface
7. Close the Interface window
8. Examine the formerly empty taint log.

Observed Result: multiple taint messages have been added.

Test Notes

Tested using the /run command since run and script both have the same potential for taint as an addon. Therfore this clearly delineates the defects as a Blizzard UI Code defect, by removing any possible source of taint from the player's addons. Also use only a target dummy so as to not introduce any other factors such as class, race, and opponent. Additionally use only AutoAttack to eliminate spells and abilities as a possible source of taint, isolating all taint sources to stock code and baseline actions.

A sample of events in the log are:

10/16 23:58:15.932 Global variable UIDROPDOWNMENU_MENU_LEVEL tainted by MACRO_TAINT - Interface\FrameXML\UIDropDownMenu.lua:38
10/16 23:58:15.932 Execution tainted by MACRO_TAINT while reading UIDROPDOWNMENU_MENU_LEVEL - Interface\FrameXML\UIDropDownMenu.lua:656 UIDropDownMenu_GetSelectedID()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide
()10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show
()10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRightButton7:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRightButton10:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomLeft:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarBottomRight:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarRight:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - MultiBarLeft:Hide()
10/16 23:58:15.932 Global variable UIDROPDOWNMENU_MENU_LEVEL tainted by MACRO_TAINT - Interface\FrameXML\UIDropDownMenu.lua:38
10/16 23:58:15.932 Execution tainted by MACRO_TAINT while reading UIDROPDOWNMENU_MENU_LEVEL - Interface\FrameXML\UIDropDownMenu.lua:656 UIDropDownMenu_GetSelectedID()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameContainer:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameManagerContainerResizeFrame:Hide()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:ClearAllPoints()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:SetPoint()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:ClearAllPoints()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:SetPoint()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:SetSize()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:Show()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameManagerContainerResizeFrame:ClearAllPoints()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameManagerContainerResizeFrame:SetHeight()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameManagerContainerResizeFrame:SetPoint()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrameContainer:SetHeight()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:ClearAllPoints()
10/16 23:58:15.932 An action was blocked in combat because of taint from MACRO_TAINT - CompactRaidFrame1:SetPoint()


Test Analysis: a review of the taint log shows the spreading taint appears to be triggered initially from the UIDropDownMenu code. Further testing shows that this may be related to the variables in that file being accidentally scoped as global, or improperly protected or accessed in Blizzard code.

One such variable is UIDROPDOWNMENU_MINBUTTONS. UIDropDownMenu.lua defines UIDROPDOWNMENU_MINBUTTONS as 8 -- exceeding this can trigger a taint issue in unrelated code. A simple addon can be constructed to demonstrate this by tracking the creation of CompactRaidFrame (other fames may be used, as seen in the taint log), before and after creating a frame and adding 7 items to it, then adding 8 items to it the next time.

hooksecurefunc("CreateFrame", function (frameType, frameName)
-- This detects when CompactRaidFrame1 gets created
-- and then displays the secure status of the frame.
if (frameName == "CompactRaidFrame1") then
print(frameName, "has just been created.");
local secure, addon = issecurevariable(_G, frameName);
if (not secure) then
print(frameName, "is tainted by", addon);
else
print(frameName, "is secure.");
end
end
end);

local function MyTest_DropDown_Initialize(self, level)
-- Adding 7 buttons does not cause CompactRaidFrame1 to
-- become tainted when it gets created.
-- Adding 8 buttons does cause CompactRaidFrame1 to
-- become tainted when it gets created.
for i = 1, UIDROPDOWNMENU_MINBUTTONS do
local info = UIDropDownMenu_CreateInfo();
info.text = "item" .. i;
info.value = "item" .. i;
info.func = function() end;
print("Adding button", i, "to the dropdown menu.");
UIDropDownMenu_AddButton(info);
end
end

local myframe = CreateFrame("Frame", "MyTest_Frame");
local dropdown = CreateFrame("Frame", "MyTest_DropDown", myframe, "UIDropDownMenuTemplate");
UIDropDownMenu_Initialize(dropdown, MyTest_DropDown_Initialize, "MENU");


CONCLUSION This is sufficient test information to find and repair the reported software defect, which is impacting a large portion of the playerbase who use AddOns. Suggested further actions include retention of the methods demonstrated in this defect report for use as a test case for part of the regression test suite, in future releases.
Reply Quote
So professional, oooooh.

Actually good job. They have no excuse after getting a real-world bug report like this one, you even included code!
Reply Quote
85 Tauren Druid
6765
Some sort of acknowledgment like "OK we know about this" would be nice - after all, we are doing the QA department's job for them.

Or an update to the "latest known issues" sticky each day. For heavens sake, you're getting paid to do this. Just go to the defect tool you guys are using, and do a pull for defects that are marked as fixed, and another one for new bugs in the past 24. Delete any that are in the list that are fixed, and cut-paste the new ones. 30 minutes a day to keep your customers happy and informed. And it would cut bumps, reposts and multiples - as well as making it easy to lock threads: simply put a blue post that says "On defect list as of 2012-01-23" and lock the thread. That way a search will show that a) the bug is known by Blizz, and b) nobody should be posting on it anymore. The users will then be able to close off threads by pointing to these "Blue Knows" postsed & closed threads.
Reply Quote
Is anyone working on this? I think they will need to patch the client to fix this. When will the next client patch be?
Reply Quote
90 Draenei Shaman
14730
Blizzard dosen't give a rat's !@# about any of this. Alot of people know that the souce code for WOW has been corrupt for ages. Since WOTLK. I know it, we know it, and even they know it. The thing is, if they don't make mistakes that causes bugs, then what is the purpose of departments of QA, GMs, and all that other stuff that people use to complain about errors/bugs/etc.
Reply Quote
90 Blood Elf Paladin
7065
Plz to fix, We change glyphs now more than We change Gear. And this is getting really annoying...
Reply Quote
90 Blood Elf Paladin
7065
This guy def made it super EZ to understand and fix...
Reply Quote
90 Human Paladin
6695
Some sort of acknowledgment like "OK we know about this" would be nice....


Agree.. this bug is personally affect me and some of the addon's I've written and I've been reading forum post after forum post of other addon developers getting complaints from users of their addons about this issue. Would be nice to hear something back from blizz on this issue.
Edited by Artherius on 11/19/2012 12:09 AM PST
Reply Quote
90 Human Paladin
14800
Can we get some sort of a confirmation from a blue/the devs?

I've lost count of how many patches we've been through and had to put up with this - where raid members can't change their talent selection, and also the myriad of forums where people have been asking why XXXXX mod has been tainting their UI - when it's not the fault of the modders.
Reply Quote
100 Blood Elf Paladin
20475
As a Christmas miracle, could we please get acknowledgement of this? It would be amazing if we got a simple "we're working on it".
Reply Quote
86 Human Rogue
3945
Is this the issue affecting my UI? Buttons, Mini Map, Full Map, Background to Quest Logs, Back ground to Achievement log, none of it is loading. Dalaran is extremely laggy, and for a good 10 minutes nothing was loaded that a player could interact with... As of right now, the game for me is unplayable. I clear Cache, WTF, and Interface folders... No add ons anymore... What's the deal?
Reply Quote
100 Night Elf Druid
16725
Any hope this will be fixed in 5.2?
/wishes
Reply Quote
100 Night Elf Druid
16725
Nope, not fixed.
Reply Quote
10 Troll Druid
30
10/23/2012 02:28 AMPosted by Neomaxa
Alot of people know that the souce code for WOW has been corrupt for ages.

Dear god, don't I know this. :(

One of the biggest problems is, the default WoW UI uses a metric ton of protected function calls directly, in a manner that would otherwise be an issue for addons. If more of the WoW interface was written like an unprotected addon, using protected 'abstract' frames which cannot be modified whatsoever by addons, this would be less of an issue.

It becomes even more of an issue when addon library authors start mucking around with the default interface with their code and cause otherwise innocent addons to do things they shouldn't be, or even intended to be, doing, at which point chasing down taint issues and crash bugs becomes a logistical nightmare.
Edited by Jazrozi on 3/12/2013 9:54 AM PDT
Reply Quote
90 Blood Elf Paladin
8360
Still seems to exist...
Reply Quote
55 Blood Elf Rogue
7100
Yes it happens to me everytime I open up any other window in game, maps, character, crafting, you name it. I get tired of ignoring it every single time.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)

Reported!

[Close]