Bug: Frames.lua:1136: attempt to index field 'player'
iam3yal opened this issue · 7 comments
I've downloaded the addon straight from curse (version 0.1.12) and I'm getting the following error and it seems like it happens only on one of my characters. I'm looking into it.
Message: ...ace/AddOns/PvpAssistant/Modules/MainFrame/Frames.lua:1136: attempt to index field 'player' (a nil value)
Time: Tue Mar 26 22:42:24 2024
Count: 1
Stack: ...ace/AddOns/PvpAssistant/Modules/MainFrame/Frames.lua:1136: attempt to index field 'player' (a nil value)
[string "@Interface/AddOns/PvpAssistant/Modules/MainFrame/Frames.lua"]:1136: in function `filterFunc'
[string "@Interface/AddOns/PvpAssistant/Libs/GUTIL/GUTIL.lua"]:223: in function `Filter'
[string "@Interface/AddOns/PvpAssistant/Modules/MainFrame/Frames.lua"]:1134: in function `UpdateMatchHistory'
[string "@Interface/AddOns/PvpAssistant/Main/PvPAssistant.lua"]:134: in function `?'
[string "@Interface/AddOns/PvpAssistant/Libs/GUTIL/GUTIL.lua"]:232: in function <Interface/AddOns/PvpAssistant/Libs/GUTIL/GUTIL.lua:232>
Locals: matchHistory = <table> {
mapInfo = <table> {
}
win = true
duration = 0
pvpMode = false
season = 36
isBattleground = false
isArena = false
isSoloShuffle = false
isRated = false
playerTeam = <table> {
}
timestamp = 1711488180000
pvpMatchState = 0
enemyTeam = <table> {
}
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'player' (a nil value)"
selectedCharacterUID = "Seed-BronzeDragonflight"
pvpModeFilter = nil
might have something to do with my recent added migration for match history or there is still outdated matchhistory in your saved variables
there is a slash command to wipe it
hmm i think /pa history clear
@derfloh205 Well, I forgot to mention but I didn't have the addon before so I didn't have any history, it was a fresh install with fresh SV but I'll try to use the command.
Yes this fixed the issue but I I feel like the problem still exists.
Here is the SV:
PvPAssistantDB = {
["matchHistory"] = {
["data"] = {
["Seed-BronzeDragonflight"] = {
},
},
["version"] = 6,
["tempShuffleData"] = {
},
},
["characterData"] = {
["version"] = 1,
["data"] = {
["Móòse-Kazzak"] = {
["class"] = "DRUID",
["name"] = "Móòse",
["realm"] = "Kazzak",
},
["Seed-BronzeDragonflight"] = {
["class"] = "DRUID",
["name"] = "Seed",
["realm"] = "BronzeDragonflight",
},
["Divina-BronzeDragonflight"] = {
["class"] = "PALADIN",
["name"] = "Divina",
["realm"] = "BronzeDragonflight",
},
["Guerrera-BronzeDragonflight"] = {
["class"] = "WARRIOR",
["name"] = "Guerrera",
["realm"] = "BronzeDragonflight",
},
["Lua-TheVentureCo"] = {
["class"] = "DRUID",
["name"] = "Lua",
["realm"] = "TheVentureCo",
},
},
},
["debugData"] = {
["version"] = 1,
["data"] = {
{
["GetTeamInfo_0"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["ratingNew"] = 0,
["size"] = 0,
},
["GetNumArenaOpponentSpecs"] = 0,
["GetBattlefieldTeamInfo_1"] = {
"", -- [1]
},
["GetSeasonBestInfo"] = {
312, -- [1]
},
["CanPlayerUseRatedPVPUI"] = {
true, -- [1]
"", -- [2]
},
["CanDisplayHonorableKills"] = true,
["IsRatedMap"] = false,
["GetCustomVictoryStatID"] = 0,
["GetScoreInfoByPlayerGuid_Player"] = "nil",
["CanDisplayDamage"] = true,
["CanDisplayHealing"] = true,
["GetNumArenaOpponents"] = 0,
["GetGlobalPvpScalingInfoForSpecID"] = "nil",
["IsSoloShuffle"] = false,
["GetMatchPVPStatColumns"] = {
},
["CanDisplayKillingBlows"] = true,
["IsActiveMatchRegistered"] = false,
["GetBattlefieldTeamInfo_0"] = {
"", -- [1]
},
["GetActiveMatchState"] = 0,
["GetPVPSeasonRewardAchievementID"] = 19140,
["GetBattlefieldArenaFaction"] = 0,
["GetTeamInfo_1"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["ratingNew"] = 0,
["size"] = 0,
},
["GetPVPActiveMatchPersonalRatedInfo"] = "nil",
["DoesMatchOutcomeAffectRating"] = false,
["IsMatchFactional"] = true,
["IsRatedArena"] = false,
["GetActiveMatchBracket"] = -1,
["CanDisplayDeaths"] = true,
["GetActiveMatchDuration"] = 0,
["GetActiveMatchWinner"] = 0,
["IsPVPMap"] = false,
["IsMatchConsideredArena"] = false,
}, -- [1]
{
["GetTeamInfo_0"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["GetSeasonBestInfo"] = {
312, -- [1]
},
["GetBattlefieldTeamInfo_1"] = {
"", -- [1]
},
["IsPVPMap"] = false,
["CanPlayerUseRatedPVPUI"] = {
true, -- [1]
"", -- [2]
},
["GetNumArenaOpponentSpecs"] = 0,
["IsRatedMap"] = false,
["GetCustomVictoryStatID"] = 0,
["GetScoreInfoByPlayerGuid_Player"] = "nil",
["CanDisplayDamage"] = true,
["CanDisplayHealing"] = true,
["GetNumArenaOpponents"] = 0,
["GetGlobalPvpScalingInfoForSpecID"] = "nil",
["IsSoloShuffle"] = false,
["GetActiveMatchDuration"] = 0,
["CanDisplayKillingBlows"] = true,
["CanDisplayDeaths"] = true,
["GetBattlefieldTeamInfo_0"] = {
"", -- [1]
},
["GetActiveMatchBracket"] = -1,
["GetPVPSeasonRewardAchievementID"] = 19140,
["GetBattlefieldArenaFaction"] = 0,
["IsRatedArena"] = false,
["GetPVPActiveMatchPersonalRatedInfo"] = "nil",
["DoesMatchOutcomeAffectRating"] = false,
["IsMatchFactional"] = true,
["GetActiveMatchState"] = 0,
["GetTeamInfo_1"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["IsActiveMatchRegistered"] = false,
["GetMatchPVPStatColumns"] = {
},
["GetActiveMatchWinner"] = 0,
["CanDisplayHonorableKills"] = true,
["IsMatchConsideredArena"] = false,
}, -- [2]
{
["GetTeamInfo_0"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["GetSeasonBestInfo"] = {
312, -- [1]
},
["GetBattlefieldTeamInfo_1"] = {
"", -- [1]
},
["IsPVPMap"] = false,
["CanPlayerUseRatedPVPUI"] = {
true, -- [1]
"", -- [2]
},
["GetNumArenaOpponentSpecs"] = 0,
["IsRatedMap"] = false,
["GetCustomVictoryStatID"] = 0,
["GetScoreInfoByPlayerGuid_Player"] = "nil",
["CanDisplayDamage"] = true,
["CanDisplayHealing"] = true,
["GetNumArenaOpponents"] = 0,
["GetGlobalPvpScalingInfoForSpecID"] = "nil",
["IsSoloShuffle"] = false,
["GetActiveMatchDuration"] = 0,
["CanDisplayKillingBlows"] = true,
["CanDisplayDeaths"] = true,
["GetBattlefieldTeamInfo_0"] = {
"", -- [1]
},
["GetActiveMatchBracket"] = -1,
["GetPVPSeasonRewardAchievementID"] = 19140,
["GetBattlefieldArenaFaction"] = 0,
["IsRatedArena"] = false,
["GetPVPActiveMatchPersonalRatedInfo"] = "nil",
["DoesMatchOutcomeAffectRating"] = false,
["IsMatchFactional"] = true,
["GetActiveMatchState"] = 0,
["GetTeamInfo_1"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["IsActiveMatchRegistered"] = false,
["GetMatchPVPStatColumns"] = {
},
["GetActiveMatchWinner"] = 0,
["CanDisplayHonorableKills"] = true,
["IsMatchConsideredArena"] = false,
}, -- [3]
{
["GetTeamInfo_0"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["GetSeasonBestInfo"] = {
312, -- [1]
},
["GetBattlefieldTeamInfo_1"] = {
"", -- [1]
},
["IsPVPMap"] = false,
["CanPlayerUseRatedPVPUI"] = {
true, -- [1]
"", -- [2]
},
["GetNumArenaOpponentSpecs"] = 0,
["IsRatedMap"] = false,
["GetCustomVictoryStatID"] = 0,
["GetScoreInfoByPlayerGuid_Player"] = "nil",
["CanDisplayDamage"] = true,
["CanDisplayHealing"] = true,
["GetNumArenaOpponents"] = 0,
["GetGlobalPvpScalingInfoForSpecID"] = "nil",
["IsSoloShuffle"] = false,
["GetActiveMatchDuration"] = 0,
["CanDisplayKillingBlows"] = true,
["CanDisplayDeaths"] = true,
["GetBattlefieldTeamInfo_0"] = {
"", -- [1]
},
["GetActiveMatchBracket"] = -1,
["GetPVPSeasonRewardAchievementID"] = 19140,
["GetBattlefieldArenaFaction"] = 0,
["IsRatedArena"] = false,
["GetPVPActiveMatchPersonalRatedInfo"] = "nil",
["DoesMatchOutcomeAffectRating"] = false,
["IsMatchFactional"] = true,
["GetActiveMatchState"] = 0,
["GetTeamInfo_1"] = {
["ratingMMR"] = 0,
["name"] = "",
["rating"] = 0,
["size"] = 0,
["ratingNew"] = 0,
},
["IsActiveMatchRegistered"] = false,
["GetMatchPVPStatColumns"] = {
},
["GetActiveMatchWinner"] = 0,
["CanDisplayHonorableKills"] = true,
["IsMatchConsideredArena"] = false,
}, -- [4]
},
},
["playerData"] = {
["version"] = 1,
["data"] = {
["Vaya-Nordrassil"] = {
["SOLO_SHUFFLE"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "SOLO_SHUFFLE",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["TWOS"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "TWOS",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["THREES"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "THREES",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["BATTLEGROUND"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "BATTLEGROUND",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
},
["Seed-BronzeDragonflight"] = {
["SOLO_SHUFFLE"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "SOLO_SHUFFLE",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["THREES"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "THREES",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["BATTLEGROUND"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "BATTLEGROUND",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["TWOS"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "TWOS",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
},
["Bridji-Magtheridon"] = {
["SOLO_SHUFFLE"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "SOLO_SHUFFLE",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["THREES"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "THREES",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["BATTLEGROUND"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "BATTLEGROUND",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
["TWOS"] = {
["seasonPlayed"] = 0,
["pvpMode"] = "TWOS",
["weeklyPlayed"] = 0,
["rating"] = 0,
["seasonWon"] = 0,
["weeklyWon"] = 0,
},
},
},
},
["tooltipOptions"] = {
["version"] = 1,
["data"] = {
["spellTooltip"] = {
["enabled"] = true,
["TYPE"] = true,
["PVP_SEVERITY"] = true,
["ADDITIONAL_DATA"] = true,
["SUBTYPE"] = true,
["PVP_DURATION"] = true,
},
["playerTooltip"] = {
["enabled"] = true,
["TWOS"] = true,
["BATTLEGROUND"] = true,
["THREES"] = true,
["SOLO_SHUFFLE"] = true,
},
},
},
}
PvPAssistantGGUIConfig = {
}
PvPAssistantOptions = {
["enableDebug"] = false,
["arenaGuideEnable"] = true,
}
PvPAssistantLibIconDB = {
}
@derfloh205 No, fresh install and the first time I logged into the game that's what I got and it persisted between game sessions and reloads until I did /pa history clear
.
Weirdly enough it happened only on the first character that I was firstly logged into.
Are you very sure this was a fresh install?
The error seems to have occured in the filter function for the match histories which is executed before any histories are added to the list
this function is actually not even called when you dont have any histories saved
which should be the case when you have a fresh install and thus no saved matches for your character
I tried to reproduce this:
1.) Go into the WTF Folder and delete my PvPAssistant.lua file while logged out
2.) Log in to test the initial load of a fresh install
3.) Everything works as expected, no errors
Are you very sure this was a fresh install?
Extremely sure. :)
Actually nope. I think I know what happened, I'm gonna check now.
So what happened is iirc I cloned the source and logged to one of my characters but then there was an error about missing dependencies so I downloaded the addon from Curse and then I logged I got this error but I tried it again and haven't got any errors so who knows? 😄