WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Classic - AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=179)
-   -   Issue with Addon on TBC Classic (https://www.wowinterface.com/forums/showthread.php?t=58686)

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:
  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.

Xrystal 04-11-21 06:17 PM

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

Joker119 04-11-21 06:24 PM

Noted, tyvm.


All times are GMT -6. The time now is 09:38 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI