Thread Tools Display Modes
02-12-17, 01:52 PM   #1
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
NameplateColors - "SetTargetClampingInsets" error

Hello there,
I'm using addon NamePlateColors which is giving me this error:
Lua Code:
  1. 1x [ADDON_ACTION_BLOCKED] AddOn 'NameplateColors' tried to call the protected function 'SetTargetClampingInsets()'.
  2. !BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
  3. [C]: in function `SetTargetClampingInsets'
  4. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:221: in function `SetupClassNameplateBars'
  5. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:74: in function `OnNamePlateAdded'
  6. ...eBlizzard_NamePlates\Blizzard_NamePlates.lua:38: in function <...eBlizzard_NamePlates\Blizzard_NamePlates.lua:32>
  7.  
  8. Locals:

Do you know what's causing this error and how to fix it?
  Reply With Quote
02-12-17, 05:01 PM   #2
Marsgames
An Aku'mai Servant
 
Marsgames's Avatar
Join Date: Jul 2016
Posts: 33
I can't really help you but it seams that only Blizzard can use the function "SetTargetClampingInsets()" so it won't work.

Unfortunately I can't help you more than that, sorry
  Reply With Quote
02-12-17, 05:44 PM   #3
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Ever since the introduction of the new nameplates, this is now the common "vague taint" error that quite a few addons are getting, along with the CompactRaidFrame error that's been around for years. Some addons even report both. We know that the CompactRaidFrame error stems from using Blizzard's DropDownMenu but no one has figured out what causes this SetTargetClampingInsets error yet.
  Reply With Quote
02-12-17, 11:24 PM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I'm almost sure that it's caused by UnitSelectionColor or GameTooltip_UnitColor or both.
  Reply With Quote
02-13-17, 10:36 AM   #5
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Related from this thread http://www.wowinterface.com/forums/s...ad.php?t=54635

I tested with KuiNameplates, TidyPlates and ElvUI and they don't have this problem
While Plater and NameplateColors do taint in combat



When setting the r, g, b fields on a healthbar it taints. Omitting it still works but .SetStatusBarColor will then be called everytime, fwiw
https://github.com/Gethe/wow-ui-sour....lua#L396-L406
Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateHealthColor", function(frame)
  2.     local r, g, b = 1, 0, 0
  3.     if r ~= frame.healthBar.r or g ~= frame.healthBar.g or b ~= frame.healthBar.b then
  4.         frame.healthBar:SetStatusBarColor(r, g, b) -- doesnt taint
  5.         frame.healthBar.r, frame.healthBar.g, frame.healthBar.b = r, g, b -- taints
  6.     end
  7. end)

Hopefully it's fixed now, but please give your feedback otherwise
https://github.com/Ketho/NameplateCo...0a3bcc65da029d

Last edited by Ketho : 02-14-17 at 12:24 PM.
  Reply With Quote
02-14-17, 07:21 AM   #6
Dasteman
A Murloc Raider
 
Dasteman's Avatar
Join Date: Feb 2017
Posts: 8
Thank you for the update. Now works great without any Lua errors. Cheers

---

Last edited by Dasteman : 02-15-17 at 05:05 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » NameplateColors - "SetTargetClampingInsets" error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off