113x [ADDON_ACTION_BLOCKED] AddOn 'NimhfreeUI' tried to call the protected function '
When encountering bosses I get:
113x [ADDON_ACTION_BLOCKED] AddOn 'NimhfreeUI' tried to call the protected function 'Boss1TargetFrame:SetPoint()' which I think is because of: -- Move the target frame to the bottom left. f=TargetFrame f:SetMovable(1) f:SetUserPlaced(true) f:SetScale(.8) f:ClearAllPoints() f:SetPoint("LEFT",MultiBarRightButton7,"BOTTOMLEFT",0,100) which is set up at the very start, so not in combat. Anyone know how to do this properly? |
|
When you post those links are you trying to say there is not enough code present to understand what is happening?
The addon works. It changes the location, etc. of the default UI elements. It moves the target frame as indicated, as well as a lot of other frames. When in normal combat, no errors happen, and the target frame is where the addon moves it. However, when in a raid, for example, the indicated error occurs, and I attribute it to the target frame code. Here is code: Code:
local _, release = GetBuildInfo() |
I just ran an experiment with the addon having commented out the moving of the TargetFrame and the FocusFrame, as well as editing the layout-local.txt file to ensure any entries for those frames were removed.
For most of the fights everything went well. However, on one of them (the second) in the series, the error appeared. Therefore, I cannot hazard a guess as to what is really happening. |
Hi, it's been awhile since I've done anything with unit frames but wouldn't Boss1TargetFrame be the target of the first boss frame and not your target?
anyway, these frames use a secure frame template which means that when you're in combat and you change any of the frames attributes, including things like :Show, :Hide and :Setpoint you will cause taint for that frame and anything related to it, which is very bad and should be avoided. It's up to the author to prevent this, by simply checking InCombatLockdown() before changing a secure frames attributes |
Lua Code:
No private servers please. Nothing in the code you posted will spread taint. Unless there's more to it than what you care to reveal here, this is not the culprit of your error. |
I didn't think there was any taint. I was just so confused, and with my version that does not change the TargetFrame it shows that I am not doing the taint here. Perhaps the taint is from something else but my addon gets the blame.
It is not a private server, but when I wrote the code I had to handle both live and PTR. I just keep the code in place as a reminder to keep handling version issues, plus a reminder of how a problem was solved. You will see most of my addons are like this. I even left the old architecture in place for getting completed quests from the server, while transforming it for the new way Blizzard does things. |
It's very likely your addon is still the cause, unless the code you provided is all there is. The tainting addon will be correctly listed as the offender in most cases, and I'm guessing the stack trace that you didn't include will say this error originated from UIParent.lua.
There are a couple of different things that can cause this: 1. The terrible, but unfortunately common, practice to use no-op functions to replace functions on widgets to nullify some change they don't want in their UI. E.g. Lua Code:
2. Calling Lua-implemented functions that bears taint with it to a table or local values in the default UI. E.g. Lua Code:
3. A combination of the above, where you replace an API function to gate or nullify the changes it attempts to make. If the function is called from a code scope that eventually does something secure, the taint spread is revealed. If you're not guilty of this, your addon is not the cause. Like I already said, the code you posted has nothing to do with the error you're getting. Just because it happens to be Boss1TargetFrame doesn't mean it has anything to do with you moving the regular TargetFrame around. They're completely unrelated. |
You can't anchor stuff to the MultiBarRightButton7 not to the whole MultiBarRight, since the multibar is protected so every time the Boss frames appears that pushes the MultiBarActionBars to the left in combat (if there is enough Boss frames to push it (but the SetPoint update runs even with 1 visible Boss frame, or even when the game just decides to run a full frame update)), which cause taint all across every anchored and child objects. The root of the issue is that the TargetFrame gets hidden and shown in combat, since you kinda want to target and untarget units while in combat too.
This is the same fiasco that happens with the MiniMap, since Arena frames are anchored to the MiniMap, you can't so anything protected with the MiniMap in combat, as long as the protected Arena frames are anchored to it. |
Quote:
Setting a point for a frame out of combat doesn't spread taint. To prove my point, I created a secure action button, anchored it to LootFrame, which is completely unprotected and moved around in combat to follow the mouse cursor. The LootFrame code, however, is not tainted and is moved around by signed Blizzard code. Therefore, no problem. Try it yourself: Lua Code:
There seems to be a lot of misconceptions about taint floating around. |
Quote:
Here is the code where the Blizzard code could decide to move the MultiBars at any time: https://github.com/Resike/BlizzardIn...ua#L2709-L2713 You pull a boss, combat locks down, boss frames show up (or not), MultiBarLeft and MultiBarRight gets pushed to the left on the x axis (or not) TargetFrame (protected) are anchored to the MultiBarRight, so basically you try to move a protected frame in combat. And bang you get blamed for the whole taint, even tho you set your initial position seucrely and did't tried to move anything in combat. |
So does this mean I am not allowed to anchor anything to the MultiBarButtons at all? I will change how they are anchored and test to see what happens.
|
It turns out that moving the quest frame also caused problems when the boss frame appears. So I think I have it working now, but cannot move the quest frame.
Does anyone know if it is possible to move these frames that get moved by Blizzard code when the boss frames appear? I had thought the code I was using would work, but it seems not. |
Quote:
Please, Nimhfree, post your entire code for the whole addon if you haven't already. I'm 99% sure your problems come from somewhere else. |
Quote:
Taint are specially hard to track down, and works differently for different frames, and other enabled addons also play a big role. |
All times are GMT -6. The time now is 10:22 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI