Thread Tools Display Modes
01-24-12, 12:48 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Odd kgPanels error.

So I've been getting a random error while in raid combat from kgPanels and I assume something is trying to make secure frames while in combat, but I have nothing that seems to be doing this. What I believe is happening is the default wow raid frames are trying to update in combat (LFR people joining and dropping group for example) and kgPanels hooked scripts are causing issues.

Any thoughts?

Error:
62x CreateFrame: Can"t create protected "Button" now
<in C code>
<in C code>
Blizzard_CompactRaidFrameContainer.lua:343: in function "CompactRaidFrameContainer_GetUnitFrame"
Blizzard_CompactRaidFrameContainer.lua:315: in function "CompactRaidFrameContainer_AddUnitFrame"
Blizzard_CompactRaidFrameContainer.lua:267: in function "CompactRaidFrameContainer_AddPets"
Blizzard_CompactRaidFrameContainer.lua:183: in function "CompactRaidFrameContainer_LayoutFrames"
Blizzard_CompactRaidFrameContainer.lua:131: in function "CompactRaidFrameContainer_TryUpdate"
Blizzard_CompactRaidFrameContainer.lua:63: in function "CompactRaidFrameContainer_OnEvent"
<string>:"*:OnEvent":1: in function <string>:"*:OnEvent":1

Locals:
(*temporary) = "Button"
(*temporary) = "CompactRaidFrame12"
(*temporary) = CompactRaidFrameContainer {
unitFrameUnusedFunc = <func> @Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameContainer.lua:47
flowSortFunc = <func> @Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:733
groupMode = "discrete"
raidUnits = <table> {}
frameUpdateList = <table> {}
flowOrientation = "vertical"
borderFrame = CompactRaidFrameContainerBorderFrame {}
flowFilterFunc = <func> @Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:831
groupFilterFunc = <func> @Blizzard_CompactRaidFrames\Blizzard_CompactRaidFrameManager.lua:861
partyUnits = <table> {}
flowMaxPrimaryUsed = 360.0000005471
flowMaxSecondaryUsed = 193.99997551737
units = <table> {}
flowPauseUpdates = true
enabled = false
frameReservations = <table> {}
flowFrames = <table> {}
0 = <userdata>
displayPets = true
displayFlaggedMembers = true
}
(*temporary) = "CompactUnitFrameTemplate"
= <func> =[C]:-1
= <func> @..\kgPanels.lua:286

