lua error spam, window wont respond
ssateneth opened this issue · 13 comments
Describe the bug
lua error spam, window wont respond
To Reproduce
Steps to reproduce the behavior:
idk, it happens randomly when the window is opemn
Expected behavior
dont have error, addon works
Desktop (please complete the following information):
LFGBulletinBoard_classic_v_3_22
Additional context
Add any other context about the problem here.
Message: Interface/AddOns/LFGBulletinBoard/RequestList.lua:26: attempt to compare nil with number Time: Sun Apr 21 18:18:35 2024 Count: 3858 Stack: Interface/AddOns/LFGBulletinBoard/RequestList.lua:26: attempt to compare nil with number [string "=(tail call)"]: ? [string "=[C]"]: ? [string "@Interface/AddOns/LFGBulletinBoard/RequestList.lua"]:26: in function <Interface/AddOns/LFGBulletinBoard/RequestList.lua:23> [string "=[C]"]: in function
sort'
[string "@Interface/AddOns/LFGBulletinBoard/RequestList.lua"]:390: in function UpdateList' [string "@Interface/AddOns/LFGBulletinBoard/GroupBulletinBoard.lua"]:775: in function
Entry'
[string "@Interface/AddOns/LFGBulletinBoard/LibGPIToolBox.lua"]:124: in function <Interface/AddOns/LFGBulletinBoard/LibGPIToolBox.lua:122>
Locals: (*temporary) = 0.007000
(*temporary) = defined =[C]:-1
`
@juemrami Good catch on the having filters actually be enabled, my bandaid only covered if they are disabled case.
I think your suggestion might make it harder to maintain. The removal will need to happen before any piece of code actually uses GBB.dungeonTagsLoc
otherwise we will run into similar error down the line. Future uses of GBB.dungeonTagsLoc
without knowing about the behavior are bound to run into this problem. Then needing to maintain a list of which ones to remove. Removal is more error prone then addition, it's what causes these issues typically (including this one). It's kind of hacky
I'm thinking of either separating the tags per expansion, depending on the version add those to GBB.dungeonTagsLoc
. Another way could be to do a guard in GBB.CreateTagListLOC(loc)
by checking that it exists in GBB.dungeonSort
. What are your thoughts?
Can you capture the full stack trace? You have to click inside the error window then Ctrl+a follow by Ctrl+c.
I know what the issue is kind of due to but I have not been able to reproduce it at all no matter what I try. I think to hit the issue the file that the add-on uses for storage has to be in a particular state but not sure what that state is.
Can you attach the LFGBulletinBoard.lua
and LFGBulletinBoard.lua.bak
files (just contains the local "database" storage of the add-on). It's found in the WTF folder -> Account -> <Account name/id> -> Server -> Character -> <Character_name> -> SavedVariables. This file does not contain any personal information, account, or any wow information not even character name. Just contains bunch of settings the add-on stores like ["FilterDungeonZG"] = false,
what i copy pasted was the entire error. is there some addon that might be deleting the rest of the error that contains variables?
Was looking into this this morning after @Vysci mentioned it to me, i couldn't find any reproduction steps unfortunately, but using the screen shot and looking at the source. As the error suggest sort function requestSort_TOP_nTOTAL
is trying to do a number < nil
operation (or nil < number
).
I threw in a couple of asserts, ie
assert(GBB.dungeonSort[a.dungeon], "dungeon dne in sort list", a.dungeon, GBB.dungeonSort)
in the function to debug and just came across this error
115x LFGBulletinBoard/RequestList.lua:27: dungeon dne in in list
[string "=[C]"]: in function `assert'
[string "@LFGBulletinBoard/RequestList.lua"]:27: in function <LFGBulletinBoard/RequestList.lua:23>
[string "=[C]"]: in function `sort'
[string "@LFGBulletinBoard/RequestList.lua"]:393: in function `UpdateList'
[string "@LFGBulletinBoard/GroupBulletinBoard.lua"]:775: in function `Entry'
[string "@LFGBulletinBoard/LibGPIToolBox.lua"]:124: in function <LFGBulletinBoard/LibGPIToolBox.lua:122>
Locals:
(*temporary) = nil
(*temporary) = "dungeon dne in in list"
(*temporary) = "SOTA"
(*temporary) = <table> {
1 = "RFC"
2 = "WC"
3 = "DM"
4 = "SFK"
5 = "STK"
6 = "BFD"
7 = "GNO"
8 = "RFK"
9 = "SMG"
10 = "SML"
11 = "SMA"
12 = "SMC"
13 = "RFD"
14 = "ULD"
15 = "ZF"
16 = "MAR"
17 = "ST"
18 = "BRD"
19 = "LBRS"
20 = "DME"
21 = "DMN"
22 = "DMW"
23 = "STR"
24 = "SCH"
25 = "UBRS"
26 = "MC"
27 = "ZG"
28 = "AQ20"
29 = "BWL"
30 = "AQ40"
31 = "NAX"
32 = "RAMPS"
33 = "BF"
34 = "SH"
35 = "MAG"
36 = "SP"
37 = "UB"
38 = "SV"
39 = "SSC"
40 = "MT"
41 = "CRYPTS"
42 = "SETH"
43 = "SL"
44 = "OHB"
45 = "BM"
46 = "MECH"
47 = "BOT"
48 = "ARC"
49 = "EYE"
50 = "MGT"
51 = "KARA"
52 = "GL"
53 = "ZA"
54 = "HYJAL"
55 = "BT"
56 = "SWP"
57 = "UK"
58 = "NEX"
59 = "AZN"
60 = "ANK"
61 = "DTK"
62 = "VH"
63 = "GD"
64 = "HOS"
65 = "HOL"
66 = "COS"
67 = "OCC"
68 = "UP"
69 = "FOS"
70 = "POS"
71 = "HOR"
72 = "CHAMP"
73 = "OS"
74 = "VOA"
75 = "EOE"
76 = "ULDAR"
77 = "TOTC"
78 = "RS"
79 = "ICC"
80 = "ONY"
81 = "NAXX"
82 = "WSG"
83 = "AB"
84 = "AV"
85 = "BLOOD"
86 = "MISC"
87 = "TRADE"
88 = "TRAVEL"
89 = "INCUR"
90 = "HOLLOW"
91 = "BREW"
92 = "DEBUG"
93 = "BAD"
94 = "NIL"
OS = 73
RS = 78
SCH = 24
RFC = 1
MC = 26
ICC = 79
SFK = 4
FOS = 69
WC = 2
INCUR = 89
CHAMP = 72
KARA = 51
LBRS = 19
COS = 66
RFD = 13
SP = 36
POS = 70
BREW = 91
UP = 68
ST = 17
SMA = 11
BAD = 93
MISC = 86
VH = 62
WSG = 82
SWP = 56
DME = 20
DEBUG = 92
SL = 43
ZA = 53
BRD = 18
DEADMINES = 99
SH = 34
NEX = 58
SMG = 9
SMC = 12
MT = 40
DM2 = 19.500000
OCC = 67
MGT = 50
SV = 38
DM = 3
AQ40 = 30
OHB = 44
DMN = 21
BOT = 47
ARC = 48
NAXX = 81
ZG = 27
HOL = 65
GL = 52
AQ20 = 28
SM2 = 10.500000
BFD = 6
EOE = 75
ONY = 80
HOLLOW = 90
BWL = 29
TOTC = 77
EYE = 49
RAMPS = 32
UK = 57
BM = 45
STK = 5
NAX = 31
MAR = 16
AB = 83
MAG = 35
ULD = 14
MECH = 46
ANK = 60
STR = 23
BF = 33
TRADE = 87
GNO = 7
DTK = 61
AZN = 59
CRYPTS = 41
TRAVEL = 88
VOA = 74
GD = 63
HOS = 64
SML = 10
AV = 84
RFK = 8
NIL = 94
UB = 37
HOR = 71
ULDAR = 76
UBRS = 25
DMW = 22
HYJAL = 54
BT = 55
SSC = 39
SETH = 42
BLOOD = 85
ZF = 15
}
happened on latest commit (b2a8e11)
yeah if I type in LFG "sota", i instantly get thousands of lua errors from your addon
Looks like function is trying to sort Strand of The Ancients, but its not in GBB.dungeonSort
. Might be worth checking the function GBB.GetDungeonSort
in Dungeons.lua:778
seems to be an issue for any tags associated with dungeons that are in GBB.PvpNames
but not GBB.PvpSodNames
, namely "EOTS", "WG", "SOTA", "ARENA"
Reproduction Steps:
- Open Addon
- Type a message with a tag associated any of the mentioned dungeons. ("lf1m arena 3s", "LFG premade eots", "lfm wintergrasp", etc.)
Yea the big issue here seems to be that there is a miss-match between what is a considered a "valid" dungeon for the game version in Dungeon.lua
and locale specific the entries in GBB.dungeonTagsLoc
tables.
You can exclude a dungeon from Dungeons.lua
but Tags.lua
has no clue about this.
As a result function GBB.GetDungeons
will look through GBB.taglist
and find an associated entry for say "lfm strand" as SOTA
.
Id say that GetDungeons
should be made to only return dungeons valid for the game version being ran on.
This is example of the saved data in the WTF folder
["FilterDungeonEOTS"] = false,
["FilterDungeonARENA"] = false,
["FilterDungeonWG"] = false,
Because it exists we still filter for them but GBB.GetDungeons
doesn't return those as they no longer exists in SoD per my recent changes.
@juemrami Well I totally missed this conversation, could have saved myself some time debugging as yea figured it out and pushed out not a happy with fix.
Get dungeons does return per version but what happened was that I did add the per version part for PvP, this resulted in some of the PvP tags not being in the dungeon list but the filter for them is still saved locally, so gets in this weird state where matches the filter even though dungeon doesn’t exist. This is why I partially introduced the ability to force reset people’s configs on update but there was some backlash when I used it so I opted to avoid using it unless mandatory.
For the fix I just simply added a check when sorting to see if it exists in the table if not then this is the NIL dungeon. It kind of just sweeps the issue and future issues under the rug hence not so happy with it and trying to avoid resetting people’s config
I can still reproduce this error on any characters with existing Saved Vars that have those filters set to true
.
It errors out in a different spot than where you put the bandaid fix.
1657x LFGBulletinBoard/RequestList.lua:482: attempt to perform arithmetic on field '?' (a nil value)
[string "@LFGBulletinBoard/RequestList.lua"]:482: in function `UpdateList'
[string "@LFGBulletinBoard/GroupBulletinBoard.lua"]:775: in function `Entry'
[string "@LFGBulletinBoard/LibGPIToolBox.lua"]:124: in function <LFGBulletinBoard/LibGPIToolBox.lua:122>
Locals:
AnchorTop = "GroupBulletinBoardFrame_ScrollChildFrame"
AnchorRight = "GroupBulletinBoardFrame_ScrollChildFrame"
yy = 276.222214
count = 13
doCompact = 1
cEntrys = 8
w = 1012
itemHight = 11.851852
req = <table> {
IsFriend = false
last = 1714018595.295000
class = "HUNTER"
IsGuildMember = true
IsPastPlayer = false
name = "Bigsxy-CrusaderStrike"
message = "LF summon strand"
start = 1714018595.295000
IsHeroic = false
dungeon = "SOTA"
IsRaid = true
}
(*temporary) = nil
(*temporary) = "SOTA"
(*temporary) = true
(*temporary) = false
(*temporary) = true
(*temporary) = "attempt to perform arithmetic on field '?' (a nil value)"
I have a suggest to just remove the tags for the non-vanilla dungeons at some point shortly after GBB.dungeonTagsLoc
is populated in Tags.lua