Thread Tools Display Modes
Unread 07-30-12, 07:00 AM   #1
Miiru
A Wyrmkin Dreamwalker
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 55
Addon blocks Glyph Ui

So today i wanted to remove some more frames and continue to work on my texture pack and i came along the Glyph Ui, tried to equip a glyph and noticed that i get the usual action blocked message.

Curiously i wasn't even changing anything near the glyph UI so i looked over and over and it came down to this little code:

Code:
local frame = CreateFrame("FRAME");																					
		frame:RegisterEvent("ADDON_LOADED")
		function frame:OnEvent(event, arg1)
		
			if event == "ADDON_LOADED" and arg1 == "Blizzard_TalentUI" then
			
			_,c= PlayerTalentFrameSpecialization:GetRegions();		
			c:Hide()		
			c1,_,_,_,_,_,_,_,_,_,_,c4 = PlayerTalentFrameSpecializationSpellScrollFrameScrollChild:GetRegions();
			c1:SetTexture(0,0,0,0)
			c4:SetTexture(0.129,0.113,0.129,1)
	
   	 end
   	end
   	 
  frame:SetScript("OnEvent", frame.OnEvent);
If i delte those few lines, everything runs fine. I tested if those frames are protected by i always returned nil (unless i did it wrong ). Another interesting thing is that if i open up the Glyph Window and proceed to first remove a glyph and the equip one, i don't get an error at at all.

Any ideas on how to get rid of it? :/

edit: digged a bit deeper and it seems to be child c and child c4 causing the error.
__________________
◘◘ Author of MiirGui Texture Pack ◘◘

Last edited by Miiru : 07-30-12 at 11:01 AM.
Miiru is offline  
Unread 07-30-12, 12:55 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
Are those variables local in some part of your code that's not visible in the snippet or are they global like that?

Mainly talking about the throwaway variable '_'

Since that's a throwaway variable by programmer convention and not an automatically discarded variable, that's where I'd start.

There's a possibility Blizzard programmers have overlooked localizing some instance of _ in their own code so there's no telling what code paths are tainted.

Start by putting
Code:
local _,c,c1,c4
at the top of your file.
Dridzt is online now  
Unread 07-30-12, 01:32 PM   #3
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 80
Yeah, I've definitely seen taintLog errors since 5.0 that mention a tainted global _ when getting a Glyph UI action blocked error. Making sure all your _ variables are local seems to have become even more necessary now.
Barjack is offline  
Unread 07-30-12, 01:39 PM   #4
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
I've seen the same problem so far. First it reports nUI as being the addon factor and when I turn that off Titan Panel. But finding common ground with those 2 addons may be a bit difficult rofl.
__________________
Xrystal is offline  
Unread 07-30-12, 06:33 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,259
I've found a lot of leaked globals in Blizzard's beta UI code, including underscores. I haven't looked at the Glyph UI code, but it would not surprise me in the least if Blizzard forgot their "local" declarations there too.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline  
Unread 07-30-12, 06:49 PM   #6
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
the only block of code I can see that may be causing the problem is ..

CastGlyph command perhaps?

Lua Code:
  1. 517.function GlyphFrameSpell_OnClick (self, button)
  2.  518.  if ( IsModifiedClick("CHATLINK") ) then
  3.  519.    local _, _, _, _, _, link = GetGlyphInfo(self.glyphIndex);
  4.  520.    if ( link ) then
  5.  521.      ChatEdit_InsertLink(link);
  6.  522.    end
  7.  523.  else
  8.  524.    if self.disabledBG:IsShown() then
  9.  525.      return;
  10.  526.    end
  11.  527.    CastGlyph(self.glyphIndex);
  12.  528.    StaticPopup_Hide("CONFIRM_GLYPH_PLACEMENT");
  13.  529.  end
  14.  530.end
__________________
Xrystal is offline  
Unread 07-30-12, 07:00 PM   #7
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,259
Blizzard's taint reporting system is 99.99999% useless. Chances are, some code is tainting some other code that your addon interacts with, and that code interacts with some other code that interacts with some other code that's tainting something else, and that code interacts with some other code that interacts with some code in the Glyph UI.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline  
Unread 07-31-12, 02:04 AM   #8
Miiru
A Wyrmkin Dreamwalker
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 55
Wll thank you all and yes it's definately an underscore probleme right there, which caused the error.

I got around it by using the select method and it now works fine.
__________________
◘◘ Author of MiirGui Texture Pack ◘◘
Miiru is offline  
Unread 07-31-12, 03:21 AM   #9
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
hmmm, time to do a large search through nUI ... rofl

Edit: Oh wow, even local _ usage is causing it. Made 7 changes to nUI where Scott used _ for variables he didn't need to a dummy emptyVar variable and no more error .... nUI Lite fixed .. now for nUI Plus rofl. Then to go through all my addons, just in case I did use it somewhere.
__________________

Last edited by Xrystal : 07-31-12 at 04:29 AM.
Xrystal is offline  
Unread 07-31-12, 04:46 PM   #10
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Xrystal View Post
hmmm, time to do a large search through nUI ... rofl

