Sluimerstand / ProfessionShoppingList

Track recipes, reagents, cooldowns, and more!
4 stars 3 forks source link

Bug: When no professions are known #25

Closed nancikennedy closed 1 year ago

nancikennedy commented 1 year ago

On Retail, with latest version. and nothing else loaded, the following error occurs upon logging in:

Message: ...ns/ProfessionShoppingList/ProfessionShoppingList.lua:413: attempt to index local 'icon' (a nil value) Time: Thu Nov 17 23:27:47 2022 Count: 1 Stack: ...ns/ProfessionShoppingList/ProfessionShoppingList.lua:413: attempt to index local 'icon' (a nil value) [string "@Interface/AddOns/ProfessionShoppingList/ProfessionShoppingList.lua"]:413: in function `pslSettings' [string "@Interface/AddOns/ProfessionShoppingList/ProfessionShoppingList.lua"]:623: in function <...ns/ProfessionShoppingList/ProfessionShoppingList.lua:368>

Locals: settings = Frame { 0 = name = "Profession Shopping List" } miniButton =

{ } icon = nil (temporary) =
{ NewLibrary = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:20 minors =
{ } minor = 2 IterateLibraries = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:46 GetLibrary = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:36 libs =
{ } } (temporary) = nil (temporary) = true (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = "LibDataBroker_DataObjectCreated" (temporary) = nil (temporary) =
{ } (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:746 (*temporary) = SettingsPanel { 0 = GameTab = Button { } categoryLayouts =
{ } RegisterCategory = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:746 RevertSettings = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:442 ClosePanelButton = Button { } CheckTutorials = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:253 OnShow = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:217 Open = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:341 GetSettingsCanvas = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:789 AssignLayoutToCategory = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:712 CategoryList = Frame { } SearchBox = EditBox { } modified =
{ } AddOnsTab = Button { } SetSecureAttributeResults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:180 ForEachCanvas = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:541 Bg = Frame { } CallRefreshOnCanvases = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:580 GetSecureAttributeResults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:184 OnLoad = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:55 ExitWithoutCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:305 TransitionBackOpeningPanel = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:329 FinalizeCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:422 SetCurrentCategorySettingsToDefaults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:491 GetAllCategories = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:742 ExitWithCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:318 SetApplyButtonEnabled = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:556 HasUnappliedSettings = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:528 OnKeybindRebindSuccess = define

Sluimerstand commented 1 year ago

I wasn't able to reproduce this error, but I have updated the library that handles the minimap icon, which this error seems to come from.

Let me know if the latest update resolves this issue. If not, I'd love to get some more details on when this error occurs!

nancikennedy commented 1 year ago

I updated to the latest version and I am stilling seeing an error close to the original above.

I tried re-enabling the minimap icon on the higher level chars who aren't having a problem, which made no difference. I then tried deleting my saved var files, and relogging. Still having the problem on many people, but it seems like it's trending towards those whose professions skills are super minimal (think "I unlocked all the exp skills I can" atm, but they're all at 1 skill essentially) or non-existent.

Also observed, when this error is present: The /psl slash commands didn't work PSL shows up in the Options:Addon list, but there's just a blank page where the settings should be.

The seems to be almost the same as the original...

Message: ...ns/ProfessionShoppingList/ProfessionShoppingList.lua:413: attempt to index local 'icon' (a nil value) Time: Fri Nov 18 20:31:28 2022 Count: 1 Stack: ...ns/ProfessionShoppingList/ProfessionShoppingList.lua:413: attempt to index local 'icon' (a nil value) [string "@Interface/AddOns/ProfessionShoppingList/ProfessionShoppingList.lua"]:413: in function `pslSettings' [string "@Interface/AddOns/ProfessionShoppingList/ProfessionShoppingList.lua"]:640: in function <...ns/ProfessionShoppingList/ProfessionShoppingList.lua:367>

Locals: settings = Frame { 0 = name = "Profession Shopping List" } miniButton =

{ } icon = nil (temporary) =
{ NewLibrary = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:20 minors =
{ } minor = 2 IterateLibraries = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:46 GetLibrary = defined @Interface/AddOns/ProfessionShoppingList/libs/LibDBIcon-1.0/LibStub/LibStub.lua:36 libs =
{ } } (temporary) = nil (temporary) = true (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = "LibDataBroker_DataObjectCreated" (temporary) = nil (temporary) =
{ } (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:746 (*temporary) = SettingsPanel { 0 = GameTab = Button { } categoryLayouts =
{ } RegisterCategory = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:746 RevertSettings = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:442 ClosePanelButton = Button { } CheckTutorials = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:253 OnShow = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:217 Open = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:341 GetSettingsCanvas = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:789 AssignLayoutToCategory = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:712 CategoryList = Frame { } SearchBox = EditBox { } modified =
{ } AddOnsTab = Button { } SetSecureAttributeResults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:180 ForEachCanvas = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:541 Bg = Frame { } CallRefreshOnCanvases = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:580 GetSecureAttributeResults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:184 OnLoad = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:55 ExitWithoutCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:305 TransitionBackOpeningPanel = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:329 FinalizeCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:422 SetCurrentCategorySettingsToDefaults = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:491 GetAllCategories = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:742 ExitWithCommit = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:318 SetApplyButtonEnabled = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:556 HasUnappliedSettings = defined @Interface/SharedXML/Settings/Blizzard_SettingsPanel.lua:528 OnKeybindRebindSuccess = define

Sluimerstand commented 1 year ago

Okay, I was able to re-create the error! I was using BugGrabber + BugSack to catch Lua errors, but those addons were actually preventing the error from occurring. Turns out, the LibDBIcon library wasn't loading properly. For some reason the library as it is provided doesn't do that by default. And my bug grabbing addons also use LibDBIcon, and loaded it so that PSL could also use it.

This is now fixed, so the error should be resolved for you as well with v10.0.2-005.

nancikennedy commented 1 year ago

Well, that totally explains why I couldn't get a consistent read on the problem. All the testing I was doing where I was seeing, I literally had disabled everything else including Bugsack/Grabber. I just didn't think to turn it off on the higher level people.

Sluimerstand commented 1 year ago

It took me a while to try it without those as well, but it eventually clicked, haha. Can you confirm the error no longer appears with the latest version? :)

nancikennedy commented 1 year ago

I can confirm this appears to be fixed. :)