ascott18 / TellMeWhen

TellMeWhen is a combat tracking AddOn for World of Warcraft Retail and Classic
https://wow.curseforge.com/projects/tellmewhen
GNU General Public License v3.0
86 stars 11 forks source link

LibDogTag-Unit error when turning in quests. #2192

Closed UppyDan closed 2 months ago

UppyDan commented 3 months ago

WoW Version

Retail

TellMeWhen Version

11.0.4

Describe the bug

1x ...ib/LibDogTag-Unit-3.0/Categories/TooltipScanning.lua:204: ...hen/Lib/LibDogTag-Unit-3.0/Categories/Reputation.lua:31: attempt to index local 'data' (a nil value) [string "=[C]"]: in function (for generator)' [string "@TellMeWhen/Lib/LibDogTag-Unit-3.0/Categories/TooltipScanning.lua"]:204: in functionfunc' [string "@TellMeWhen/Lib/LibDogTag-3.0-20240726033914/Events.lua"]:301: in function <...rfaceTellMeWhen/Lib/LibDogTag-3.0/Events.lua:294>

Locals: =

This bug happens once in a while after turning in "leveling" quests (quests I am repeating on an alt at the moment). Apparently GetFactionDataByIndex(i) is returning nil. Not sure why. It looks like the code should work fine.

Export Strings

n/a
UppyDan commented 3 months ago

ADDITIONAL INFO: On my character seeing this bug, I did /dump C_Reputation.GetNumFactions() and it returned 26. I ran a loop using the WowLua addon and each index returned data except for index 8, 9, and 10 which were nil. Furthermore, I extended the loop up to 50 and it continued to return data beyond the number of factions GetNumFactions() claimed existed. No other index return nil. Only 8, 9, and 10 for some reason.


print("START")
local n = C_Reputation.GetNumFactions()
print("# Factions:", n)
for i = 1, n+50 do
   local data = C_Reputation.GetFactionDataByIndex(i)
   print(i, data)
end
ascott18 commented 3 months ago

https://github.com/parnic/LibDogTag-Unit-3.0/

ascott18 commented 2 months ago

https://github.com/parnic/LibDogTag-Unit-3.0/commit/fc9ba7ac270b2dcfc5c5ba75e211d88f163c714a