Pointed location:
lua Code:
  1. local function reParentCheck(newframe) 
  2.     for frame,mparent in pairs(missingParents) do
  3.         local pf = parents[mparent]
  4.         if not (kgPanels.db.global.layouts[kgPanels.active] and  kgPanels.db.global.layouts[kgPanels.active][frame]) then
  5.             return
  6.         end
  7.         local isPercents = strmatch(kgPanels.db.global.layouts[kgPanels.active][frame].width, "%d+%.?%d*%%") or strmatch(kgPanels.db.global.layouts[kgPanels.active][frame].height, "%d+%.?%d*%%")
  8.         if pf or mparent == newframe then -- the frame we want just got created
  9.             -- make sure we dont parent to outselves
  10.             if activeFrames[frame] == pf then error("Attempting to parent frame to self") end
  11.             if pf then
  12.                 if (isPercents and pf:GetWidth() > 0 and pf:GetHeight() > 0) or not isPercents then
  13.                     kgPanels:ResetParent(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  14.                     activeFrames[frame]:Show();updateChildVisibility(activeFrames[frame])
  15.                     missingParents[frame] = nil
  16.                     checkFrames = checkFrames -1
  17.                     activeFrames[frame].missing_parent_at_load = false
  18.                     activeFrames[frame].scripts_loaded = false
  19.                     executeScripts(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  20.                 end
  21.             end
  22.         elseif activeFrames[mparent] and activeFrames[mparent] ~= frame then -- check the list of self frames
  23.             if (isPercents and activeFrames[mparent]:GetWidth() > 0 and activeFrames[mparent]:GetHeight() > 0) or not isPercents then
  24.                 kgPanels:ResetParent(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  25.                 activeFrames[frame]:Show();updateChildVisibility(activeFrames[frame])
  26.                 missingParents[frame] = nil
  27.                 checkFrames = checkFrames -1
  28.                 activeFrames[frame].missing_parent_at_load = false
  29.                 activeFrames[frame].scripts_loaded = false
  30.                 executeScripts(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  31.             end
  32.         end
  33.     end
  34.     for frame,manchor in pairs(missingAnchors) do
  35.         if activeFrames[manchor] and activeFrames[manchor] ~= frame then -- check the list of self frames
  36.             kgPanels:ResetParent(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  37.             activeFrames[frame]:Show()
  38.             updateChildVisibility(activeFrames[frame])
  39.             missingAnchors[frame] = nil
  40.             checkFrames = checkFrames - 1
  41.             activeFrames[frame].missing_anchor_at_load = false
  42.             activeFrames[frame].scripts_loaded = false
  43.             executeScripts(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  44.         elseif parents[manchor] or manchor == newframe then -- the frame we want just got created
  45.             -- make sure we dont anchor to outselves
  46.             if activeFrames[frame] == parents[manchor] then error("Attempting to anchor frame to self") end
  47.             if parents[manchor] then
  48.                 kgPanels:ResetParent(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  49.                 activeFrames[frame]:Show();
  50.                 updateChildVisibility(activeFrames[frame])
  51.                 missingAnchors[frame] = nil
  52.                 checkFrames = checkFrames -1
  53.                 activeFrames[frame].missing_anchor_at_load = false
  54.                 activeFrames[frame].scripts_loaded = false
  55.                 executeScripts(activeFrames[frame],kgPanels.db.global.layouts[kgPanels.active][frame],frame)
  56.             end
  57.         end
  58.     end
  59. end
  60.  
  61. -- Called from securly hooked CreateFrame().  Check if the frame being created is one of the frames marked as dirty in
  62. -- our list of bad parent frames.  If it is, reconfigure the panel to work with the frame and remove it from the dirty list
  63. -- This is line 286 here:
  64. local parentCheckHook = function(...)
  65.     local _,frame,_,_ = ...
  66.     if frame and checkFrames > 0 then
  67.         reParentCheck(frame)
  68.     end
  69. end
  70.  
  71. --This is the hooked function later on in kgpanels code:
  72. -- Hook the CreateFrame function so that kgPanels set to non-existant parent/anchor frames can be updated if/when those frames are created
  73.     hooksecurefunc("CreateFrame", parentCheckHook)
  Reply With Quote
01-24-12, 12:52 AM   #2
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
I remember the Blizz Raid Frames being verrrrry taint sensitive.

Now, if only they could introduce an option to permanently disable them... eh, never going to happen.
  Reply With Quote
01-25-12, 10:37 PM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Is there any way to avoid this error??
  Reply With Quote
01-26-12, 02:38 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It's probably something you're doing in a kgPanels script that the addon doesn't account for. Post your scripts, or at least rule them out as a cause by switching to a blank profile in kgPanels and see if you still get errors when your usual scripts aren't loaded.
  Reply With Quote
01-26-12, 08:22 PM   #5
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
It's probably something you're doing in a kgPanels script that the addon doesn't account for. Post your scripts, or at least rule them out as a cause by switching to a blank profile in kgPanels and see if you still get errors when your usual scripts aren't loaded.
I have a rather extensive kgPanels layout (nothing that creates buttons however). I'll try just having a default profile and see if that does anything.
  Reply With Quote
01-28-12, 09:34 PM   #6
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by suicidalkatt View Post
I have a rather extensive kgPanels layout (nothing that creates buttons however). I'll try just having a default profile and see if that does anything.
So, after a few days of testing something in my layout is bringing the error up.

I can post my saved variables if someone wants to fish around?
  Reply With Quote
01-28-12, 11:36 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I already told you to post your scripts.
  Reply With Quote
01-29-12, 01:58 AM   #8
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
I already told you to post your scripts.
http://dl.dropbox.com/u/4479083/kgPanels.lua

If you want my textures and such, I can add my SharedMedia_MyMedia here as well.

Last edited by suicidalkatt : 01-29-12 at 02:05 AM.
  Reply With Quote
01-31-12, 06:26 PM   #9
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Any updates?
  Reply With Quote
02-01-12, 05:49 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
No, I'm mainly only home on weekends; during the week I don't usually have time to dig through code, and do not have any access to WoW to load anything in-game.
  Reply With Quote
02-07-12, 07:16 PM   #11
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Bump! If anyone has any insight, it would be greatly appreciated.
  Reply With Quote
02-07-12, 10:46 PM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
That's a huge amount of scripting. Frankly you'd be better off just writing your own addon instead of going through kgPanels to make option buttons, frame toggle buttons, etc. You clearly understand enough WoW programming to write those scripts; creating franes is not really any more complicated than that.

Anyway, I only got through the first few hundred lines of scripting (and that was after spending 10 minutes removing all the non-script junk from the SV file), but I didn't see anything that should be tainting anything.

You could try enabling taint logging and checking the log to see if anything related to kgPanels comes up. See:
http://www.wowpedia.org/CVar_taintLog

Finally, you might consider submitting a ticket on the kgPanels project page over on WowAce. The kgPanels developer(s) will probably have a much easier time scanning your scripts and identifying any possible issues, since they know exactly how the addon works and how it handles scripts.

Oh, and I forgot to ask if the problem still happens when kgPanels (with your scripts) is the only addon loaded.
  Reply With Quote
02-08-12, 07:18 AM   #13
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
Oh, and I forgot to ask if the problem still happens when kgPanels (with your scripts) is the only addon loaded.
Yea it does. I'll submit a ticket when I get the chance.

The main reason I'm still using kgPanels vs making a complete addon of my own, is that it allows the users of my UI a bit more customization, should they seek it. Easier on my part I spose.

Last edited by suicidalkatt : 02-08-12 at 08:43 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Odd kgPanels error.


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