KillTrack

KillTrack

458k Downloads

Frequent Error :(

vandiel01 opened this issue ยท 13 comments

commented

9x KillTrack/KillTrack.lua:337: Usage: IsGUIDInGroup(guid[, groupType])
[string "=[C]"]: in function IsGUIDInGroup' [string "@KillTrack/KillTrack.lua"]:337: in function IsInGroup'
[string "@KillTrack/KillTrack.lua"]:228: in function ?' [string "@KillTrack/KillTrack.lua"]:116: in function OnEvent'
[string "@KillTrack/KillTrack.lua"]:737: in function <KillTrack/KillTrack.lua:737>

Locals:
(*temporary) = ""

commented

Thanks for the report, a fix was submitted in #26 and v2.31.5 has been pushed containing it. It should be available at your AddOn site of choice shortly!

commented

I'll close this now since the issue seems solved (I haven't been able to personally verify it since I can only test solo on the PTR though).

If there's still issues feel free to re-open!

commented

i thought of the same thing.. i tweaked the code to this before I saw your post

function KT:IsInGroup(unit)
  if ( not unit or unit == nil or unit == "" ) then return false end
  if unit == self.PlayerName or unit == self.PlayerGUID then return true end
  if ( unit == nil or unit == "" ) then print("DEBUG: IsInGroup - unit = '" .. tostring(unit) .. "'") end
  return IsGUIDInGroup(unit)
end

so I can catch if anything that may slip thru, so far so good, will keep ya posted (edited to add quote)

commented

it came back, only after killing or aggro'ng mobs..

15x KillTrack/KillTrack.lua:338: Usage: IsGUIDInGroup(guid[, groupType]) [string "=[C]"]: in function IsGUIDInGroup'
[string "@KillTrack/KillTrack.lua"]:338: in function IsInGroup' [string "@KillTrack/KillTrack.lua"]:228: in function ?'
[string "@KillTrack/KillTrack.lua"]:116: in function `OnEvent'
[string "@KillTrack/KillTrack.lua"]:737: in function <KillTrack/KillTrack.lua:737>

Locals:
(*temporary) = ""`

commented

If you're able, can you add a line to the IsInGroup function to get some more info?

On line 338 in KillTrack.lua, add the line print("DEBUG: IsInGroup - unit == " .. tostring(unit)) so that the function looks like this:

function KT:IsInGroup(unit)
    if not unit then return false end
    if unit == self.PlayerName or unit == self.PlayerGUID then return true end
    print("DEBUG: IsInGroup - unit == " .. tostring(unit))
    return IsGUIDInGroup(unit)
end

And the next time you see this error can you tell me what it's written to the chat?

commented

Will do that as soon I get back on, am on road atm, will keep ya posted

commented

I can't seem to be able to reproduce it when running around testing on mobs outside Orgrimmar, both if I aggro them by attacking them first, or letting them hit me first.

Which version of WoW is this on (retail/wrath/classic era) and which version of the AddOn?

commented

Retail and v2.31.6. Yeah sometimes it triggers the error, not always.

commented

I was NOT able to re-produce it until I entered Dream Emerald, then killed a world boss and Superbloom, got

1x KillTrack/KillTrack.lua:339: Usage: IsGUIDInGroup(guid[, groupType])
[string "=[C]"]: in function `IsGUIDInGroup'
[string "@KillTrack/KillTrack.lua"]:339: in function `IsInGroup'
[string "@KillTrack/KillTrack.lua"]:228: in function `?'
[string "@KillTrack/KillTrack.lua"]:116: in function `OnEvent'
[string "@KillTrack/KillTrack.lua"]:738: in function <KillTrack/KillTrack.lua:738>

Locals:
(*temporary) = ""

along with debug code (repeatedly):
image

commented

Hm, looks like it might be getting called with an empty string instead of a GUID or even nil. If so it should be easy to add a check for.

To test, you can modify the function again so it looks like this:

function KT:IsInGroup(unit)
    if not unit or unit == "" then return false end
    if unit == self.PlayerName or unit == self.PlayerGUID then return true end
    print("DEBUG: IsInGroup - unit == '" .. tostring(unit) .. "'")
    return IsGUIDInGroup(unit)
end

And try to reproduce again. (I also added some single quotes around the tostring value, so we can see if the empty string possibly contains spaces if the added check still doesn't work.)

The interesting question is why the GUIDs inside CLEU can sometimes be empty strings.

commented

so far, with the new line, i haven't gotten error as of the late. This would be good to go!

commented

Nice, thanks for testing it out! I'll see to getting the change in and pushing out a new version.

commented

@vandiel01 v2.31.7 has now been pushed and should be up on the AddOn sites shortly!