Joker119 |
04-11-21 04:49 PM |
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:
function oUF:SpawnHeader(overrideName, template, visibility, ...) if(not style) then return error("Unable to create frame. No styles have been registered.") end template = (template or 'SecureGroupHeaderTemplate') local isPetHeader = template:match'PetHeader' local name = overrideName or generateName(nil, ...) local header = CreateFrame('Frame', name, oUF_PetBattleFrameHider, template) header:SetAttribute("template", "oUF_ClickCastUnitTemplate") for i=1, select("#", ...), 2 do local att, val = select(i, ...) if(not att) then break end header:SetAttribute(att, val) end header.style = style header.styleFunction = styleProxy -- Expose the header through oUF.headers. table.insert(headers, header) -- We set it here so layouts can't directly override it. header:SetAttribute('initialConfigFunction', initialConfigFunction) header:SetAttribute('oUF-headerType', isPetHeader and 'pet' or 'group') if(Clique) then SecureHandlerSetFrameRef(header, 'clickcast_header', Clique.header) end if(header:GetAttribute'showParty') then self:DisableBlizzard'party' end if(visibility) then local type, list = string.split(' ', visibility, 2) if(list and type == 'custom') then RegisterAttributeDriver(header, 'state-visibility', list) else local condition = getCondition(string.split(',', visibility)) RegisterAttributeDriver(header, 'state-visibility', condition) end end return header end
And here is where that method is called:
Lua Code:
local party = oUF:SpawnHeader( "Roth_UIPartyHeader", nil, attr.visibility, "showPlayer", attr.showPlayer, "showSolo", attr.showSolo, "showParty", attr.showParty, "showRaid", attr.showRaid, "point", attr.VerticalPoint, "yoffset", attr.yoffset, "oUF-initialConfigFunction", ([[ self:SetWidth(%d) self:SetHeight(%d) self:SetScale(%f) ]]):format(cfg.units.party.vertwidth, cfg.units.party.vertheight, cfg.units.party.scale) ) 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.
|