Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem opening bags after pulling in latest changes #29

Closed
Roelio81 opened this issue Sep 12, 2023 · 2 comments
Closed

Problem opening bags after pulling in latest changes #29

Roelio81 opened this issue Sep 12, 2023 · 2 comments

Comments

@Roelio81
Copy link

Which software were you running?

  • Addon version name: BagBrother
  • Client used: Vanilla 1.14.4.51311

Have you read the changelog?
Yes

Please describe the bug.
When logging in, I get the following LUA error popup (I have enabled them):

Please describe how to reproduce it.
After logging in, I can no longer open my bags.
It seems linked to the error log below.
Probably introduced by following commit:
a72c274
The error seems to be linked to Addon.CurrencyLimit

Any Screenshots?
If applicable, please add screenshots to help explain your problem.

Error Logs are Important!
Message: ...nterface/AddOns/BagBrother/core/features/caching.lua:113: 'for' limit must be a number
Time: Tue Sep 12 19:05:55 2023
Count: 1
Stack: ...nterface/AddOns/BagBrother/core/features/caching.lua:113: 'for' limit must be a number
[string "@Interface/AddOns/BagBrother/core/features/caching.lua"]:113: in function CURRENCY_TRACKED_CHANGED' [string "@Interface/AddOns/BagBrother/core/features/caching.lua"]:80: in function ?'
[string "@Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua"]:20: in function <...dOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:18>
[string "@Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua"]:56: in function <...dOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:53>
[string "=[C]"]: ?
[string "@Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:19: in function <...las/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:54: in function Fire' [string "@Interface/AddOns/BagBrother/libs/AceEvent-3.0/AceEvent-3.0.lua"]:120: in function <...AddOns/BagBrother/libs/AceEvent-3.0/AceEvent-3.0.lua:119> [string "=[C]"]: in function LoadAddOn'
[string "@Interface_Vanilla/FrameXML/UIParent.lua"]:388: in function UIParentLoadAddOn' [string "@Interface_Vanilla/FrameXML/UIParent.lua"]:459: in function TimeManager_LoadUI'
[string "@Interface_Vanilla/FrameXML/UIParent.lua"]:717: in function <Interface_Vanilla/FrameXML/UIParent.lua:686>

Locals: self =

{
SendSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
ParseItem = defined @Interface/AddOns/BagBrother/core/features/caching.lua:215
RegisterMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
isBankFrameOpen = false
player =
{
}
SaveBag = defined @Interface/AddOns/BagBrother/core/features/caching.lua:186
PLAYER_EQUIPMENT_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:94
BANK_OPEN = defined @Interface/AddOns/BagBrother/core/features/caching.lua:124
SaveEquip = defined @Interface/AddOns/BagBrother/core/features/caching.lua:211
SendMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
GUILDBANKBAGSLOTS_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:160
UnregisterAllEvents = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
UnregisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
VAULT_CLOSE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:147
PLAYER_MONEY = defined @Interface/AddOns/BagBrother/core/features/caching.lua:102
BANK_CLOSE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:128
RegisterEvent = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
CURRENCY_TRACKED_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:110
NewModule = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
PLAYER_LEVEL_UP = defined @Interface/AddOns/BagBrother/core/features/caching.lua:98
OnEnable = defined @Interface/AddOns/BagBrother/core/features/caching.lua:20
BAG_UPDATE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:88
RegisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
CURRENCY_DISPLAY_UPDATE = defined @Interface/AddOns/B

Message: ...nterface/AddOns/BagBrother/core/features/caching.lua:107: attempt to compare number with nil
Time: Tue Sep 12 19:05:56 2023
Count: 1
Stack: ...nterface/AddOns/BagBrother/core/features/caching.lua:107: attempt to compare number with nil
[string "@Interface/AddOns/BagBrother/core/features/caching.lua"]:107: in function ?' [string "@Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:109: in function <...las/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109> [string "=[C]"]: ? [string "@Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:19: in function <...las/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15> [string "@Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:54: in function Fire'
[string "@Interface/AddOns/BagBrother/libs/AceEvent-3.0/AceEvent-3.0.lua"]:120: in function <...AddOns/BagBrother/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals: self =

{
SendSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:82
ParseItem = defined @Interface/AddOns/BagBrother/core/features/caching.lua:215
RegisterMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
isBankFrameOpen = false
player =
{
}
SaveBag = defined @Interface/AddOns/BagBrother/core/features/caching.lua:186
PLAYER_EQUIPMENT_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:94
BANK_OPEN = defined @Interface/AddOns/BagBrother/core/features/caching.lua:124
SaveEquip = defined @Interface/AddOns/BagBrother/core/features/caching.lua:211
SendMessage = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
GUILDBANKBAGSLOTS_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:160
UnregisterAllEvents = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
UnregisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:78
VAULT_CLOSE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:147
PLAYER_MONEY = defined @Interface/AddOns/BagBrother/core/features/caching.lua:102
BANK_CLOSE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:128
RegisterEvent = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
CURRENCY_TRACKED_CHANGED = defined @Interface/AddOns/BagBrother/core/features/caching.lua:110
NewModule = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:68
PLAYER_LEVEL_UP = defined @Interface/AddOns/BagBrother/core/features/caching.lua:98
OnEnable = defined @Interface/AddOns/BagBrother/core/features/caching.lua:20
BAG_UPDATE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:88
RegisterSignal = defined @Interface/AddOns/BagBrother/libs/WildAddon-1.0/WildAddon-1.0.lua:74
CURRENCY_DISPLAY_UPDATE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:106
GUILD_ROSTER_UPDATE = defined @Interface/AddOns/BagBrother/core/features/caching.lua:156
UnregisterEvent = defined @Interface/AddOns/Atlas/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
Tag = "BAGNON_"
}
_ = "CURRENCY_DISPLAY_UPDATE"
id = nil
quantity = nil
(*temporary) =
{
tracked =
{
}
}
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"

@Roelio81
Copy link
Author

Reverting the change in caching.lua and currencyTracker.lua of a72c274 seems to fix the issue for me

@Kanegasi
Copy link

Kanegasi commented Sep 16, 2023

This error also occurs on retail. The issue is that CURRENCY_DISPLAY_UPDATE does not always have return values in all game versions. The recent fix to check just the quantity has now caused "index is nil" errors.

Here is a fix:

function Cacher:CURRENCY_DISPLAY_UPDATE(_, id, quantity)
	if id and quantity then
		self.player.currency[id] = quantity > 0 and quantity or nil
	end
end

@Jaliborc Jaliborc closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants