Farming Bar

Farming Bar

63.7k Downloads

[BUG] v3.0-alpha5-classic Options not working

Road-block opened this issue ยท 8 comments

commented

Describe the bug
With latest alpha either command-line option /fbar config or combo click on pre-existing visible bar fails to bring up FarmingBar options.

Client
1.13.6 36935 Dec 11 2020 11306

To Reproduce
Steps to reproduce the behavior:
N/A any method to bring up options doesn't work.

Expected behavior

Screenshots

1x ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-80.lua:1866: AceConfigRegistry-3.0-20:ValidateOptionsTable(): FarmingBar.args.objectiveBuilder.args.Threat Enchant.args.objective.args.trackers.args.type.values: expected a methodname, funcref or table, got 'nil'
[C]:: ?
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:50: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:45>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:210: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:205>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:247: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:282: in function 'ValidateOptionsTable'
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:324: in function 'app'
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-80.lua:1866: in function 'Open'
FarmingBar\Core.lua:172: in function '?'
...erface\Ace3\AceConsole-3.0\AceConsole-3.0-7.lua:94: in function '?'
FrameXML\ChatFrame.lua:4693: in function <FrameXML\ChatFrame.lua:4639>
[C]:: in function 'ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4356: in function <FrameXML\ChatFrame.lua:4355>
[C]:: in function 'ChatEdit_SendText'
FrameXML\ChatFrame.lua:4392: in function 'ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

Additional context
From a quick look through the source the command handler is trying to call addon.Config:Load()

However /dump LibStub("AceAddon-3.0"):GetAddon("FarmingBar").Config in-game returns empty result.
Something in the 3.0 refactor has gone missing ๐Ÿ˜„

commented

After doing /run FarmingBarDB=nil;ReloadUI() to clear out saved variables in case this is a settings upgrade issue I can bring up options by shift-rightclick or ctrl-click on the default empty bar but command-handler still errors with

1x FarmingBar\Core.lua:170: attempt to index field 'Config' (a nil value)
FarmingBar\Core.lua:170: in function '?'
...erface\Ace3\AceConsole-3.0\AceConsole-3.0-7.lua:94: in function '?'
FrameXML\ChatFrame.lua:4693: in function <FrameXML\ChatFrame.lua:4639>
[C]:: in function 'ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4356: in function <FrameXML\ChatFrame.lua:4355>
[C]:: in function 'ChatEdit_SendText'
FrameXML\ChatFrame.lua:4392: in function 'ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

So the issue is if someone has hidden the bar and has no way to interact with it other than command handler.

commented

Quick objectives by dragging items to a button also cause errors breaking the profile.
Item: Azerothian Diamond is an example of quick objective that tries to create a table key that's not valid with dot notation.

commented

Should be fixed in v3.0-alpha6. If the same issue persists, you can reopen this ticket. Otherwise create a new ticket for any further issues.

Thanks for bringing it to my attention!

commented

The issue with the slash command is that I reworked the config options to be part of the main options panel instead of standalone. I did forget to change the slash command to properly load the options so that's why it's not working.

Thats also the reason you wouldn't be able to find the Config frame, but also the add-on variable is referring to the add-on namespace and not the Ace add-on. That variable is FarmingBar. but that doesn't matter because I'm fairly certain I deleted that reference when I added it to the main options since it wasn't necessary anymore.

Do you have a copy of your old saved variables from when shift clicking the bar anchor didn't work though? I'm wondering why you had to reset your DB to open it that way even.

Also, can you explain more about what's happening when you're adding a quick objective? What is being messed up? Do you mean that it's breaking the options to where you can't open config again?

commented

Also, can you explain more about what's happening when you're adding a quick objective? What is being messed up? Do you mean that it's breaking the options to where you can't open config again?

That is correct.
On next login (so I'm assuming it has to try saving to db) I can again not open options (neither from command line which is apparently the known issue you've identified, but also through modifier clicking the bar)

commented

I do not have a backup of my saved variables from before nuking them but this is the one that got broken by me adding a quick objective through dragging an item on a button of bar 1.

1x ...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-80.lua:445: AceConfigRegistry-3.0-20:ValidateOptionsTable(): FarmingBar.args.objectiveBuilder.args.item:Azerothian Diamond.args.objective.args.trackers.args.type.values: expected a methodname, funcref or table, got 'nil'
[C]:: ?
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:50: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:45>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:210: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:205>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:247: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:254: in function <...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0.lua:219>
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:282: in function 'ValidateOptionsTable'
...-3.0\AceConfigRegistry-3.0\AceConfigRegistry-3.0-20.lua:324: in function 'app'
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-80.lua:445: in function 'SelectGroup'
...ddOns\FarmingBar\Frame\Widgets\FarmingBar_Button.lua:59: in function 'func'
...ddOns\FarmingBar\Frame\Widgets\FarmingBar_Button.lua:288: in function <...ddOns\FarmingBar\Frame\Widgets\FarmingBar_Button.lua:257>

FarmingBar.lua.txt

commented

It looks like you had other quick objectives too. Were those created by dragging onto an empty button? Also looks like just one of them is on the bar. And was it only the azerothian diamond that caused an issue? Or did you just name the other objectives similar to a quick objective? (Thorium Ore and Grave Moss)

commented

Now that I'm on lunch and could actually log on and look at it, turns out it was just a simple issue of certain retail only code not being correctly commented out. I've fixed that and the slash command and will push a new alpha build shortly. I had already been working on another push so I just need to do some quick checks that everything else I changed is working in classic.