Thread Tools Display Modes
09/17/19, 07:23 PM   #1
Redcon
Join Date: Sep 2019
Posts: 2
Unhappy ESO PTS Addon Error

Need help fixing this error. I'm unsure of what is causing it I can't go into my Addon Settings to change them around due to this error I turned all but 1 addon of so I can still see the settings to test if it was a single addon. However, still had the same issue so to double-check and make sure I didn't get lucky and find that single addon immediately I switched addons but still got the error.

bad argument #1 to 'ipairs' (table/struct expected, got nil)
stack traceback:
[C]: in function 'ipairs'
EsoUI/PregameAndIngame/ZO_Options/Keyboard/ZO_Options_Keyboard.lua:162: in function 'ZO_KeyboardOptions:PanelRequiresDeferredLoading'
<Locals> self = [table:1]{currentPanel = 100, isGamepadOptions = F, currentPanelId = 101}, panelId = 100 </Locals>
EsoUI/PregameAndIngame/ZO_Options/Keyboard/ZO_Options_Keyboard.lua:146: in function 'ZO_KeyboardOptions:ChangePanels'
<Locals> self = [table:1], panelId = 100, panelName = "Addons", readyToShowPanel = T </Locals>
user:/AddOns/MasterThief/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:877: in function 'panelData.callback'
EsoUI/Common/ZO_GameMenu/ZO_GameMenu.lua:52: in function 'TreeEntryOnSelected'
<Locals> control = ud, data = [table:2]{id = 100, categoryName = "Settings", name = "Addons"}, selected = T, reselectingDuringRebuild = F </Locals>
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:705: in function 'ZO_TreeNode:OnSelected'
<Locals> self = [table:3]{selectSound = "Click_TreeSubcategory", enabled = T, childrenHeight = 0, selected = F, openPercentage = 0, childrenCurrentHeight = 0, childSpacing = 8, childIndent = 30, open = F}, reselectingDuringRebuild = F </Locals>
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:411: in function 'ZO_Tree:SelectNode'
<Locals> self = [table:4]{enabled = T, defaultIndent = 30, autoSelectChildOnNodeOpen = F, suspendAnimations = F, exclusive = T, width = 285, openAnimationDurationMS = 300, defaultSpacing = 8}, treeNode = [table:3], reselectingDuringRebuild = F, bringParentIntoView = F </Locals>
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:888: in function 'ZO_TreeEntry_OnMouseUp'
<Locals> self = ud, upInside = T, NOT_REBUILDING = F, DONT_BRING_PARENT_INTO_VIEW = F </Locals>
ZO_CollectionsBook_TopLevelCategoriesScrollChildZO_TreeStatusLabelSubCategory1_MouseUp:3: in function '(main chunk)'
<Locals> self = ud, button = 1, upInside = T, ctrl = F, alt = F, shift = F, command = F </Locals>|r


Also, I would have left a screenshot to maybe help but the site has a max os 2MB and the Screenshot was 3.28MB
  Reply With Quote
09/17/19, 09:48 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
It's LibAddonMenu. I don't know what changed/needs changed, but I'm sure he'll get to it in a few weeks.
  Reply With Quote
09/18/19, 03:58 AM   #3
Redcon
Join Date: Sep 2019
Posts: 2
Thank You.
  Reply With Quote
09/18/19, 09:01 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Maybe check if the embedded library LibAddonMenu-2.0 in the addon MasterThief is updated to the newest version properly.
Because the changelpg says: update to libmenu release24
And we are currently already at r28 or r29!

And btw: The addon is using the libraries wrong! It is loading them via the MAsterThiefs.txt file directly and thus could break other addons this way.
-Remove the subfolder "libs" and install the libraries as standalone versions with their own txt file (LibAddonMenu-2.0, LibScroll)
-The lines in the MasterThief.txt here should be removed totally:
Code:
Libs\LibStub\LibStub.lua
Libs\LibScroll\LibScroll.lua
Libs\LibAddonMenu-2.0\LibAddonMenu-2.0.lua
Libs\LibAddonMenu-2.0\controls\panel.lua
Libs\LibAddonMenu-2.0\controls\submenu.lua
Libs\LibAddonMenu-2.0\controls\button.lua
Libs\LibAddonMenu-2.0\controls\checkbox.lua
Libs\LibAddonMenu-2.0\controls\colorpicker.lua
Libs\LibAddonMenu-2.0\controls\custom.lua
Libs\LibAddonMenu-2.0\controls\description.lua
Libs\LibAddonMenu-2.0\controls\dropdown.lua
Libs\LibAddonMenu-2.0\controls\editbox.lua
Libs\LibAddonMenu-2.0\controls\header.lua
Libs\LibAddonMenu-2.0\controls\slider.lua
Libs\LibAddonMenu-2.0\controls\texture.lua
Libs\LibAddonMenu-2.0\controls\iconpicker.lua
Libs\LibAddonMenu-2.0\controls\divider.lua
-And these lines need to be added below the line ## OptionalDependsOn:

## DependsOn: LibScroll
  Reply With Quote
09/18/19, 10:18 AM   #5
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
Updating to r29 does not help.
It looks like there is a new version of ZO_Options_Keyboard.lua. The function names and line numbers in the traceback don't match the last version of this file in the repository. It seems its callback is now expecting LibAddonMenu to provide an implementation of ZO_KeyboardOptions:PanelRequiresDeferredLoading and is not finding it.