Edit: Oh wow, even local _ usage is causing it. Made 7 changes to nUI where Scott used _ for variables he didn't need to a dummy emptyVar variable and no more error .... nUI Lite fixed .. now for nUI Plus rofl. Then to go through all my addons, just in case I did use it somewhere.
Fire up FindGlobals, it's designed for exactly this kind of thing.
Farmbuyer is offline  
Unread 07-31-12, 05:36 PM   #11
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
The problem is none of them were globals... Every instance of the _ values were local to the function it was in. The moment I replaced them .. no more addon block message.
__________________
Xrystal is offline  
Unread 08-28-12, 09:19 PM   #12
Betaldor
A Kobold Labourer
Join Date: Aug 2012
Posts: 1
I'm seeing this in my (as of yet unpublished addon) as well. Thank you for the problem description, I was about to lose my mind.

I found one non-local "_" variable in my code and as soon as I removed it, the Glyph taint went away.
Betaldor is offline  
Unread 08-30-12, 04:29 AM   #13
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
This is driving me nuts. I'm getting the same bug; however, even after I went through every inch of the code searching just for '_' ...I can't find any that should still be causing a problem. I even through all of the libs.

Can anyone suggest anything else for debugging this? Are there any tools for seeing what exactly is causing the error? The LUA error is worthless...

Code:
8x [ADDON_ACTION_FORBIDDEN] AddOn "Squire2" tried to call the protected function "CastGlyph()".
!BugGrabber-r188\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
Blizzard_GlyphUI\Blizzard_GlyphUI-1.0.lua:527: in function "GlyphFrameSpell_OnClick"
<string>:"*:OnClick":1: in function <string>:"*:OnClick":1

Locals:
nil
I went through every single lua file and put "local _" at the top (even ace library files) ...and nothing is helping.
Aelorean is offline  
Unread 08-30-12, 05:34 AM   #14
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
I tried that script on the files, but noticed nothing out of the ordinary. What should I be looking for in the output? There might be one or two globals there that could be made local; however, there's definitely none of the "usual suspects" listed (i.e., "_", i, k, v, etc) and I see nothing that stands out that could be causing a problem.

It seems strange that this ONLY occurs during this one thing (clicking on a glyph in the GlyphUI window) ...is there really no way to know what it is that's causing the problem?
Aelorean is offline  
Unread 08-30-12, 05:49 AM   #15
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
Originally Posted by Aelorean View Post
I tried that script on the files, but noticed nothing out of the ordinary. What should I be looking for in the output? There might be one or two globals there that could be made local; however, there's definitely none of the "usual suspects" listed (i.e., "_", i, k, v, etc) and I see nothing that stands out that could be causing a problem.

It seems strange that this ONLY occurs during this one thing (clicking on a glyph in the GlyphUI window) ...is there really no way to know what it is that's causing the problem?
Can't find your code to look at
Dridzt is online now  
Unread 08-30-12, 06:29 AM   #16
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
Here is a zip file with the addon. There are really only 3 files other than the libs: "Config.lua", "Squire2.lua" and "Localization.lua".

I have also included text files with the output of findglobals: Config_Globals.txt, Squire2_Globals.txt, and Localization_Globals.txt.

Please note that I didn't write this addon All I did was update it for 5.0.0.4. It's frustrating because everything seems updated and ready to go except for this one stupid error.

Also, I did at one point go through and rename all of the local variables that were "_" to something else; however, that did not seem to change anything, so I reverted back.
Attached Files
File Type: zip Squire2.zip (146.2 KB, 334 views)
Aelorean is offline  
Unread 08-30-12, 06:38 AM   #17
MagicKira
A Kobold Labourer
Join Date: Nov 2009
Posts: 1
I don't know if this helps any or is already known but all of my Broker_*insert function here* addons seem to be triggering the error. The rest of the normal data broker addons are fine for some reason, but the ones like Broker_Wallet, Broker_Calendar, etc seem to REALLY not like the glyph window.

Correction: I just went through it again after doing some rechecks and only Broker_CPU and Broker_Calendar are triggering this now. The rest aren't. I don't know why not now but *shrugs* I don't code, I only play squishy characters.

Last edited by MagicKira : 08-30-12 at 06:57 AM.
MagicKira is offline  
Unread 08-30-12, 06:44 AM   #18
Morsker
A Fallenroot Satyr
 
Morsker's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 22
Originally Posted by Aelorean View Post
Here is a zip file with the addon. There are really only 3 files other than the libs: "Config.lua", "Squire2.lua" and "Localization.lua".
The pre-hooking UIErrorsFrame_OnEvent is suspicious. The right implementation is to replace UIErrorsFrame's OnEvent handler, not to prehook the function. There's a little mod called pError that's an example of the right way to do it. Or if all the mod is trying to do is suppress error messages, you can unregister and reregister the event:

UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
-- whatever code might generate errors
UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE")

Also Config.lua is setting something called PanelButton_OnHide globally, although it appears completely unused; I don't know why it's there at all.
Morsker is offline  
Unread 08-30-12, 06:49 AM   #19
Aelorean
A Deviate Faerie Dragon
Join Date: May 2010
Posts: 15
Thanks ...I'll fix those right away (it's code from the original author.)
Aelorean is offline  
Unread 08-31-12, 05:43 AM   #20
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
MoP beta build 16030 change
Code:
local specialization = GetSpecialization(_, _, PlayerTalentFrame.talentGroup);
to
Code:
local specialization = GetSpecialization(false, false, PlayerTalentFrame.talentGroup);
Maybe they've finally fixed all those weird taint problems involving the throwaway variables they're leaking
Dridzt is online now  
 

Go BackWoWInterface » WoD Beta » MoP archived threads » Addon blocks Glyph Ui

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