WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Debugging "protected function call" errors (https://www.wowinterface.com/forums/showthread.php?t=54751)

vvv444 10-29-16 03:34 AM

Debugging "protected function call" errors
 
Hi,

I'm somehow lost... Many times I'm receiving errors like the following one (the log provided by the BugGrabber addon).

1x [ADDON_ACTION_BLOCKED] AddOn 'PetTracker' tried to call the protected function '<unnamed>:Hide()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `Hide'
FrameXML\WorldMapActionButton.lua:58: in function `Clear'
FrameXML\WorldMapActionButton.lua:67: in function `Refresh'
FrameXML\WorldMapActionButton.lua:19: in function `SetMapAreaID'
FrameXML\WorldMapFrame.lua:1230: in function `WorldMapFrame_Update'
FrameXML\WorldMapFrame.lua:2809: in function `WorldMapFrame_UpdateMap'
FrameXML\WorldMapFrame.lua:436: in function <FrameXML\WorldMapFrame.lua:422>
[C]: ?
[C]: in function `SetMapToCurrentZone'
FrameXML\WorldMapFrame.lua:370: in function <FrameXML\WorldMapFrame.lua:349>
[C]: ?
...
FrameXML\UIParent.lua:2327: in function `SetUIPanel'
FrameXML\UIParent.lua:2166: in function `ShowUIPanel'
FrameXML\UIParent.lua:2086: in function <FrameXML\UIParent.lua:2082>
[C]: in function `SetAttribute'
FrameXML\UIParent.lua:2868: in function <FrameXML\UIParent.lua:2856>
[C]: in function `ShowUIPanel'
FrameXML\UIParent.lua:2852: in function `ToggleFrame'
FrameXML\WorldMapFrame.lua:261: in function <FrameXML\WorldMapFrame.lua:233>
[C]: in function `ToggleWorldMap'
[string "TOGGLEWORLDMAP"]:1: in function <[string "TOGGLEWORLDMAP"]:1>

Locals:

It seems that the execution path comes from the Blizzard's code, so why does it blame the PetTracker addon? (It happens with other addons too). In any case, how do I approach debugging such problem?

Best regards,
Brizag


UPDATE: Another example:
1x [ADDON_ACTION_BLOCKED] AddOn 'MultiBars' tried to call the protected function 'OverrideActionBarButton1:Show()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `Show'
FrameXML\ActionButton.lua:330: in function `ActionButton_Update'
FrameXML\ActionButton.lua:665: in function `ActionButton_OnEvent'
FrameXML\ActionButton.lua:174: in function <FrameXML\ActionButton.lua:171>

Locals:

Phanx 10-29-16 02:47 PM

  1. Disable all other addons.
  2. Run "/taintlog 2".
  3. Wait until you get the error.
  4. Log out (don't /reload or you'll wipe the log for the new session).
  5. Open the "World of Warcraft/Logs/taint.log" file in Notepad.
  6. Find the line containing a word like "block" or "protect" (I don't remember exactly what it says).
  7. Note the variable it's saying is tainted.
  8. Work you way back up toward the beginning of the log to see where/how that variable was originally tainted.

If it's your addon:
  • Make sure you are not leaking any global variables.
  • Make sure any intentional global variables have unique names.
  • Don't overwrite any methods on secure frames (eg. frame.Hide).
  • Don't overwrite/modify any globals that are read by secure code (eg. RAID_CLASS_COLORS).
  • Use hooksecurefunc instead of "manual" hooks on Blizz functions that might touch anything secure.

The wrong addon can be blamed for any number of reasons, all of which basically boil down to "whoever touched it (or looked at it sideways, or was seen in the general vicinity of it) last gets all the blame".

vvv444 10-30-16 06:41 AM

Thank you very much! I'll try that.

nebula 11-09-16 06:16 AM

This is taint from having the map open while getting into combat. There is a secure action button attached to the frame to instantly complete a world quest which causes the taint errors (even if you don't have the class hall upgrade for it). Not much you can do about it, anything that touches the map can be blamed.

Phanx 11-13-16 10:23 AM

Quote:

Originally Posted by nebula (Post 320736)
Not much you can do about it...

I'd imagine reparenting the button (eg. to UIParent) and overwriting any world map functions that refer to it (with versions where those references have been removed) would do the trick.


All times are GMT -6. The time now is 09:43 PM.

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