itemcount possible race condition
zeptognome opened this issue ยท 2 comments
Addon Version
v0.1.61
World of Warcraft Version
Retail
Describe the bug
1x BetterBags/views/views.lua:331: attempt to compare two nil values
[string "@BetterBags/views/views.lua"]:331: in function ChangeButton' [string "@BetterBags/views/gridview.lua"]:173: in function
Render'
[string "@BetterBags/frames/bag.lua"]:205: in function Draw' [string "@BetterBags/core/init.lua"]:239: in function
cb'
[string "@BetterBags/core/events.lua"]:50: in function <BetterBags/core/events.lua:45>
[string "=[C]"]: ?
[string "@AllTheThings/lib/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ings/lib/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AllTheThings/lib/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:186: in function <BetterBags/core/events.lua:185>
Locals:
Skipped (In Encounter)
Steps to reproduce
also happened outside of combat. see discord message
Appears that an empty item is being passed into ChangeButton
Another example. Happened when opening the bags after a /reloadui
1x BetterBags/views/views.lua:331: attempt to compare two nil values
[string "@BetterBags/views/views.lua"]:331: in function ChangeButton' [string "@BetterBags/views/gridview.lua"]:173: in function
Render'
[string "@BetterBags/frames/bag.lua"]:205: in function Draw' [string "@BetterBags/core/init.lua"]:239: in function
cb'
[string "@BetterBags/core/events.lua"]:50: in function <BetterBags/core/events.lua:45>
[string "=[C]"]: ?
[string "@AllTheThings/lib/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...ings/lib/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@AllTheThings/lib/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `SendMessage'
[string "@BetterBags/core/events.lua"]:186: in function <BetterBags/core/events.lua:185>
Locals:
self =
bagview = 2
itemCount = 120
itemsByBagAndSlot =
}
sections =
}
dirtySections =
}
itemFrames =
}
stacks =
}
slotToSection =
}
Render = defined @BetterBags/views/gridview.lua:136
WipeHandler = defined @BetterBags/views/gridview.lua:35
kind = 0
content =
}
deferredItems =
}
}
item =
slotkey = "0_1"
bagid = 0
basic = false
isItemEmpty = true
kind = 0
itemInfo =
}
slotid = 1
}
stack = nil
opts =
mergeUnstackable = false
dontMergeTransmog = true
unmergeAtShop = true
dontMergePartial = true
mergeStacks = false
}
(*temporary) = nil
(*temporary) = nil
(*temporary) =
mergeUnstackable = false
dontMergeTransmog = true
unmergeAtShop = true
dontMergePartial = true
mergeStacks = false
}
(*temporary) = "attempt to compare two nil values"
database =
SetDefaultModuleLibraries = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:363
GetEphemeralItemCategory = defined @BetterBags/core/database.lua:276
ItemCategoryExists = defined @BetterBags/core/database.lua:282
SetItemLevelEnabled = defined @BetterBags/core/database.lua:156
EnableModule = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:328
modules =
}
GetItemSortType = defined @BetterBags/core/database.lua:196
IterateEmbeds = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:438
GetPreviousView = defined @BetterBags/core/database.lua:74
GetNewItemTime = defined @BetterBags/core/database.lua:349
SetBagCompaction = defined @BetterBags/core/database.lua:148
SetMergeUnstackable = defined @BetterBags/core/database.lua:381
SetItemLock = defined @BetterBags/core/database.lua:333
SetItemLevelColorEnabled = defined @BetterBags/core/database.lua:160
SetDefaultModulePrototype = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:405
SetNewItemTime = defined @BetterBags/core/database.lua:344
defaultModuleState = true
IsEnabled = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:447
DisableModule = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:346
GetBagView = defined @BetterBags/core/database.lua:32
SetUnmergeAtShop = defined @BetterBags/core/database.lua:385
data =
}
SetFirstTimeMenu = defined @BetterBags/core/database.lua:168
CreateCategory = defined @BetterBags/core/database.lua:293
GetItemCategoryByItemID = defined @BetterBags/core/database.lua:288
GetBagPosition = defined @BetterBags/core/database.lua:26
SetShowNewItemFlash = defined @BetterBags/core/database.lua:56
enabledState = true
GetStackingOptions = defined @BetterBags/core/database.lua:373
SetCategoryFilter = defined @BetterBags/core/database.lua:82
IterateModules = defined @AutoLooter/Libs/AceAddon-3.0/AceAddon-3.0.lua:433
GetFirstTimeMenu = defined @BetterBags/core/database.lua:164
GetShowNewItemFlash = defined @BetterBags/core/database.lua:50
SetPreviousView = defined @BetterBags/core/database.lua:68
SetShowFullSectionNames = defined @BetterBags/core/database.lua:413
GetCategoryFilter = defined @BetterBags/core/database.lua:78