Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
Creating a dropdown menu using UIDropDownMenu_Addbutton() causes the CompactRaidFrame1 frame to be tainted when it gets created, if your dropdown menu contains 8 or more buttons prior to CompactRaidFrame1 being created.
Edit: When first logging into a character, CompactRaidFrame1 appears to be created as an untainted secure frame. However, if you /reload the UI, CompactRaidFrame1 will be tainted when it is created.
Edited by Dargen on 9/12/2012 11:01 PM PDT
Thanks for the work involved in tracking this down. Perhaps this is why my addon seems to have an issue with:
Message: [ADDON_ACTION_BLOCKED] AddOn "Wholly" tried to call the protected function "CompactRaidFrame1:Show()".
even though my addon does nothing with CompactRaidFrame1.
Do you know a way to make sure CompactRaidFrame1 is created prior to the drop down?
I currently don't know of a way to ensure the frame is created before the dropdown.
I added a print(debugstack()) to the function that detects when the frame is created to see when and where it does get created. For me, the sequence of calls that lead to the creation of the frame started on line 28 in Blizzard_CompactUnitFrameProfiles.lua which is when it called CompactUnitFrameProfiles_ValidateProfilesLoaded after detecting the "VARIABLES_LOADED" event.
Note that not all characters may see CompactRaidFrame1 get tainted when logging in or reloading the UI. It does do it on my level 85 character, but when I logged in a level 40 character I did not see CompactRaidFrame1 get any taint since it did not create the frame at that time (perhaps because the level 40 character has never been in a raid).
If you don't have too many dropdown menus, one work around is to not call UIDropDownMenu_Initialize during the dropdown object's OnLoad script. If you can wait until just before you need to use the dropdown menu, then you can increase the chance that CompactRaidFrame1 will have been created by then.
Edited by Dargen on 8/30/2012 12:19 PM PDT
I'm getting a load of CompactUnitFrame.lua on 4 toons all 85. What do you mean by drop down menus? These are a few examples of what I'm getting ALL the time, with one addon on or all on. I've been in contact with all these developers and they have no idea. at this point I have tosay it's blizzard not the addons. Is there a fix?
["message"] = "[ADDON_ACTION_BLOCKED] AddOn \"TBag\" tried to call the protected function \"CompactPartyFrameMember5:Show()\".",
["time"] = "2012/09/12 20:09:58",
["stack"] = "!BugGrabber-r188\\BugGrabber.lua:587: in function <!BugGrabber\\BugGrabber.lua:587>\n<in C code>\nFrameXML\\CompactUnitFrame.lua:276: in function \"CompactUnitFrame_UpdateVisible\"\nFrameXML\\CompactUnitFrame.lua:234: in function \"CompactUnitFrame_UpdateAll\"\nFrameXML\\CompactUnitFrame.lua:46: in function <FrameXML\\CompactUnitFrame.lua:43>",
["session"] = 52,
["counter"] = 1,
}, -- 
["message"] = "[ADDON_ACTION_BLOCKED] AddOn \"ButtonForge\" tried to call the protected function \"ActionButton3:Show()\".",
["time"] = "2012/09/12 20:41:17",
["stack"] = "!BugGrabber-r188\\BugGrabber.lua:587: in function <!BugGrabber\\BugGrabber.lua:587>\n<in C code>\nFrameXML\\ActionButton.lua:268: in function \"ActionButton_Update\"\nFrameXML\\ActionButton.lua:249: in function \"ActionButton_UpdateAction\"\nFrameXML\\ActionBarController.lua:136: in function \"ActionBarController_ResetToDefault\"\nFrameXML\\ActionBarController.lua:124: in function \"ActionBarController_UpdateAll\"\nFrameXML\\ActionBarController.lua:53: in function <FrameXML\\ActionBarController.lua:42>",
["session"] = 53,
["counter"] = 1,
}, -- 
["message"] = "[ADDON_ACTION_BLOCKED] AddOn \"Decursive\" tried to call the protected function \"PartyMemberFrame1:Hide()\".",
["time"] = "2012/09/12 20:09:58",
["stack"] = "!BugGrabber-r188\\BugGrabber.lua:587: in function <!BugGrabber\\BugGrabber.lua:587>\n<in C code>\nFrameXML\\PartyMemberFrame.lua:116: in function \"PartyMemberFrame_UpdateMember\"\nFrameXML\\PartyMemberFrame.lua:345: in function \"PartyMemberFrame_OnEvent\"\n<string>:\"*:OnEvent\":1: in function \"OnEvent\"\nFrameXML\\UnitFrame.lua:489: in function <FrameXML\\UnitFrame.lua:487>",
["session"] = 52,
["counter"] = 2,
}, -- 
What do you mean by drop down menus?...Is there a fix?
Drop down menus are just menus that appear to "drop down" from some spot on the screen that you click on. For example, if you open the full screen world map, a drop down menu is displayed when you click on the "Zone map", "Continent", or "Zone" arrow button. Blizzard creates those menus by calling functions such as UIDropDownMenu_Initialize and UIDropDownMenu_AddButton.
Addons can also create drop down menus by making use of the same UIDropDownMenu_Initialize and UIDropDownMenu_AddButton functions that Blizzard uses. When an addon uses those functions, certain things that are also used by Blizzard become tainted (not secure). Then when Blizzard later creates a secure frame (such as a compact raid frame), that frame may also become tainted. When the game tries to do certain things to a secure frame that has become tainted (such as showing, hiding, or moving it during combat) you will end up with those types of error messages.
An addon could stop using Blizzard's drop down menu functions, but then the addon would have to either not create any menus or it would have to use a non-Blizzard menu system.
An addon may be able to avoid indirectly tainting frames like CompactRaidFrame1, if the addon does not initialize its menu until just before the menu needs to be displayed. However, taint may still occur if the game creates a secure frame after the addon has initialized its menu.
An addon may be also able to avoid the taint problem if its menu contains less than 8 buttons. In the test addon shown in the first post, if the addon creates a menu with 7 menu items then the compact raid frame remains untainted. However, if the addon creates 8 or more menu items, then the compact raid frame will be tainted when the game eventually creates it.
The problem ultimately lies with Blizzard's drop down menu functions. Those functions are used by a lot of addons as well as the default UI. Hopefully the functions can be fixed so that addons using them don't indirectly cause secure frames to become tainted. Until then we will continue to get those error messages.
Thank you for this nice, clear and concise response. I'm not a programmer and I don't quite understand all that you said but I get most of it. hehe I know what dropdowns are, I thougth you meant they just appear on mouse over and I was trying to think of what did that.
Edited by Rhazzledazle on 9/13/2012 5:28 AM PDT
Same here - and I have seen zero acknowledgement by Blizz that they are aware of the taint-spread issue in what appears to be their code.
This is still going on after the 5.05 patch. Blizz, this is throwing errors in all kinds of addons. Respond?
To me this looks like some sort of boundary issue, like a "magic number" constant sort of defect. And it also looks like a lot of other errors we are seeing in the 5.04 release - regression errors. To me, as an experienced software engineer, this whole release feels poorly tested.
If a limit of 8 is the issue, and UIDropDownMenu is where you see the errors, then look at ...
Its a global.
In the famous words of the Mythbusters: There's your problem.
Edited by Kinx on 9/28/2012 8:06 AM PDT
so my question is why can't we just edit the
Because editing the value of anything that comes from Blizzard code taints it. If we leave UIDROPDOWNMENU_MAXBUTTONS as it is right now, some problem occurs deeper in the logic that taints another value, UIDROPDOWNMENU_MENU_LEVEL. If we change UIDROPDOWNMENU_MAXBUTTONS, that value becomes tainted. We cannot change anything at all that comes from Blizzard without risking taint-related errors.
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.