Last edited by BoarGules : 09/18/19 at 10:47 AM. Reason: Expand "does not help"
  Reply With Quote
09/20/19, 03:38 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
But updating it to r29 is the first step to solve the issue as the included outdated version is just nuts :-)
Maybe this helps.

Change the following in LAM function "CreateAddonSettingsMenuEntry"

Code:
KEYBOARD_OPTIONS.controlTable[panelData.id] = {}
after ZO_GameMenu_AddSettingPanel(panelData)
  Reply With Quote
09/21/19, 02:37 PM   #7
marlonbrando
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 17
Originally Posted by Baertram View Post
But updating it to r29 is the first step to solve the issue as the included outdated version is just nuts :-)
Maybe this helps.

Change the following in LAM function "CreateAddonSettingsMenuEntry"

Code:
KEYBOARD_OPTIONS.controlTable[panelData.id] = {}
after ZO_GameMenu_AddSettingPanel(panelData)
That seemed to fix things. I got rid of all of the LibAddonMenu-2.0 directories sprinkled among my various addons and then added this to the top-level library.

I'm not the OP but I appreciate your tracking this down.
  Reply With Quote
09/22/19, 06:14 AM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Good it helps, but wasn't me, sorry forgot to name the source
Votan was the man!

Originally Posted by marlonbrando View Post
That seemed to fix things. I got rid of all of the LibAddonMenu-2.0 directories sprinkled among my various addons and then added this to the top-level library.

I'm not the OP but I appreciate your tracking this down.
  Reply With Quote
09/24/19, 06:43 AM   #9
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
@Baertram:

The addon is using the libraries wrong! It is loading them via the MasterThiefs.txt file directly.


A developer can hardly be blamed for doing this when it is in the library module's own documentation (at https://www.esoui.com/downloads/info7-LibAddonMenu.html). And is in very good company. In my ESO installation there are 3 add-ons that do this.

I know that in the past year or so there has been a change of thinking about the desirability of embedding library modules in add-ons, but this does need to be communicated to add-on developers outside the immediate circle of library maintainers. There should at the very least be a deprecation notice in the docs.
  Reply With Quote
09/24/19, 06:51 AM   #10
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
You are right and I did not try to blame anyone.
I tried to explain it and here is a link about why this is a bad way to load the libs (--Why libraries shouldn't be loaded from your addon's txt file--).
The libs can be inside the addons subfolder or main folder, but only if they contain their own txt file and are not loaded by the addon's txt file "hardcoded".

Yes, this changed in the past months as ZOs added new tags into the txt files liek ## IsLibrary and ## AddOnVersion.
So my phrase should have been:
Meanwhile the addon is using the libraries wrong :-)

If the documentation of the library is not up2date it either was forgotten or the dev got a reason.
I tried to contact a lot of them and updated the wikis to use the global variabls instead of the LiBStub calls (where available) and even asked to update the docs. But you know, documentation is always outdated.
But for lam2 it definately works pretty well (as for all other libs I know as well) if you just remove the lines hardcoded from your addon's txt file, add them to the ## DependsOn: or ## OptionalDependsOn: tag, and add the libraries with their own txt file instead.

There could be like 100 addons in your eso addons folder which do this but they all may work for now and one day they could break everything. Read the explanation at the link please and if you are interested in supporting this, you are free to join and update your addons. I'm npot forcing anyone, just trying to explain why it's a better solution to let the libraries load the stuff needed properly and make your addons just dependent on the libraries. You even ship them with your addon and you got less work as well as you can simply exchange the whole lib folder in the future without having to exchange single files and removing the txt file! So it's a win-win situation.

Last edited by Baertram : 09/24/19 at 07:00 AM.
  Reply With Quote
10/19/19, 01:18 PM   #11
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
So what is a developer to do now? The library is still at revision 29 (7 May) and all add-ons that use it will break in the worst possible way (crash on load) after maintenance on Monday 21 October, unless they provide their own versions, or resort to less hygienic measures like monkey-patching.
  Reply With Quote
10/19/19, 04:39 PM   #12
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,567
You just have to stay calm and carry on. LAM2r30 is ready and will be released during the downtime on Monday.
  Reply With Quote
10/20/19, 06:01 AM   #13
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
You should remove bundled lam versions loaded directly from your txt file of your addon and just let the user update lam as it will be updated to r30. Or you ship lam r30 completely with its own txt file in e.g. a libs subfolder of your addons.
The later is more effort for you.
The first (standalone) will fix your worries worrisome for the future
  Reply With Quote
10/20/19, 03:58 PM   #14
BoarGules
 
BoarGules's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 34
Originally Posted by sirinsidiator View Post
You just have to stay calm and carry on. LAM2r30 is ready and will be released during the downtime on Monday.
Which means I can only start testing after that. I've been testing with what (with Baertram's help) I guess the patch will be. So I have half a morning to retest on the PTS with the real code, and release a new build.
  Reply With Quote
10/20/19, 04:45 PM   #15
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
You can try this version (see attachment).
It's the 2.0r29 with the changed lines from my post above, and just increased the version to r30 so it will load ABOVE all older ones in subfolders etc.

And yes, basically this is all you can do (as we did as well)
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » ESO PTS Addon Error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off