Error Opening Bags While "Currencies" is Checked
Shammikaze opened this issue ยท 3 comments
Running Software:
- Addon version: Bagnon-9.2.2-3.4.0
- Server patch: WotLK Classic
Describe the bug
Bags don't open since most recent addon update (WotLK Classic).
Unchecking "Currencies" and reloading UI fixes this.
To Reproduce
Steps to reproduce the behaviour:
- Update addon
- Login
- Press "B" to open bags
- Nothing happens
Expected behaviour
Pressing B should open my bags.
Error Logs
Error 1: (Error 5/6)
Message: ...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:45: attempt to call field 'GetBackpackCurrencyInfo' (a nil value)
Time: Mon Sep 19 09:13:38 2022
Count: 1
Stack: ...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:45: attempt to call field 'GetBackpackCurrencyInfo' (a nil value)
[string "=[C]"]: in function GetBackpackCurrencyInfo' [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:45: in function
Update'
[string "@interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:39: in function RegisterEvents' [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:25: in function <...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:13> [string "=(tail call)"]: ? [string "@Interface\AddOns\Bagnon\addons\main\frame.lua"]:319: in function
PlaceCurrency'
[string "@interface\AddOns\Bagnon\addons\main\frame.lua"]:97: in function Layout' [string "@Interface\AddOns\Bagnon\addons\main\frame.lua"]:66: in function
Update'
[string "@interface\AddOns\Bagnon\addons\main\frame.lua"]:56: in function RegisterSignals' [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\frame.lua"]:19: in function <...ace\AddOns\Bagnon\common\Wildpants\classes\frame.lua:17> [string "=(tail call)"]: ? [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\inventory.lua"]:21: in function <...AddOns\Bagnon\common\Wildpants\classes\inventory.lua:20> [string "=[C]"]: in function
Show'
[string "@interface\AddOns\Bagnon\common\Wildpants\api\frames.lua"]:85: in function Show' [string "@Interface\AddOns\Bagnon\common\Wildpants\api\frames.lua"]:77: in function <...erface\AddOns\Bagnon\common\Wildpants\api\frames.lua:76> [string "=(tail call)"]: ? [string "@Interface\AddOns\Bagnon\common\Wildpants\features\autoDisplay.lua"]:146: in function
ToggleBackpack'
[string "TOGGLEBACKPACK"]:1: in function <[string "TOGGLEBACKPACK"]:1>
Locals:
Error 2: (Error 6/6)
Message: ...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:45: attempt to call field 'GetBackpackCurrencyInfo' (a nil value)
Time: Mon Sep 19 09:13:38 2022
Count: 1
Stack: ...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:45: attempt to call field 'GetBackpackCurrencyInfo' (a nil value)
[string "=(tail call)"]: ?
[string "@interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:45: in function Update' [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:39: in function
RegisterEvents'
[string "@interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua"]:25: in function <...\Bagnon\common\Wildpants\classes\currencyDisplay.lua:13>
[string "=(tail call)"]: ?
[string "@interface\AddOns\Bagnon\addons\main\frame.lua"]:319: in function PlaceCurrency' [string "@Interface\AddOns\Bagnon\addons\main\frame.lua"]:97: in function
?'
[string "@interface\AddOns\AngryAssignments\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:119: in function <...nts\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@interface\AddOns\AngryAssignments\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:29: in function <...nts\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@interface\AddOns\AngryAssignments\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:64: in function SendMessage' [string "@Interface\AddOns\Bagnon\common\Wildpants\libs\WildAddon-1.0\WildAddon-1.0.lua"]:83: in function
SendSignal'
[string "@interface\AddOns\Bagnon\common\Wildpants\classes\base.lua"]:24: in function SendFrameSignal' [string "@Interface\AddOns\Bagnon\common\Wildpants\classes\itemGroup.lua"]:177: in function
func'
[string "@interface\AddOns\Bagnon\common\Wildpants\libs\MutexDelay-1.0\MutexDelay-1.0.lua"]:36: in function <...mon\Wildpants\libs\MutexDelay-1.0\MutexDelay-1.0.lua:30>
Locals:
Additional context
Disabling "Currencies" and reloading UI seems to fix this. That said, when you hover over your gold total at the bottom, it says "0c".
The issue is that the currency-methods are called through the "C_CurrencyInfo" namespace, which only exists in the 9.x API.
Workaround: in "Interface\AddOns\Bagnon\common\Wildpants\classes\currencyDisplay.lua
" change
line 28: "hooksecurefunc(C_CurrencyInfo, 'SetCurrencyBackpack', function()
" to "hooksecurefunc('SetCurrencyBackpack', function()
"
and
line 45: "local data = C_CurrencyInfo.GetBackpackCurrencyInfo(i)
" to "local data = GetBackpackCurrencyInfo(i)
"