Quantcast strange error - WoWInterface
Thread Tools Display Modes
08-23-19, 01:24 AM   #1
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 258
strange error

Hi all,

there is something I really don't understand well.

I got this error, and I have a gmTweaks addon, but I don't call PetFrame:Hide() function anywhere.

Lua Code:
  1. 2x [ADDON_ACTION_BLOCKED] AddOn 'gmTweaks' tried to call the protected function 'PetFrame:Hide()'.
  2. !BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
  3. [C]: in function `Hide'
  4. FrameXML\PetFrame.lua:81: in function `PetFrame_Update'
  5. FrameXML\PlayerFrame.lua:368: in function <FrameXML\PlayerFrame.lua:366>
  6. [C]: in function `PlayerFrame_SequenceFinished'
  7. FrameXML\PlayerFrame.lua:350: in function `PlayerFrame_UpdateArt'
  8. FrameXML\PlayerFrame.lua:274: in function `OnEvent'
  9. FrameXML\UnitFrame.lua:933: in function <FrameXML\UnitFrame.lua:931>
  10.  
  11. Locals:
  12. InCombatSkipped


The gmTweaks code can be found in gmUI or here:

https://is.gd/e3c4JK


Thanks all.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
08-23-19, 02:17 AM   #2
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 753
Some days ago someone mentioned Globe in another thread.
That tool is really extremly cool to check for problems.

https://www.townlong-yak.com/globe/

There are some potential problems in your code.

A global use of unitplate for example.

While options is local you create a global frame by naming it options. Such a common name is really dangerous I think.
Lua Code:
  1. local options = CreateFrame("Frame", "options", InterfaceOptionsFramePanelContainer)
Another code that might be a problem ... the first button1 is local but not at the time you use it as name.
Lua Code:
  1. local button1 = CreateFrame("button", button1, options, "UIPanelButtonTemplate")
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
08-23-19, 02:56 AM   #3
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 258
Hi Rilgamon.

I have correct the iussues you pointed out in this way:

Lua Code:
  1. local ADDON = ...
  2.  
  3. -- [ ... ]
  4.  
  5. local options = CreateFrame("Frame", ADDON .. "options", InterfaceOptionsFramePanelContainer)
  6.  
  7. -- [ ... ]
  8.  
  9. local button1 = CreateFrame("button", ADDON .. "button1", options, "UIPanelButtonTemplate")
  10.  
  11. -- [ ... ]

It should be ok now even if I don't think they can solve the iussue in the first post.
Btw thanks so much for your reply. It is really appreciated.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
08-23-19, 03:05 AM   #4
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 753
The problem with blocked addons is that it blames the current running addon.
Not the one that tainted the function.

Btw I mentioned only button1 but button2 has the same problem

When you really want to find out what is causing the problem you can use the taintlog
https://wow.gamepedia.com/CVar_taintLog
But be prepared for quite a bit of data
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
08-23-19, 07:31 AM   #5
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 258
Hi again,

when I fix button1 I fixed also button2 and checked if there are similar situations

I really don't know about taintlog. I'll try to debug with it asap.

Thanks again Rilgamon.
Your tips are precious.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
08-23-19, 09:22 AM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,071
As Rilgamon mentioned, the taintlog blames the currently running addon, which is almost never accurate. The example below is extremely rough, and is intended to be as simple as possible to get the point across.
  1. Game UI doing its thing using a global frame, variable, whatever
  2. Addon1 taints the UI path because all addons cause taint they aren't secure like Blizzard's UI code
  3. Addon1 does something with the global mentioned in #1 that messes with the Blizzard UI but doesn't break it
  4. Taintlog notes the bad behaviour and begins tracking the cause, but it's too late Addon1 is finished doing bad things
  5. Addon2 runs code, any code, even unrelated to the global and because addons are tainted by default, the taintlog throws a fit
  6. You get the error message [ADDON_ACTION_BLOCKED] blaming Addon2 because that was the last code ran
Keep in mind that Lua is a single thread language. That means Lua processes one command and then a second, then a third from a queue. It is not multi-threaded and cannot process two or more commands at the same time, which is another factor why the second addon gets the blame, even for something it had nothing to do with.

What you can do: turn on deeper taintlog tracking using /console taintLog setting where setting is a number between 0-2. The downside is that doing so will drastically slow down the game and drop frames while the game crunches through all that data.

https://wow.gamepedia.com/CVar_taintLog
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » strange error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off