WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Ongoing issue with a Lua error (https://www.wowinterface.com/forums/showthread.php?t=48835)

Mayron 01-20-14 01:02 PM

Ongoing issue with a Lua error
 
Hello everyone, I have got a bug with my UI which I have never understood why.

I am getting many reports that my UI causes the following error:

Code:

Date: 2014-01-20 18:55:09
ID: 1
Error occured in: AddOn: MayronUI
Count: 1
Message: Error: AddOn MayronUI attempted to call a forbidden function (RemoveTalent()) from a tainted execution path.
Debug:
  [C]: RemoveTalent()
  ...rface\AddOns\Blizzard_TalentUI\Blizzard_TalentUI.lua:10: OnAccept()
  ..\FrameXML\StaticPopup.lua:3854: StaticPopup_OnClick()
  [string "*:OnClick"]:1:
      [string "*:OnClick"]:1
Locals:
None
AddOns:
  ClassColors, v5.4.2.90
  Swatter, v5.19.5445 (QuiescentQuoll)
  NPCScan, v5.4.2.3
  NPCScanOverlay, v5.4.2.1
  ACP, v3.4.5
  AraBrokerTradeskills, vr540.1
  AtlasLootLoader, vv7.07.01
  AucAdvanced, v5.19.5445 (QuiescentQuoll)
  AucFilterBasic, v5.19.5445 (QuiescentQuoll)
  AucFilterOutlier, v5.19.5445.5437(5.19/embedded)
  AucMatchUndercut, v5.19.5445.5364(5.19/embedded)
  AucScanData, v5.19.5445 (QuiescentQuoll)
  AucStatHistogram, v5.19.5445 (QuiescentQuoll)
  AucStatiLevel, v5.19.5445 (QuiescentQuoll)
  AucStatPurchased, v5.19.5445 (QuiescentQuoll)
  AucStatSales, v5.19.5445.5376(5.19/embedded)
  AucStatSimple, v5.19.5445 (QuiescentQuoll)
  AucStatStdDev, v5.19.5445 (QuiescentQuoll)
  AucStatWOWEcon, v5.19.5445.5323(5.19/embedded)
  AucUtilAHWindowControl, v5.19.5445.5347(5.19/embedded)
  AucUtilAppraiser, v5.19.5445.5438(5.19/embedded)
  AucUtilAskPrice, v5.19.5445.5347(5.19/embedded)
  AucUtilAutoMagic, v5.19.5445.5443(5.19/embedded)
  AucUtilCompactUI, v5.19.5445.5444(5.19/embedded)
  AucUtilEasyBuyout, v5.19.5445.5427(5.19/embedded)
  AucUtilFixAH, v5.19.5445 (QuiescentQuoll)
  AucUtilItemSuggest, v5.19.5445.5417(5.19/embedded)
  AucUtilPriceLevel, v5.19.5445.5444(5.19/embedded)
  AucUtilScanButton, v5.19.5445.5403(5.19/embedded)
  AucUtilScanFinish, v5.19.5445.5347(5.19/embedded)
  AucUtilScanProgress, v5.19.5445.4979(5.19/embedded)
  AucUtilScanStart, v5.19.5445.5347(5.19/embedded)
  AucUtilSearchUI, v5.19.5445.5373(5.19/embedded)
  AucUtilSimpleAuction, v5.19.5445.5415(5.19/embedded)
  AucUtilVendMarkup, v5.19.5445.4828(5.19/embedded)
  AuctionProfit, vv1.8
  Auctionator, v3.1.5
  AuraFrames, v1.2.4
  Babylonian, v5.1.DEV.332(/embedded)
  BagBrother, v
  Bagnon, v5.4.3
  BagnonFacade, v9
  BankStack, vv33
  Bartender4, v4.5.13.2
  BattlegroundTargets, v50400-1
  Bazooka, vv2.3.0
  BeanCounter, v5.19.5445 (QuiescentQuoll)
  BrokerCombatDuration, vv1.0.9
  BrokerMicroMenu, vv1.3.6
  BrokerRecount, v1.0
  ButtonFacade, v5.4.396
  ClassTimer, v2.3
  ColorPickerPlus, v
  Configator, v5.1.DEV.359(/embedded)
  Cromulent, v50400-1
  DBMCore, v
  DebugLib, v5.1.DEV.337(/embedded)
  DragEmAll, v1.0.4
  DualSpecQ, v1.3
  EnchantrixBarker, v5.19.5445 (QuiescentQuoll)
  ErrorFilter, v2.9
  ErrorMonster, v3
  ExplorerCoords, v1.36.5
  Gatherer, v4.4.0
  Grid, v5.4.1.1628
  GridIndicatorCornerIcons, v50300-2
  GridManaBars, v1.04
  GridStatusRaidDebuff, v5.41
  HandyNotes, v1.2.0
  HandyNotesLorewalkers, v1
  HandyNotesTimelessIsleChests, v1.09
  HealersHaveToDie, v2.3
  IceHUD, v1.8.18.1 (Revision: 961)
  Informant, v5.19.5445 (QuiescentQuoll)
  LeatrixPlus, v5.4.08
  LibExtraTip, v5.12.DEV.355(/embedded)
  LibSharedMedia30, v3.0-86
  LoseControl, v5.41
  Mapster, v1.5.6.1-1-g1223da0
  Masque, v5.4.396
  MasqueCaith, v5.4.88
  MayronUI, v
  MikScrollingBattleText, v5.7.131
  MogIt, v3.1.6
  nibChatTabs, v4.10
  NugComboBar, v
  oGlow, v2.2.2
  Omen, v3.1.8
  OmniCC, v5.4.3
  Overachiever, v0.73
  Postal, v3.5.1
  Prat30, vr921     
  Prat30Libraries, v
  Quartz, v3.1.4
  RaidBuffStatus, v5.8.0
  Rarity, v1.0
  RarityOptions, v
  Recount, v
  ReforgeLite, v1.37
  Scrap, v12.11
  ScrapSpotlight, v
  SellJunk, v3.0.10
  ShadowedUnitFrames, vv3.10.3
  SilverDragon, vv3.0.10
  SimplePowerBar, v3.6
  SLDataText, v5.0.41
  SLDataTextFriends, v1.0.5
  SLDataTextGuild, v1.0.9
  Stubby, v5.19.5445 (QuiescentQuoll)
  TidyPlates, v6.8.2 (R559)
  TidyPlatesThreatPlates, v6.008
  TidyPlatesWidgets, v
  TipHelper, v5.12.DEV.351(/embedded)
  TipTac, v13.09.21
  TipTacItemRef, v13.09.21
  TipTacTalents, v13.09.21
  XLoot, vz14e-release
  XLootFrame, vz14e-release
  XLootGroup, vz14e-release
  XLootMaster, vz14e-release
  XLootMonitor, vz14e-release
  BlizRuntimeLib_enUS v5.4.2.50400 <eu>
  (ck=e9d)

However I have never used "RemoveTalent()" in my code at all and is driving me mad. The UI addOns I wrote have nothing to do with the talents window except a button that toggles the Talent window:

Lua Code:
  1. if not PlayerTalentFrame then
  2.     TalentFrame_LoadUI()
  3. end
  4. ToggleTalentFrame()

Does anyone have any idea why this is happening?
The code for my addOn is here just in case you want to look into it:
https://github.com/Mayron/MayronUI

Thanks for any advice you may have!

Resike 01-20-14 01:57 PM

Disable all of your other addons which use AceLib, then check if it's still persists.

Edit:

I think 5 things could cause something like this:

hooksercurecalls (Mostly in combat)
StaticPopupDialogs (With non unique names)
UIDropDownMenu_SetSelectedName, UIDropDownMenu_SetSelectedValue, UIDropDownMenu_SetSelectedID, UIDropDownMenu_GetSelectedName, UIDropDownMenu_GetSelectedID, UIDropDownMenu_GetSelectedValue, fix here: http://www.wowinterface.com/download...Menu.html#info
Initalizing dropdowns on addonload
Adding your addon into Blizzard Interface panel with leaks

Mayron 01-20-14 02:42 PM

Quote:

Originally Posted by Resike (Post 289903)
Disable all of your other addons which use AceLib, then check if it's still persists.

Edit:

I think 5 things could cause something like this:

hooksercurecalls (Mostly in combat)
StaticPopupDialogs (With non unique names)
UIDropDownMenu_SetSelectedName, UIDropDownMenu_SetSelectedValue, UIDropDownMenu_SetSelectedID, UIDropDownMenu_GetSelectedName, UIDropDownMenu_GetSelectedID, UIDropDownMenu_GetSelectedValue, fix here: http://www.wowinterface.com/download...Menu.html#info
Initalizing dropdowns on addonload
Adding your addon into Blizzard Interface panel with leaks

I do not use UIDropDownMenu and all my StaticPopupDialogs have unique names, not really sure if my Blizzard interface options using wowace is causing a leak or not, not sure how to check for that :S

Seerah 01-20-14 02:51 PM

ToggleTalentFrame() calls TalentFrame_LoadUI() on its own. Get rid of this extra call and let the default UI code make it for you. See if that fixes your taint.

(Though, as Resike pointed out, it may well lie in a number of other seemingly unlikely places.)

Resike 01-20-14 02:54 PM

Quote:

Originally Posted by Mayron (Post 289904)
I do not use UIDropDownMenu and all my StaticPopupDialogs have unique names, not really sure if my Blizzard interface options using wowace is causing a leak or not, not sure how to check for that :S

The bad side it's not even sure it's caused by your own addon, AceLib spreads it between the addons that use the lib and blames on it to the first addon loaded that library, or on the addon whoever used that function last.
The sucky part is to get that which addon causing the leak, specially when you can't reproduce the issue easily.

The addon's i wouln't trust are:

Auctionator or pretty much any Auc addon
ACP
HandyNotes

But i don't know all of them.

Dridzt 01-20-14 04:24 PM

I've been running with taintlog enabled for the past year or so.

I meticulously vet my addons for taint fixing what I can or replacing what I can't.
That is to say if my taint.log is ever > 0kb I work on things until it is empty and stays empty after long sessions of raiding.

While I can't directly help with your issue I can tell you which from your addons are taint free (no addon is literally taint free, all non-blizzard code taints, by that I mean no taint that would cause action forbidden/blocked errors ie no 'bad taint').
Auctionator
ErrorFilter
HandyNotes*
Masque*
MikScrollingBattleText
MogIt
Omen
Postal
Quartz
RaidBuffStatus
Scrap*
SilverDragon
XLoot*

These to the best of my knowledge are free of taint.
From those in your list that I don't mention, many I haven't / not using, some (fewer) I did at some point but replaced with similar.

To have a chance at pinpointing the origin you do need to run with /console taintLog 1 and check the Logs\taint.log file for the first addon mentioned.
If you can debug the taint source to that one good, if not remove it and see if taint.log blames another.
Repeat the process until you get no taint then start adding addons back with the one removed last staying off.

Resike 01-20-14 06:19 PM

Handynotes might have been updated since i used it. Back then i've had some issues with it.

Torhal 01-20-14 06:46 PM

Quote:

Originally Posted by Resike (Post 289906)
<snip> AceLib spreads it between the addons that use the lib and blames on it to the first addon loaded that library, or on the addon whoever used that function last.
<snip>

What is this "AceLib" you speak of? At first I thought you were referencing "AceLibrary-2.0" but he's clearly using Ace3 which uses LibStub instead...:D

Resike 01-21-14 05:20 AM

Quote:

Originally Posted by Torhal (Post 289911)
What is this "AceLib" you speak of? At first I thought you were referencing "AceLibrary-2.0" but he's clearly using Ace3 which uses LibStub instead...:D

Well in meant for pretty much any Ace Library addon, i was just lazy to type it out.

Phanx 01-21-14 06:07 AM

Quote:

Originally Posted by Resike (Post 289920)
Well in meant for pretty much any Ace Library addon, i was just lazy to type it out.

Well, the situation you described (taint spreading and/or being blamed on the wrong addon) is endemic to all embedded libraries, not just the Ace3 family, so you might as well have saved yourself 3 more characters are just typed "lib". :p

Lombra 01-21-14 06:11 AM

I know UIFrameFlash used to cause talent taint. There was a big fuss. Not sure if they fixed that. Search your addon folder for any calls to it.

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

Phanx 01-21-14 07:24 AM

Okay, I looked at your code... you are setting a lot of globals. :eek:

Go get WowGlobalFinder and load your files up in it. Check the "only set globals" option at the bottom. Work through the list and exterminate as many of those globals as possible. There's no reason to have any globals other than:

- slash commands,
- the name(s) of your SavedVariable(s),
- the names of frames that require names due to inheritance from Blizzard templates,
- the name of your main addon object (optional),
- and/or the names of your main display frames (also optional).

Looking over your list, I'm seeing a lot of generic names like "CompactHidden", "UnitChanged", "unitType", "count", "BonusFrame", and "ChatFont" that definitely should not be global.

The most likely candidate for problem taint I'm seeing is FCF_SetTabPosition -- if you want to touch the chat tabs without breaking other parts of the UI by tainting UIFrameFlash, make sure you're loading LibChatAnims before you start touching, or (depending on what you're doing; I didn't look) you might be able to get away with using hooksecurefunc to run your own stuff after the Blizz function runs instead of replacing it.

Resike 01-21-14 07:29 AM

Quote:

Originally Posted by Phanx (Post 289923)
Well, the situation you described (taint spreading and/or being blamed on the wrong addon) is endemic to all embedded libraries, not just the Ace3 family, so you might as well have saved yourself 3 more characters are just typed "lib". :p

Thats true, but since on it's GitHub page the lib folder only containted Ace3 Libraries i went with it, to narrow down the issue.

Duugu 01-21-14 07:33 AM

Quote:

Originally Posted by Phanx (Post 289932)
Okay, I looked at your code... you are setting a lot of globals. :eek:

Ahahaha ;D


All times are GMT -6. The time now is 12:35 PM.

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