![]() |
Bagnon causes restricted environment lock?
I'm currently using some table manipulation inside the secure environment, where I gather unit frames by recursively scanning the UIParent and inserting all protected frames with a unit attribute assigned into a restricted table.
This works flawlessly - until I open interface settings. After that, attempting to run the snippet that gathers nodes results in this error: Lua Code:
Naturally, I turned to the trustworthy taint log to see what the hell happend. After sifting through all the bloat I found this: Code:
11/25 00:02:09.812 Execution tainted by Bagnon while reading BagnonFrameinventory - Interface\FrameXML\UIParent.lua:2784 So what I'm really asking here is:
Here's the actual code, but it's all executed within a secure enviroment and using secure buttons to trigger changes within. It works regardless of combat state and hasn't broken down in any other scenario thus far. |
The only thing I can think of is that Bagnon uses the ColorPickerFrame in the configuration panel.
|
What are you trying to accomplish? Trying to hook the functionalty of every unit frame from the UIParent?
|
Quote:
![]() Four secure buttons are each given a direction, which is used to find the most appropriate selection from a table of unit frames. The wrapped pre-body generates a unit attribute, which is then attached to the button and fired immediately afterwards. The result is a one button press to both find the next unit frame and "click" that unit frame. The most appropriate unit frame is determined by looking at where the unit frames are drawn on screen. The cursor you see in that gif is just smoke and mirrors. I'm not actually hooking anything. |
Quote:
I can't say for sure that Bagnon is causing the issue, but disabling it solves the problem. This is the part where shit hits the fan: Lua Code:
|
I figured out a workaround, which involves scanning the children of UIParent outside the secure environment and then pushing the frames onto a stack one by one if they are protected.
Attempting to insert something tainted into a table created in the secure environment is most likely what caused the problem. Since InterfaceOptionsFrame is a child of UIParent, it would be included in the table if the scan is done outside of combat. Why specifically Bagnon seemed to be the culprit, I'm not sure. But this solution works: Lua Code:
Lua Code:
|
The taint log is pointing to bagnon inserting its frame into the UISpecialFrames table which is read by the CloseSpecialWindows function in UIParent.lua.
Your error itself is being caused by "newtable" being called from a tainted execution path, and frankly I don't know how that's even possible. |
Quote:
|
Quote:
Here's an example that outputs all unprotected children of UIParent when you mouse over a unit. If you're in combat, GetChildren() will simply not include those frames, it doesn't freak out about a tainted execution path. Lua Code:
|
Quote:
|
Quote:
The version that's on curse does cause this error, so it's something they've managed to do between the version that's on here and the version that's on curse. |
Quote:
To reproduce, try this: run the code you posted, then open Interface, head to the Addons tab, then close the frame. After that, mouseover triggers the error. I ran this compressed version since I disabled WowLua: Lua Code:
Quote:
|
Quote:
|
Well, I've identified that the first version of Bagnon with this issue is 6.0.20, which was a "complete rewrite" according to the change log.
I'd like to know exactly what they did to cause this, because I'm pretty sure it shouldn't be possible, but that will take some more investigating. Quote:
Since even the default blizzard raid frames break when a player joins or leaves in combat, I doubt it's something you need to account for. edit: The issue is being caused from Bagnon_Config importing "sushi" from bagnon\libs. |
Quote:
I use a bunch of secure code to accomplish the functionality of ConsolePort and its innate gimmicks, so I'm somewhat versed in the SecureHeaders, but never had this problem happen before. I'll just leave the workaround in place for now, since it's not really necessary to scan every child of UIParent whenever my fake cursor is toggled on. |
The offending file appears to be Bagnon\libs\Sushi-3.0\Classes\TextureDropdown.lua calling SushiGroup() which is executing something in Group.lua
Oh good god, it's from his poncho library doing unspeakable things to his frame's metatable. I'm going to let him fix this himself. |
Quote:
I agree this needs to be fixed asap, since it can potentially break many other addons in its wake. Knowing I can't use restricted tables safely when Bagnon is running makes me want to disable it until it's fixed. |
Quote:
|
Quote:
I haven't personally done anything with them, so it's quite possible I'm mistaken. It's not something simple to test without involving other people. |
Quote:
![]() Anyway, I would ideally like to employ the most dynamic solution, but Bagnon currently craps all over that. The trade-off when gathering nodes outside the secure environment is not finding secure frames created in combat (assuming that's not entirely fictional), but at least it deals with this wonky issue. I've never been much for libraries since I like to do things the hard way and learn something in the process, but is this a Poncho thing or only related to Bagnon? What is Poncho even used for? Is it popular? |
Quote:
http://forums.wowace.com/showpost.ph...postcount=3163 http://www.wowinterface.com/forums/s...ighlight=taint |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
You can also force this hack to the default raid frames so they will get updated properly even in combat. |
Found the code for a very basic raid frame I used for some testing in the past.
https://gist.github.com/Lombra/782d84064be0d1f3eefc This seems to be able to create frames when I join a raid, and also add new frames as more people join. I don't know what prevents other addons from functioning. Edit: Pro tip, go hit a training dummy in garrison and then join some fast filling raid like Kazzak or one of the major Tanaan rare bosses! |
Quote:
It would seem that this is something that needs to be taken into account after all. |
Quote:
|
Quote:
What i don't get that why is your frames don't update instantly when you join a raid. |
Quote:
Noticed the slightly delayed updating, too. Thought it was working as intended maybe. |
Quote:
|
All times are GMT -6. The time now is 02:57 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI