Occasional Taint, not sure from where, or if caused by LiteBag
mbattersby opened this issue · 16 comments
There is sometimes taint. I have had occasional (once every few day) issues with:
- Clicking actionbuttons from keybinds (but not with the mouse)
- Right-clicking items in bags
- Probably other stuff I forgot
Because it's always happening at an inconvenient time like the middle of a M+ (since that's what I'm doing 80% of the time), I haven't gotten any closer to tracking it down and just have to /reload and move on.
I don't know where the taint comes from. Obviously the in-game bug reports are not helpful (or even correctly identify the addon) and i have a barrel-load of addons that probably also cause taint and might be the real problem.
If anyone has a reproducable case that would help, but nobody has so far. Because it's so rare I haven't been able to reproduce anything on the PTR with "/console taintlog 11" which sadly isn't available on live.
From #32:
1x [ADDON_ACTION_BLOCKED] AddOn 'LiteBag' hat versucht die geschützte Funktion 'SpellButton1:Enable()' aufzurufen.
[string "@!BugGrabber/BugGrabber.lua"]:480: in function <!BugGrabber/BugGrabber.lua:480>
[string "=[C]"]: in function Enable' [string "@FrameXML/SpellBookFrame.lua"]:894: in function UpdateButton'
[string "@FrameXML/SpellBookFrame.lua"]:581: in function <FrameXML/SpellBookFrame.lua:532>
From #33:
2x [ADDON_ACTION_FORBIDDEN] AddOn 'LiteBag' hat versucht die geschützte Funktion 'UseAction()' aufzurufen.
[string "@!BugGrabber/BugGrabber.lua"]:480: in function <!BugGrabber/BugGrabber.lua:480>
[string "=[C]"]: in function UseAction' [string "@FrameXML/SecureTemplates.lua"]:364: in function handler'
[string "@FrameXML/SecureTemplates.lua"]:690: in function <FrameXML/SecureTemplates.lua:672>
[string "@FrameXML/SecureTemplates.lua"]:704: in function <FrameXML/SecureTemplates.lua:697>
[string "@FrameXML/SecureTemplates.lua"]:746: in function SecureActionButton_OnClick' [string "@FrameXML/ActionButton.lua"]:89: in function TryUseActionButton'
[string "@FrameXML/MultiActionBars.lua"]:23: in function `MultiActionButtonDown'
[string "MULTIACTIONBAR2BUTTON1"]:2: in function <[string "MULTIACTIONBAR2BUTTON1"]:1>
That specific taint issue is fixed in 10.1.0-3. Leaving this open for more taint reports.
Thanks that is definitely something weird, hopefully it will get me to an answer.
Hope this helps, not sure if unrelated:
- Go in combat with training dummy
- Open bag and drag any item to another slot
- Bug appears.
Tested same method with Bagnon - no errors.
3x [ADDON_ACTION_BLOCKED] AddOn 'LiteBag' tried to call the protected function 'UNKNOWN()'.
[string "@!BugGrabber/BugGrabber.lua"]:480: in function <!BugGrabber/BugGrabber.lua:480>
[string "=[C]"]: ?
[string "=[C]"]: in function PickupContainerItem' [string "@FrameXML/ContainerFrame.lua"]:1335: in function <FrameXML/ContainerFrame.lua:1312> [string "=[C]"]: in function
ContainerFrameItemButton_OnClick'
[string "@FrameXML/ContainerFrame.lua"]:1455: in function OnClick' [string "@FrameXML/ContainerFrame.lua"]:1571: in function
OnDragStart'
[string "@FrameXML/ContainerFrame.lua"]:1575: in function <FrameXML/ContainerFrame.lua:1574>
Locals:
_ = Frame {
RegisterEvent = defined @!BugGrabber/BugGrabber.lua:486
0 =
UnregisterEvent = defined @!BugGrabber/BugGrabber.lua:486
SetScript = defined @!BugGrabber/BugGrabber.lua:486
}
event = "ADDON_ACTION_BLOCKED"
events =
ADDON_ACTION_BLOCKED = defined @!BugGrabber/BugGrabber.lua:552
ADDON_ACTION_FORBIDDEN = defined @!BugGrabber/BugGrabber.lua:552
PLAYER_LOGIN = defined @!BugGrabber/BugGrabber.lua:546
LUA_WARNING = defined @!BugGrabber/BugGrabber.lua:561
ADDON_LOADED = defined @!BugGrabber/BugGrabber.lua:506
}
Hope this helps, not sure if unrelated:
1. Go in combat with training dummy 2. Open bag and drag any item to another slot 3. Bug appears. Tested same method with Bagnon - no errors.
If you are able to edit a file, can you see if applying this change to ContainerPanel.lua fixes the issue, and if it causes any issues with the first 28 bank item slots.
diff --git a/ContainerPanel.lua b/ContainerPanel.lua
index 40c71d9..f84b3bb 100644
--- a/ContainerPanel.lua
+++ b/ContainerPanel.lua
@@ -254,7 +254,7 @@ end
local function GetBagItemButton(bag, i)
if not bag.Items[i] then
local name = format('%sItem%d', bag:GetName(), i)
- bag.Items[i] = CreateFrame("ItemButton", name, nil, 'LiteBagItemButtonTemplate')
+ bag.Items[i] = CreateFrame("ItemButton", name, nil, 'ContainerFrameItemButtonTemplate')
bag.Items[i]:SetID(i)
bag.Items[i]:SetParent(bag)
LB.CallHooks('LiteBagItemButton_Create', bag.Items[i])
Essentially replace the red line with the green line (not including the + at the start).
Despite the new reports I can't see anything in the wow UI changes for 10.1.5 that would introduce new taint caused by LiteBag, so without a repeatable case (or a report that it happens with only LiteBag loaded) I'm inclined to believe it's not me.
1x [ADDON_ACTION_FORBIDDEN] AddOn 'LiteBag' hat versucht die geschützte Funktion 'UNKNOWN()' aufzurufen.
[string "@!BugGrabber/BugGrabber.lua"]:481: in function <!BugGrabber/BugGrabber.lua:481>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function UseContainerItem' [string "@FrameXML/ContainerFrame.lua"]:1403: in function <FrameXML/ContainerFrame.lua:1312> [string "=[C]"]: in function ContainerFrameItemButton_OnClick'
[string "@FrameXML/ContainerFrame.lua"]:1455: in function <FrameXML/ContainerFrame.lua:1442>
Locals:
_ = Frame {
RegisterEvent = defined @!BugGrabber/BugGrabber.lua:487
0 =
UnregisterEvent = defined @!BugGrabber/BugGrabber.lua:487
SetScript = defined @!BugGrabber/BugGrabber.lua:487
}
event = "ADDON_ACTION_FORBIDDEN"
events =
{
ADDON_ACTION_BLOCKED = defined @!BugGrabber/BugGrabber.lua:553
ADDON_ACTION_FORBIDDEN = defined @!BugGrabber/BugGrabber.lua:553
PLAYER_LOGIN = defined @!BugGrabber/BugGrabber.lua:547
LUA_WARNING = defined @!BugGrabber/BugGrabber.lua:562
ADDON_LOADED = defined @!BugGrabber/BugGrabber.lua:507
}
1x [ADDON_ACTION_FORBIDDEN] AddOn 'LiteBag' tried to call the protected function 'UNKNOWN()'.
[string "@!BugGrabber/BugGrabber.lua"]:481: in function <!BugGrabber/BugGrabber.lua:481>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `UseContainerItem'
[string "@FrameXML/ContainerFrame.lua"]:1403: in function <FrameXML/ContainerFrame.lua:1312>
[string "=[C]"]: in function `ContainerFrameItemButton_OnClick'
[string "@FrameXML/ContainerFrame.lua"]:1455: in function <FrameXML/ContainerFrame.lua:1442>
Locals:
_ = Frame {
RegisterEvent = <function> defined @!BugGrabber/BugGrabber.lua:487
0 = <userdata>
UnregisterEvent = <function> defined @!BugGrabber/BugGrabber.lua:487
SetScript = <function> defined @!BugGrabber/BugGrabber.lua:487
}
event = "ADDON_ACTION_FORBIDDEN"
events = <table> {
ADDON_ACTION_BLOCKED = <function> defined @!BugGrabber/BugGrabber.lua:553
ADDON_ACTION_FORBIDDEN = <function> defined @!BugGrabber/BugGrabber.lua:553
PLAYER_LOGIN = <function> defined @!BugGrabber/BugGrabber.lua:547
LUA_WARNING = <function> defined @!BugGrabber/BugGrabber.lua:562
ADDON_LOADED = <function> defined @!BugGrabber/BugGrabber.lua:507
}
1x [ADDON_ACTION_FORBIDDEN] AddOn 'LiteBag' tried to call the protected function 'UNKNOWN()'.
[string "@!BugGrabber/BugGrabber.lua"]:481: in function <!BugGrabber/BugGrabber.lua:481>
[string "=[C]"]: ?
[string "=[C]"]: in function `UseContainerItem'
[string "@FrameXML/ContainerFrame.lua"]:1424: in function `ContainerFrameItemButton_OnClick'
[string "@FrameXML/ContainerFrame.lua"]:1476: in function <FrameXML/ContainerFrame.lua:1463>
taint.log
9/19 23:36:03.432 Execution tainted by LiteBag while reading GameTooltipMoneyFrame1 - Interface/FrameXML/GameTooltip.lua:481 GameTooltip_ClearMoney()
9/19 23:36:03.432 GameTooltip:ameTooltip.xml:33_OnTooltipCleared()
9/19 23:36:03.432 GameTooltip:Hide()
9/19 23:36:03.432 Interface/FrameXML/GameTooltip.lua:748 GameTooltip_Hide()
9/19 23:36:03.432 Interface/FrameXML/ContainerFrame.lua:1494
9/19 23:36:03.432 An action was blocked because of taint from LiteBag -
9/19 23:36:03.432 UseContainerItem()
9/19 23:36:03.432 Interface/FrameXML/ContainerFrame.lua:1424 ContainerFrameItemButton_OnClick()
9/19 23:36:03.432 Interface/FrameXML/ContainerFrame.lua:1476
Pretty sure every addon that uses AddLine on the default tooltip causes this taint but LiteBag gets blamed.
Thanks for the bug report, great work on giving excellent detail.
It's definitely not as simple as GameTooltip:AddLine() tainting things, as I have BagSync adding lines to every bag item tooltip with no issue. I can't immediately think of any way taint could get back from the tooltip into LiteBag.
I suspect both of those taint messages are symptoms of the same problem triggered earlier, that the ItemButton has become tainted somehow. Then it is spreading taint into the GameTooltip (temporarily I think) and also because it's tainted you cant click to use it.
You can force taint into one of the ItemButtons like this (e.g. first slot in the backpack)
/run ContainerFrameItemButtonMixin.SetBagID(LiteBagBackpackPanelBag1Item1, 0)
and I think trigger both of the same taint messages (except shown as triggered by "*** ForceTaint_Strong ***").
Unfortunately the release versions of the game don't log when the taint happens only when it blocks something. I read somewhere that on ptr/beta builds you can set taintlog to 11 to log when things get tainted but it never seemed to work for me in any version I tried.
I can test this on the ptr with taintlog 11 but your example doesn't work on the 10.2.0 ptr. I get the following error.
1x FrameXML/ContainerFrame.lua:1600: attempt to index local 'self' (a nil value)
[string "@FrameXML/ContainerFrame.lua"]:1600: in function `SetBagID'
[string "ContainerFrameItemButtonMixin.SetBagID(LiteBagBackpackPanelBag1Item1, 0)"]:1: in main chunk
[string "=[C]"]: in function `RunScript'
[string "@FrameXML/ChatFrame.lua"]:2204: in function `?'
[string "@FrameXML/ChatFrame.lua"]:5281: in function `ChatEdit_ParseText'
[string "@FrameXML/ChatFrame.lua"]:4938: in function `ChatEdit_SendText'
[string "@FrameXML/ChatFrame.lua"]:4974: in function `ChatEdit_OnEnterPressed'
[string "*ChatFrame.xml:141_OnEnterPressed"]:1: in function <[string "*ChatFrame.xml:141_OnEnterPressed"]:1>
Hmm, I don't see any reason why it wouldn't work. You might need to open the backpack once to make sure the buttons are created.
Yeah opening the bags fixed it. I also can reproduce my error consistently with only Litebag enabled.
- Enter combat
- Open bags
- Hover over an equipment item that you can't equip during combat
- Rightclick hearthstone in bags
It does not error out if I open my bags at least once before entering combat.
I also now have this huge taint.log file (225MB) and I am not sure what to look for.
And I attached the taint.log level 2
taint.log
Wow, that's amazing! I can confirm I can reproduce an error that way (also it appears in a bunch other addons I have installed which is interesting). I think that's probably enough for me to be able to figure out what is going on without having to analyse the huge taintlog.
If I was looking for something I think it would be along the lines of "Global variable LiteBagBackpackPanelBag1Slot1 tainted by ..." (maybe different numbers).
I have released what I hope is a fix for this particular taint bug in 10.1.7-5.