WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   "IsDisabledByParentalControls" taint complaint (https://www.wowinterface.com/forums/showthread.php?t=48447)

Gregity 11-02-13 09:37 PM

"IsDisabledByParentalControls" taint complaint
 
My AddOn's been getting a Taint Complaint and I can't figure out why. This started happening with the 5.4.1 patch and I figure Blizz just might have introduced a bug.

The Tracker is a replacement and doesn't hook Blizzard or anything of the like, it just draws its own frame.

It doesn't happen with any consistency and I can't make it fail on demand. Earlier today I even had the tracker disabled and then it complained (same taint complaint) but picked on OverAchiever.

Does the following give anyone a hint? I'm not even mentioned except in the text. And the AddOn continues to work, just the message pops up.

Here is the message that Swatter gives me:

Error occured in: AddOn: QuestGuru_Tracker
Message: Error: AddOn QuestGuru_Tracker attempted to call a forbidden function (IsDisabledByParentalControls()) from a tainted execution path.
Debug:
[C]: IsDisabledByParentalControls()
..\FrameXML\MainMenuBarMicroButtons.lua:229:
..\FrameXML\MainMenuBarMicroButtons.lua:76
[C]: UpdateMicroButtons()
..\FrameXML\WorldMapFrame.lua:272:
..\FrameXML\WorldMapFrame.lua:255
[C]: Show()
..\FrameXML\UIParent.lua:1772: SetUIPanel()
..\FrameXML\UIParent.lua:1614: ShowUIPanel()
..\FrameXML\UIParent.lua:1545:
..\FrameXML\UIParent.lua:1541
[C]: SetAttribute()
..\FrameXML\UIParent.lua:2262: ShowUIPanel()
..\FrameXML\UIParent.lua:2246: ToggleFrame()
[string "TOGGLEWORLDMAP"]:1:
[string "TOGGLEWORLDMAP"]:1

pelf 11-02-13 10:06 PM

http://forums.wowace.com/showthread.php?t=20818

Dridzt 11-02-13 10:10 PM

I'd have to copy this post from wowace, so instead I'll link it.

You'll be able to follow the links to more information.
http://forums.wowace.com/showthread....288#post327288

pelf 11-03-13 03:43 AM

I discovered, tonight, that my spellbook no longer opens because of this error. I tried setting taintLog to 1 to just see what the log would say, but it still had the same lack of explanation for the source. So, I changed taintLog to 2. Wow. I'm not sure I'll ever do that again.

They need something halfway between 1 and 2. Right now, at 2, it's showing addon code tainting stuff that the addon code created. While it might be true that all of that stuff is really tainted, it's not really that relevant an observation. What it needs is a mode where taint creeping into anything that was there before addons were loaded is what it logs.

Well, I hope I don't need my spellbook anytime soon.

Resike 11-03-13 08:59 AM

Here is a temporary fix for it:

Lua Code:
  1. setfenv(WorldMapFrame_OnShow, setmetatable({UpdateMicroButtons = function() end}, {__index = _G}))

Dridzt 11-03-13 09:24 AM

Quote:

Originally Posted by Resike (Post 286595)
Here is a temporary fix for it:

Lua Code:
  1. setfenv(WorldMapFrame_OnShow, setmetatable({UpdateMicroButtons = function() end}, {__index = _G}))

That is mentioned in the threads I linked earlier and is also not a generic fix.
It only works for frames that contain no secure elements (eg. WorldMapFrame) it will fail on any frame that does (Friends, Raid etc etc)

The best generic "fix" at the moment is selectively hiding the error popup as Oscarucb has suggested.
Code:

UIParent:HookScript("OnEvent", function(s, e, a1, a2) if e:find("ACTION_FORBIDDEN") and ((a1 or "")..(a2 or "")):find("IsDisabledByParentalControls") then StaticPopup_Hide(e) end; end)

Resike 11-03-13 09:41 AM

Quote:

Originally Posted by Dridzt (Post 286597)
That is mentioned in the threads I linked earlier and is also not a generic fix.
It only works for frames that contain no secure elements (eg. WorldMapFrame) it will fail on any frame that does (Friends, Raid etc etc)

The best generic "fix" at the moment is selectively hiding the error popup as Oscarucb has suggested.
Code:

UIParent:HookScript("OnEvent", function(s, e, a1, a2) if e:find("ACTION_FORBIDDEN") and ((a1 or "")..(a2 or "")):find("IsDisabledByParentalControls") then StaticPopup_Hide(e) end; end)

How about using both?

jaliborc 11-03-13 10:52 AM

Quote:

Originally Posted by Dridzt (Post 286597)
That is mentioned in the threads I linked earlier and is also not a generic fix.
It only works for frames that contain no secure elements (eg. WorldMapFrame) it will fail on any frame that does (Friends, Raid etc etc)

The best generic "fix" at the moment is selectively hiding the error popup as Oscarucb has suggested.
Code:

UIParent:HookScript("OnEvent", function(s, e, a1, a2) if e:find("ACTION_FORBIDDEN") and ((a1 or "")..(a2 or "")):find("IsDisabledByParentalControls") then StaticPopup_Hide(e) end; end)

Pretty nasty fix. Oh well, I guess it's the best of a bad situation. As long as it works... Oh Blizzard...

Resike 11-03-13 11:17 AM

Quote:

Originally Posted by jaliborc (Post 286601)
Pretty nasty fix. Oh well, I guess it's the best of a bad situation. As long as it works... Oh Blizzard...

Not sue why is hiding the error frame is a good solution, still gonna pop up as a lua error.

Dridzt 11-03-13 11:25 AM

Quote:

Originally Posted by Resike (Post 286602)
Not sue why is hiding the error frame is a good solution, still gonna pop up as a lua error.

Because in this particular case, actions are not really blocked for 99% of the situations other than from the static popup itself.

pelf 11-03-13 02:00 PM

Or, in my case, the Spellbook because (I assume) it's being launched from Dominos's menu button strip.

EDIT: And the achievement frame because of Overachiever.

Pvthudson01 11-03-13 06:35 PM

http://us.battle.net/wow/en/forum/to...8639018?page=1

IS there ANY WAY to fix this?

Phanx 11-03-13 09:29 PM

If you'd read the thread you linked, you would already know that there are several undesirable hacks you can use to avoid the error popup (that will break other things in the process), but there is no real way to fix the problem.

Fizzlemizz 11-14-13 12:19 PM

Is it just me or did they fix this in that last update?
EDIT: They being Blizzard.

Nibelheim 11-14-13 12:51 PM

Quote:

Originally Posted by Fizzlemizz (Post 286972)
Is it just me or did they fix this in that last update?
EDIT: They being Blizzard.

Looks to be fixed on the PTR.

Fizzlemizz 11-16-13 05:07 PM

It may be that I'm silliy enough to maintian a couple of ancient addons and I'm not lua smart enough to spot the flaming obvious. After the last stealth patch that seemed to fix this problem I was still getting the error after opening the options window for "my" addons and then trying to open other in-game windows guild, friends, professions etc.

I tracked the problem down to the TOCs containing the following entries

Code:

..\..\FrameXML\Fonts.xml
..\..\FrameXML\UIDropDownMenuTemplates.xml
..\..\FrameXML\UIDropDownMenu.xml
..\..\FrameXML\UIPanelTemplates.lua
..\..\FrameXML\UIPanelTemplates.xml

Once they were deleted, problem solved.

If you find this usefull great, if you find it an excuse to point out how lame I am at coding, enjoy :).

