Addon errors, caused by TaintLog

100 Dwarf Hunter
13680
BankItems is throwing LUA errors for code that looks correct and appears to work fine on Windows.

Date: 2012-09-25 23:53:12
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\BankItems\BankItems.lua line 4708:
attempt to index global 'BankItems_OptionsFrame_TooltipInfo' (a function value)
Debug:
BankItems\BankItems.lua:4708: in main chunk

The line of code that is the issue moves around between restarts. Making minor edits (commenting out lines, adding return values to functions) causes the code to run without error.

Throws errors in 32-bit and 64-bit mode.
Edited by Kharthus on 9/28/2012 4:06 PM PDT
Reply Quote
85 Night Elf Druid
0
This is a Lua interpreter problem. I see it in TSM (TradeSkillMaster) as well, but intermittently.

As near as I can tell, WoW appears to duplicate contexts for event delivery and that includes the global symbol table. Some of these contexts are missing a bunch of symbols, as though a hash chain walk was interrupted or severed.

I only see this happen in code that runs inside OnEvent handlers, tooltips, Inventory movement, etc.

It is definitely a low level bug. The kind of errors I see are inexplicable otherwise.

eg:

TSMAPI = {}
... lots of things insert into this hash. eg: TSMAPI:GetInventoryCount = function ....

and later in the OnEvent handlers thing like:

if (TSMAPI:GetInventoryCount(link) ....)
will throw an exception that either GetInvetoryCount came up nil, or TSMAPI itself was nil.

But only sometimes.. Maybe 1 in 1000 times.

I "Fixed" it by doing this nonsense:

TSMAPI = {}
local tsm = TSMAPI

and changing all the TSMAPI:GetInventoryCount() references to tsm:GetInventoryCount(). Making the OnEvent handlers use a file-local copy of a global, rather than the actual global solves it for me.

I don't see this on Windows.

I've seen this since 5.0.4 (16016) landed. Note that this isn't happening during posting for me, but rather the simple scanning.

I had suspicions that it was related to the loading screen crash I saw earlier that went away just as mysteriously for me. (A look at the crash dump from wow with gdb showed a few telltale signs it was in the Lua garbage collector. I've embedded Lua into several things at work and hit problems with Lua's "interesting" garbage collection system. There were some memory barrier/fence issues etc.)

I've included a small sample of the changes I had to make to have TSM work reliably on a Mac client for me. They're nonsense changes but the problem has 100% gone away. I no longer get random exceptions for TSMAPI being nil. If memory serves correctly, this is code that is executed from an AUCTION_ITEM_LIST_UPDATE event context.

It's unfortunate that 'Show Lua Errors' is off by default. There's a few of these things lurking.


+++ ./TradeSkillMaster_Auctioning/modules/PostScan.lua 2012-08-28 22:30:24.000000000 -0700
@@ -12,6 +12,8 @@
local Post = TSM:NewModule("Post", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Auctioning") -- loads the localization table

+local lib = TSMAPI
+
local postQueue, currentItem = {}, {}
local totalToPost, totalPosted, count = 0, 0
local isScanning, GUI

[... trimmed ...]

@@ -283,7 +285,7 @@
local locations = {}
for bag, slot, itemString in TSM:GetBagIterator() do
local quantity = select(2, GetContainerItemInfo(bag, slot))
- if findItemString == TSMAPI:GetItemID(itemString) or findItemString == itemString then
+ if findItemString == lib:GetItemID(itemString) or findItemString == itemString then
if not TSM.Util:IsSoulbound(bag, slot) and not (ignoreBagSlot and ignoreBagSlot[bag.."$"..slot]) then
tinsert(locations, {bag=bag, slot=slot, quantity=quantity})
if not allLocations then
Reply Quote
100 Dwarf Hunter
13680
Turns out it's a Blizzard bug related to having the TaintLog active. If you disable TaintLog, all the strange random errors go away.

Happens on Macs and Windows machines.
Reply Quote
MVP - Technical Support
100 Draenei Mage
7170
09/28/2012 04:07 PMPosted by Kharthus
Turns out it's a Blizzard bug related to having the TaintLog active. If you disable TaintLog, all the strange random errors go away.


Funny thing is I was helping Xinhuan with that the other day. He sent me a modified BankItems.lua that fixed it mentioning moving the assignment of a lot of CreatFrames to local variables.

r179 on wowace lists this in the version history - have you tried this version ?

Did you have to update to this version for the errors to go away or did they go away solely by taking the SET taintLog line out of config.wtf ?
Reply Quote
- Technical Support
90 Human Priest
6220
Funny, I don't get any slowdown or stutter issues with my taintlog set to "2". I do occasionally have to prune that log file though, since it does grow pretty fast at that setting.

Edit: Egads...OK, taintlog set back to "1". Just looked at the log and it was nearly 3 gigabytes in size. And this is after only a couple hours of playing.

o_O

________________________________________________
Official Mac Tech Support Forum Cookie™ (Mint Chocolate Chip)
Guaranteed tasty; Potentially volatile when dipped in General Forums Syrup®
Caution: This cookie bites back.
Edited by Tiapriestess on 9/30/2012 2:54 AM PDT
Reply Quote
MVP - Technical Support
100 Draenei Mage
7170
Edit: Egads...OK, taintlog set back to "1". Just looked at the log and it was nearly 3 gigabytes in size. And this is after only a couple hours of playing.


This is why we don't play with setting "2" :)

IIRC setting "1" is used to gauge any addons tainting Blizzard only code. Setting "2" basically means log *everything* the UI does in detail.

Pretty much only used for really advanced Addon bug tracking. I don't know of any addon authors that actually do use taintLog "2" on a regular basis.
Reply Quote
100 Dwarf Hunter
13680
09/29/2012 07:17 PMPosted by Bluspacecow
Turns out it's a Blizzard bug related to having the TaintLog active. If you disable TaintLog, all the strange random errors go away.


Funny thing is I was helping Xinhuan with that the other day. He sent me a modified BankItems.lua that fixed it mentioning moving the assignment of a lot of CreatFrames to local variables.

r179 on wowace lists this in the version history - have you tried this version ?

Did you have to update to this version for the errors to go away or did they go away solely by taking the SET taintLog line out of config.wtf ?


The updated BankItems file or removing taintLog both fixed the problem. I'm currently back to the released BankItems version and no taintLog without any issues.
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]