[PTR,7.1] Nameplate Color Change causes lua error in combat.
When any addon modifies the color of the default nameplates it will cause the following error when a new nameplate is created during combat.
Code:
1x [ADDON_ACTION_BLOCKED] AddOn '!Colorz' tried to call the protected function 'SetTargetClampingInsets()'. |
The error is pretty clear about that. The problem is not you setting the color but the addon !Colorz trying to call SetTargetClampingInsets. That function is protected now.
With 7.1 some of the nameplate related function calls become restricted. http://us.battle.net/forums/en/wow/topic/20749494846 On that note. You can build nameplates with oUF now. http://www.wowinterface.com/forums/s...ad.php?t=54584 If you are already using oUF for your unitframes you can get rid of the second set of unit event handlers and use oUF for all units. |
I know about the restrictions and none of the addons that I have tested touch SetTargetClampingInsets in any way. This is the entire Colorz addon and as you can see it shouldn't be interacting with that function that is only used in NamePlateDriverMixin:SetupClassNameplateBars().
Lua Code:
|
This line is giving you the error:
https://github.com/tomrus88/Blizzard...lates.lua#L221 Called here: https://github.com/tomrus88/Blizzard...Plates.lua#L74 From here: https://github.com/tomrus88/Blizzard...Plates.lua#L38 You manipulate a Blizzard global making all secure code accessing that global insecure. This results in an error in secure environment. Btw ... that is an error from a taint right? (Interface action blocked etc...) If it is a taint the error can come from anywhere. |
I made a quick video to show what is going on. In Colorz if I comment out "UnitSelectionColor = GameTooltip_UnitColor" it will stop the error but as said in my first post it doesn't seem to matter what method you are using.
My nameplate addon hooks CompactUnitFrame_UpdateHealthColor with the following code. Lua Code:
If you comment out "frame.healthBar.r, frame.healthBar.g, frame.healthBar.b = r, g, b" from the code the error is gone but since that is the code that actually sets the color it doesn't work without it. |
I can confirm it can happen in combat with just this snippet
Lua Code:
taintLog (apparently same as the error log) Code:
Interface\FrameXML\CompactUnitFrame.lua:372 CompactUnitFrame_UpdateHealthColor() No idea really what is happening now, with the 7.1 nameplate changes as explained by zork :s |
Also, you cannot do this:
Code:
frame.healthBar.r, frame.healthBar.g, frame.healthBar.b = r, g, b |
Quote:
|
Using SetStatusBarColor seems to work now but the the rest still bugs out.
|
Well you could do your nameplates with oUF. Would solve your issues. :)
|
I can confirm that changing nearly any member of a blizzard nameplate is triggering protected errors.
This small snipped does trigger issues already: C_Timer.NewTicker (1, function() NamePlate1.UnitFrame.healthBar.r = 0 end) We could just use "NamePlate1.UnitFrame.healthBar:SetStatusBarColor (1, 0, 0)" but without changing the .r .g .b values the blizzard nameplate addon will "think" the color is the same and won't trigger color changes by it self due to that. |
So does anyone know how to change the nameplate colors without tainting them (in combat)?
I still don't understand what changed in 7.1 for nameplates to get tainted, while it had worked fine previously (update 2-13) http://www.wowinterface.com/forums/s...ad.php?t=55127 |
I don't think this issue is strictly related to coloring and nameplates. I use the default plates and i don't have any coloring addon, and i still get this taint occasionally. Which mean the taint itself spread to this values somehow after a while anyway.
|
All times are GMT -6. The time now is 07:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI