Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent Error :( #27

Closed
vandiel01 opened this issue Nov 14, 2023 · 13 comments · Fixed by #26
Closed

Frequent Error :( #27

vandiel01 opened this issue Nov 14, 2023 · 13 comments · Fixed by #26
Labels

Comments

@vandiel01
Copy link

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) = ""

@vandiel01 vandiel01 added the bug label Nov 14, 2023
@Sharparam Sharparam linked a pull request Nov 14, 2023 that will close this issue
@Sharparam
Copy link
Member

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!

@Sharparam
Copy link
Member

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!

@vandiel01
Copy link
Author

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) = ""`

@Sharparam
Copy link
Member

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?

@vandiel01
Copy link
Author

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

@Sharparam
Copy link
Member

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?

@Sharparam Sharparam reopened this Dec 3, 2023
@vandiel01
Copy link
Author

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

@vandiel01
Copy link
Author

vandiel01 commented Dec 6, 2023

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

@Sharparam
Copy link
Member

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.

@vandiel01
Copy link
Author

vandiel01 commented Dec 6, 2023

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)

@vandiel01
Copy link
Author

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

@Sharparam
Copy link
Member

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

@Sharparam
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants