arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
102 stars 14 forks source link

[BUG] LUA error with LibDialog #1890

Closed hollo6 closed 1 month ago

hollo6 commented 1 month ago

What version number you are using? 3.10.29-alpha2

What game client are you playing? Retail, Wrath, Classic / Live, PTR, Beta Retail

What language is the game client set to? enGB

Describe the bug When trying to save an addon set with Better Addon List, the LUA error below pops up and completely breaks the game, meaning the chat stops working so reload is not possible, menu can't be opened either, so cannot logout, the game can only be exited by killing the WoW process. This seems to be a bug with LibDialog and the fix here applied to LibDialog-1.0.lua within the ArkInventory libs fixes it here as well.

4x ArkInventory/Libs/LibDialog/LibDialog-1.0-9.lua:833: attempt to get length of field 'StaticPopup_DisplayedFrames' (a nil value) [string "@ArkInventory/Libs/LibDialog/LibDialog-1.0-9.lua"]:833: in function Spawn' [string "@BetterAddonList/BetterAddonList.lua"]:472: in functionfunc' [string "@Blizzard_SharedXML/Mainline/UIDropDownMenu.lua"]:1019: in function `UIDropDownMenuButton_OnClick'

error = defined =[C]:-1 _BuildDialog = defined @ArkInventory/Libs/LibDialog/LibDialog-1.0.lua:553 _Dialog_OnShow = defined @ArkInventory/Libs/LibDialog/LibDialog-1.0.lua:229

To Reproduce

  1. Install Better Addon List
  2. Open the Addons menu
  3. Try to save an addon set
  4. Observe the LUA error above and game broken

Additional context I'm sure this could be reproduced with some other method, but this is how I encountered it and don't know where else this funcion is used. Changing the above function in Better Addon List only did not fix the issue, it got resolved only after doing it in ArkInventory's lib as well.

arkayenro commented 1 month ago

LibDialog is a shared library, i tend to load it first (a being first alphabetically) so any time another mod using it has an issue i will get blamed.

i've read the other post and replied. they need to bump the version number as well or it will keep happening.

i've included the fix in my version of the library and bumped it to 10 so it should be fixed in the next alpha

note that the source does not have the fix yet

arkayenro commented 1 month ago

should be fixed in 3.10.29-alpha-3

hollo6 commented 1 month ago

Looks good, thank you!