Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

C_LFGList.GetApplicantMemberInfo doesn't return actual spec id's for premade groups of 2 or more players #502

Closed NintendoLink07 closed 6 months ago

NintendoLink07 commented 7 months ago
17x FrameXML/LFGList.lua:1877: bad argument #1 to 'format' (string expected, got nil)
[string "=[C]"]: in function `format'
[string "@FrameXML/LFGList.lua"]:1877: in function <FrameXML/LFGList.lua:1851>
[string "=[C]"]: ?

Locals:
(*temporary) = "%s %s"
(*temporary) = nil
(*temporary) = "Paladin"
(*temporary) = "string expected, got nil"

With the 10.2 patch C_LFGList.GetApplicantMemberInfo now also returns the spec ID of the applicant, which is then shown in the tooltip as a formatted string. When a premade group of 2 or more players applies to your group listing and you hover over them it produces this error. The function does only return a real spec ID when a single player applies to the group, with 2 or more players it returns spec ID values like:

StFreve commented 7 months ago

Created WeakAura with temporary fix if anyone wants: Fix Error LFGList.lua:1877. It makes GetSpecNameBySpecID to return empty string instead of nil when no real specID is passed.

Meivyn commented 7 months ago

This doesn't only happen with group applications. It sometimes also happens with individual applicants. This is seemingly random, but can tell that it always happens with groups from my experience.

The 0 and 1 returned here are also a boolean according to an error while comparing them with a number. However, calling type(specID) == "number" or type(specID) == "boolean" both return false for some reason that is probably beyond my current knowledge of the Lua implementation. Only the third condition is evaluated as true in this code.

image

image

Integer overflow can also happen when calling this method.

image

NintendoLink07 commented 6 months ago

Issue seems to have been fixed with the update this morning. All applications from premades groups have correct spec id's attached to them now.