Quantcast
Issue with Addon on TBC Classic - WoWInterface
Thread Tools Display Modes
04-11-21, 04:49 PM   #1
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Issue with Addon on TBC Classic

Firstly, this issue is neither present on the current WoW Classic, or Retail clients, I'm not sure if it's something related to restrictions Blizzard has placed on addons for the TBC beta, or if it's going to be an issue in TBC Classic itself, so..

Code:
Message: Interface\FrameXML\RestrictedExecution.lua:473: Cannot call restricted closure from insecure code
Time: Sun Apr 11 15:33:04 2021
Count: 1
Stack: Interface\FrameXML\RestrictedExecution.lua:473: Cannot call restricted closure from insecure code
[string "=[C]"]: ?
[string "@Interface\FrameXML\RestrictedExecution.lua"]:473: in function <Interface\FrameXML\RestrictedExecution.lua:447>
[string "@Interface\FrameXML\SecureGroupHeaders.lua"]:116: in function <Interface\FrameXML\SecureGroupHeaders.lua:110>
[string "@Interface\FrameXML\SecureGroupHeaders.lua"]:166: in function <Interface\FrameXML\SecureGroupHeaders.lua:123>
[string "@Interface\FrameXML\SecureGroupHeaders.lua"]:399: in function <Interface\FrameXML\SecureGroupHeaders.lua:387>
[string "=[C]"]: in function `Show'
[string "@Interface\FrameXML\SecureStateDriver.lua"]:100: in function <Interface\FrameXML\SecureStateDriver.lua:95>
[string "@Interface\FrameXML\SecureStateDriver.lua"]:164: in function <Interface\FrameXML\SecureStateDriver.lua:146>
[string "=[C]"]: in function `SetAttribute'
[string "@Interface\FrameXML\SecureStateDriver.lua"]:11: in function `RegisterAttributeDriver'
[string "@Interface\AddOns\Roth_UI\embeds\oUF\ouf.lua"]:575: in function `SpawnHeader'
[string "@Interface\AddOns\Roth_UI\units\party.lua"]:258: in main chunk

Locals: (*temporary) = "Cannot call restricted closure from insecure code"
Here's the SpawnHeader method causing the error in oUF:

Lua Code:
  1. function oUF:SpawnHeader(overrideName, template, visibility, ...)
  2.         if(not style) then return error("Unable to create frame. No styles have been registered.") end
  3.  
  4.         template = (template or 'SecureGroupHeaderTemplate')
  5.  
  6.         local isPetHeader = template:match'PetHeader'
  7.         local name = overrideName or generateName(nil, ...)
  8.         local header = CreateFrame('Frame', name, oUF_PetBattleFrameHider, template)
  9.  
  10.         header:SetAttribute("template", "oUF_ClickCastUnitTemplate")
  11.         for i=1, select("#", ...), 2 do
  12.             local att, val = select(i, ...)
  13.             if(not att) then break end
  14.             header:SetAttribute(att, val)
  15.         end
  16.  
  17.         header.style = style
  18.         header.styleFunction = styleProxy
  19.  
  20.         -- Expose the header through oUF.headers.
  21.         table.insert(headers, header)
  22.  
  23.         -- We set it here so layouts can't directly override it.
  24.         header:SetAttribute('initialConfigFunction', initialConfigFunction)
  25.         header:SetAttribute('oUF-headerType', isPetHeader and 'pet' or 'group')
  26.  
  27.         if(Clique) then
  28.             SecureHandlerSetFrameRef(header, 'clickcast_header', Clique.header)
  29.         end
  30.  
  31.         if(header:GetAttribute'showParty') then
  32.             self:DisableBlizzard'party'
  33.         end
  34.  
  35.         if(visibility) then
  36.             local type, list = string.split(' ', visibility, 2)
  37.             if(list and type == 'custom') then
  38.                 RegisterAttributeDriver(header, 'state-visibility', list)
  39.             else
  40.                 local condition = getCondition(string.split(',', visibility))
  41.                 RegisterAttributeDriver(header, 'state-visibility', condition)
  42.             end
  43.         end
  44.  
  45.         return header
  46.     end

And here is where that method is called:

Lua Code:
  1. local party = oUF:SpawnHeader(
  2.       "Roth_UIPartyHeader",
  3.       nil,
  4.       attr.visibility,
  5.       "showPlayer",         attr.showPlayer,
  6.       "showSolo",           attr.showSolo,
  7.       "showParty",          attr.showParty,
  8.       "showRaid",           attr.showRaid,
  9.       "point",              attr.VerticalPoint,
  10.       "yoffset",            attr.yoffset,
  11.       "oUF-initialConfigFunction", ([[
  12.         self:SetWidth(%d)
  13.         self:SetHeight(%d)
  14.         self:SetScale(%f)
  15.       ]]):format(cfg.units.party.vertwidth, cfg.units.party.vertheight, cfg.units.party.scale)
  16.     )
  17.     party:SetPoint("TOPLEFT",partyDragFrame,0,0)

I don't see anything wrong with these, and as stated, they do not cause this exception on WoW Classic or Retail Shadowlands, only on the TBC Classic beta.
__________________
My Addons | "If someone says something is impossible, they lack either imagination, or determination."
  Reply With Quote
04-11-21, 06:17 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,641
I'm similarly afflicted with nUI.

It's a known issue in TBC and apparently will be fixed in a future patch.

https://github.com/Stanzilla/WoWUIBugs/issues/66
__________________
  Reply With Quote
04-11-21, 06:24 PM   #3
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 113
Noted, tyvm.
__________________
My Addons | "If someone says something is impossible, they lack either imagination, or determination."
  Reply With Quote

WoWInterface » Classic - AddOns, Compliations, Macros » Classic - AddOn Help/Support » Issue with Addon on TBC Classic

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