WeakAuras

WeakAuras

206M Downloads

Potential error in custom color animation function

Stanzilla opened this issue ยท 1 comments

commented

Description

Received a vague report that it can error with

Message: bad argument #5 to '?' (Usage: self:SetVertexColor(color [, a]))
Time: Thu Nov  3 00:15:02 2022
Count: 1415
Stack: bad argument #5 to '?' (Usage: self:SetVertexColor(color [, a]))
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `SetVertexColor'
[string "@Interface/AddOns/WeakAuras/RegionTypes/AuraBar.lua"]:543: in function `SetForegroundColor'
[string "@Interface/AddOns/WeakAuras/RegionTypes/AuraBar.lua"]:1152: in function `ColorAnim'
[string "@Interface/AddOns/WeakAuras/Animations.lua"]:125: in function <Interface/AddOns/WeakAuras/Animations.lua:17>
 
Locals: 

Reporter did not know which aura caused it but it could have been https://wago.io/g1BPT3_59

which does this

image

Error only happened once (during this boss, hard to repro) so low prio.

WeakAuras Version

WeakAuras 5.0.5

World of Warcraft Flavor

Retail (Default)

Tested with only WeakAuras

  • Yes
  • No

Lua Error

Message: bad argument #5 to '?' (Usage: self:SetVertexColor(color [, a]))
Time: Thu Nov 3 00:15:02 2022
Count: 1415
Stack: bad argument #5 to '?' (Usage: self:SetVertexColor(color [, a]))
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function SetVertexColor' [string "@Interface/AddOns/WeakAuras/RegionTypes/AuraBar.lua"]:543: in function SetForegroundColor'
[string "@Interface/AddOns/WeakAuras/RegionTypes/AuraBar.lua"]:1152: in function `ColorAnim'
[string "@Interface/AddOns/WeakAuras/Animations.lua"]:125: in function <Interface/AddOns/WeakAuras/Animations.lua:17>

Locals:

Reproduction Steps

  1. Use the aura and play Xymox Mythic

Last Good Version

N/A

Screenshots

No response

Export String

https://wago.io/g1BPT3_59

commented

255 is out of range, the function should return values between 0 and 1. so that has never worked?

I don't think we want to add checking for that everywhere, though if it turns out to be a more common error, I'll figure out how to improve our error handling there.