Phanx 11-17-13 04:48 AM

Why on earth would you ever call FrameXML files from an addon TOC?!?!?!?! All those files are already loaded before the game even thinks about loading addons...

Resike 11-17-13 04:48 AM

Quote:

Originally Posted by Fizzlemizz (Post 287059)
It may be that I'm silliy enough to maintian a couple of ancient addons and I'm not lua smart enough to spot the flaming obvious. After the last stealth patch that seemed to fix this problem I was still getting the error after opening the options window for "my" addons and then trying to open other in-game windows guild, friends, professions etc.

I tracked the problem down to the TOCs containing the following entries

Code:

..\..\FrameXML\Fonts.xml
..\..\FrameXML\UIDropDownMenuTemplates.xml
..\..\FrameXML\UIDropDownMenu.xml
..\..\FrameXML\UIPanelTemplates.lua
..\..\FrameXML\UIPanelTemplates.xml

Once they were deleted, problem solved.

If you find this usefull great, if you find it an excuse to point out how lame I am at coding, enjoy :).

Why would any addon's toc containt thoose items?

Haleth 11-17-13 07:46 AM

I imagine Fizzle thought that adding files to the ToC is like adding references in .NET or importing on Java, or anything like that :p

It's just for the files in your own addon.

Fizzlemizz 11-17-13 11:36 AM

These entries were already in the TOC files when I got them. The addons in question (DUF and DART) were originally created in vanilla WoW and have been maintained by various people through the ages.

Edit: It's nice to know the answer is "I'm not lua smart enough to spot the flaming obvious AND I'm silliy enough to maintian a couple of ancient addons." :P


All times are GMT -6. The time now is 06:16 PM.

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