Broker_Currency

501k Downloads

Random lua errors after todays update, stats not saved properly.

TreizeEU opened this issue ยท 11 comments

commented

Hi Torhal.

I just downloaded the new update today (9.0.5.7). After reloading a bunch of times on each characters on my server (first-time logins seemed to trigger the below errors, on most of my characters although not all), I noticed the summary tooltip keeps the names of the characters and gold gained today/this week (which tracks previously logged in toons' gold as gained+spent gold), but not gold on any character other than the one I'm logged onto, and no currencies are shown at all.

The list of currencies on my chocolate bar seems to work fine, it's just the mouse-over tooltip.

Any ideas?

Below are the 3 lua errors I'm getting:

18x Broker_Currency\Broker_Currency-9.0.5.7.lua:265: attempt to index local 'left4' (a nil value)
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:265: in function <Broker_Currency\Broker_Currency.lua:245>
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:630: in function <Broker_Currency\Broker_Currency.lua:627>
[string "=[C]"]: ?
[string "@datastore\libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:70: in function <DataStore\libs\AceAddon-3.0\AceAddon-3.0.lua:65>
[string "@datastore\libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:498: in function `InitializeAddon'
[string "@datastore\libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:623: in function <DataStore\libs\AceAddon-3.0\AceAddon-3.0.lua:615>


12x Broker_Currency\Broker_Currency-9.0.5.7.lua:376: attempt to compare nil with number
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:376: in function ?' [string "@DataStore\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119> [string "=[C]"]: ? [string "@DataStore\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25> [string "@DataStore\libs\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function Fire'
[string "@datastore\libs\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <DataStore\libs\AceEvent-3.0\AceEvent-3.0.lua:119>


4x Broker_Currency\Tooltip.lua:180: attempt to index local 'gainedReference' (a nil value)
[string "@Broker_Currency\Tooltip.lua"]:180: in function <Broker_Currency\Tooltip.lua:177>
[string "@Broker_Currency\Tooltip.lua"]:216: in function <Broker_Currency\Tooltip.lua:184>
[string "@Broker_Currency\Tooltip.lua"]:274: in function `OnEnter'
[string "@ChocolateBar\Chocolate.lua"]:257: in function <ChocolateBar\Chocolate.lua:228>

Locals:
currencyIDList =

{
1 = 829
2 = 1174
3 = 398
4 = 821
5 = 1535
6 = 384
7 = 393
8 = 1172
9 = 1173
10 = 754
11 = 677
12 = 400
13 = 394
14 = 828
15 = 397
16 = 676
17 = 401
18 = 385
19 = 399
20 = 1534
21 = 697
22 = 738
23 = 752
24 = 1273
25 = 1129
26 = 994
27 = 1580
28 = 776
29 = 163036
30 = 116415
31 = 37829
32 = 21100
33 = 515
34 = 49927
35 = 1379
36 = 944
37 = 789
38 = 1602
39 = 1356
40 = 1357
41 = 26045
42 = 26044
43 = 1792
44 = 1149
45 = 1704
46 = 391
}
profitTable =
{
}
gainedReference = nil
spentReference = nil
(for index) = 1
(for limit) = 46
(for step) = 1
index = 1
currencyID = 829
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index local 'gainedReference' (a nil value)"

commented

@Torhal

How is the rework coming along so far? I don't mean to be pushy, but it's been a month now and still no update to fix the reworked version to correctly show gold and currencies in the tooltip.

commented

I was having LUA errors this morning when I logged in after updating. However, once I pulled down each of the related libraries, the LUA errors stopped. This did not fix the missing currencies from the summary tooltip.

commented

Ok, the LUA errors are back on all except the first character I logged in as. Here are the errors I am getting now.

#1
Message: Interface\AddOns\Broker_Currency\Broker_Currency.lua:265: attempt to index local 'left4' (a nil value)
Time: Wed Apr 21 10:06:46 2021
Count: 1
Stack: Interface\AddOns\Broker_Currency\Broker_Currency.lua:265: attempt to index local 'left4' (a nil value)
[string "@interface\AddOns\Broker_Currency\Broker_Currency.lua"]:265: in function <Interface\AddOns\Broker_Currency\Broker_Currency.lua:245>
[string "@interface\AddOns\Broker_Currency\Broker_Currency.lua"]:630: in function <Interface\AddOns\Broker_Currency\Broker_Currency.lua:627>
[string "=[C]"]: ?
[string "@interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua"]:70: in function <Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:65>
[string "@interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua"]:498: in function `InitializeAddon'
[string "@interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua"]:623: in function <Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:615>

Locals:

#2
Message: Interface\AddOns\Broker_Currency\Broker_Currency.lua:376: attempt to compare nil with number
Time: Wed Apr 21 10:06:55 2021
Count: 1
Stack: Interface\AddOns\Broker_Currency\Broker_Currency.lua:376: attempt to compare nil with number
[string "=(tail call)"]: ?
[string "@interface\AddOns\Broker_Currency\Broker_Currency.lua"]:376: in function ?' [string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119> [string "=[C]"]: ? [string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25> [string "@Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:64: in function Fire'
[string "@interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua"]:120: in function <Interface\AddOns\Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

Locals:

#3
Message: Interface\AddOns\Broker_Currency\Broker_Currency.lua:376: attempt to compare nil with number
Time: Wed Apr 21 10:06:56 2021
Count: 1
Stack: Interface\AddOns\Broker_Currency\Broker_Currency.lua:376: attempt to compare nil with number
[string "=(tail call)"]: ?
[string "@interface\AddOns\Broker_Currency\Broker_Currency.lua"]:376: in function <Interface\AddOns\Broker_Currency\Broker_Currency.lua:344>
[string "=[C]"]: ?
[string "@interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua"]:73: in function <...nterface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua:71>
[string "@interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua"]:87: in function `func'
[string "@interface\AddOns\Ace3\AceTimer-3.0\AceTimer-3.0.lua"]:57: in function <Interface\AddOns\Ace3\AceTimer-3.0\AceTimer-3.0.lua:50>

Locals:

commented

I'm seeing them too. It's slightly intermittent. I think the other addons are registering callbacks that end up calling into this one before it's ready (no currencies loaded yet). If I /reload it never happens, only on login.

commented

When I reload the errors don't reappear, but the summary lists only gold, not the other currency I track. I checked, and that currency is still shown with a checkmark, so should appear.

To be clear, I just updated today from what was probably 9.0.2. I reverted to that version and it works as expected.

commented

I'll look into this tonight or over the weekend. Sorry for the inconvenience!

commented

@Torhal Thankfully the attempt to index into local "left4" ( a nil value) is a really easy fix. There's a typo (omission?) on line 265 of Broker_Currency.lua

It should read:

local left4Text = left4 and left4:GetText() or nil

Note the addition of left4 and at the start. Making just that change locally fixes that error for me.

Doesn't seem to fix the not saving bit though...

commented

@WanderingFox I can confirm this fixes the lua error, however the tooltip/summary is still only showing current gold.

commented

Just posting the errors I am receiving; reloading UI seems to solve the problem until next log in.
I'll gry the suggested fix; thanks!

+++++

2x Broker_Currency\Broker_Currency-9.0.5.7.lua:265: attempt to index local 'left4' (a nil value) [string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:265: in function <Broker_Currency\Broker_Currency.lua:245> [string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:630: in function <Broker_Currency\Broker_Currency.lua:627> [string "=[C]"]: ? [string "@!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:70: in function <...s!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:65> [string "@!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:498: in function InitializeAddon'
[string "@!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0-13.lua"]:623: in function <...s!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:615>
+++++++++++++

+++++++++++++
23x Broker_Currency\Broker_Currency-9.0.5.7.lua:376: attempt to compare nil with number
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:376: in function Update' [string "@Broker_Currency\Tooltip.lua"]:318: in function ShowTooltip'
[string "@Broker_Currency\Tooltip.lua"]:305: in function OnEnter' [string "@bazooka\Bazooka-v2.9.8.lua"]:1583: in function showTip'
[string "@bazooka\Bazooka-v2.9.8.lua"]:1388: in function <Bazooka\Bazooka.lua:1379>

Locals:
self =

{
SetDefaultModuleLibraries = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:367
Enable = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:294
RegisterChatCommand = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:85
EnableModule = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:332
modules =
{
}
GetModule = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:210
IterateEmbeds = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:442
ShowTooltip = defined @Broker_Currency\Tooltip.lua:317
defaultModuleLibraries =
{
}
TimeLeft = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:172
UnregisterChatCommand = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:111
ScheduleRepeatingTimer = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:129
CancelAllTimers = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:160
Printf = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:69
SetDefaultModulePrototype = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:409
name = "Broker_Currency"
IsEnabled = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:451
orderedModules =
{
}
ScheduleTimer = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:94
DisableModule = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:350
defaultModuleState = true
last =
{
}
RegisterMessage = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
UnregisterBucket = defined @Broker_Currency\Libraries\AceBucket-3.0\AceBucket-3.0.lua:206
Print = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:54
baseName = "Broker_Currency"
AddLine = defined @Broker_Currency\Tooltip.lua:471
OnInitialize = defined @Broker_Currency\Broker_Currency.lua:627
Update = defined @Broker_Currency\Broker_Currency.lua:344
IsModule = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:468
OnEnable = defined @Broker_Currency\Broker_Currency.lua:334
SetDefaultModuleState = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:387
CancelTimer = defined @datastore\libs\AceTimer-3.0\AceTimer-3.0.lua:147
SendMessage = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:59
SetEnabledState = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:424
UnregisterAllBuckets = defined @Broker_Currency\Libraries\AceBucket-3.0\AceBucket-3.0.lua:229
enabledState = true
UnregisterAllEvents = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
RegisterEvent = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:90
UnregisterAllMessages = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174
UnregisterMessage = defined @PetTracker\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:153
GetArgs = defined @datastore\libs\AceConsole-3.0\AceConsole-3.0.lua:144
NewModule = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0.lua:235
IterateModules = defined @!KalielsTracker\Libs\AceAddon-3.0\AceAddon-3.0`

commented

I have uninstalled Broker Currency completely and reinstalled it with the latestes version and now get these errors.
I will go back to my edited version till these errors are corrected. I love the addon so much.

Second Errors Today.

5x Broker_Currency\Broker_Currency-9.0.5.7.lua:376: attempt to compare nil with number
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:376: in function ?' [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119> [string "=[C]"]: ? [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25> [string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function Fire'
[string "@ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

First errors today

2x Broker_Currency\Broker_Currency-9.0.5.7.lua:265: attempt to index local 'left4' (a nil value)
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:265: in function <Broker_Currency\Broker_Currency.lua:245>
[string "@Broker_Currency\Broker_Currency-9.0.5.7.lua"]:630: in function <Broker_Currency\Broker_Currency.lua:627>
[string "=[C]"]: ?
[string "@ace3\AceAddon-3.0\AceAddon-3.0-13.lua"]:70: in function <Ace3\AceAddon-3.0\AceAddon-3.0.lua:65>
[string "@ace3\AceAddon-3.0\AceAddon-3.0-13.lua"]:498: in function `InitializeAddon'
[string "@ace3\AceAddon-3.0\AceAddon-3.0-13.lua"]:623: in function <Ace3\AceAddon-3.0\AceAddon-3.0.lua:615>

commented

While waiting for an update, I have decided to downgrade to 9.0.2.1 and manually added Shadowlands' currencies to it.