ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   ESO PTS Addon Error (https://www.esoui.com/forums/showthread.php?t=8760)

Redcon 09/17/19 07:23 PM

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

Rhyono 09/17/19 09:48 PM

It's LibAddonMenu. I don't know what changed/needs changed, but I'm sure he'll get to it in a few weeks.

Redcon 09/18/19 03:58 AM

Thank You.

Baertram 09/18/19 09:01 AM

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

BoarGules 09/18/19 10:18 AM

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.

Baertram 09/20/19 03:38 AM

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)

marlonbrando 09/21/19 02:37 PM

Quote:

Originally Posted by Baertram (Post 39208)
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.

Baertram 09/22/19 06:14 AM

Good it helps, but wasn't me, sorry forgot to name the source :eek:
Votan was the man!

Quote:

Originally Posted by marlonbrando (Post 39211)
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.


BoarGules 09/24/19 06:43 AM

@Baertram:

Quote:

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.

Baertram 09/24/19 06:51 AM

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.

BoarGules 10/19/19 01:18 PM

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.

sirinsidiator 10/19/19 04:39 PM

You just have to stay calm and carry on. LAM2r30 is ready and will be released during the downtime on Monday. ;)

Baertram 10/20/19 06:01 AM

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:D

BoarGules 10/20/19 03:58 PM

Quote:

Originally Posted by sirinsidiator (Post 39442)
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.

Baertram 10/20/19 04:45 PM

1 Attachment(s)
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) :p


All times are GMT -6. The time now is 02:53 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI