Kiatra / ChocolateBar

ChocolateBar is a World of Warcraft addons to display plugins in a bar on top or bottom of your screen
https://www.wowace.com/projects/chocolatebar
18 stars 9 forks source link

[Bug Report] Bug on log in #26

Closed karenlk closed 1 year ago

karenlk commented 1 year ago

What game version did the bug occur in?

Retail

Troubleshooting

Describe the bug.

On login, bugsack reports this error. Everything works fine though. I disabled everything except chocolatebar, !bugrabber, and bugsack and still got this error. Chocolatebar ## Version: v3.9.7

Steps to reproduce.

Each login attempt

Expected behavior.

no bug report

Errors

2x Interface/AddOns/ChocolateBar/Bar.lua:97: attempt to call method 'Unregister' (a nil value)
[string "@Interface/AddOns/ChocolateBar/Bar.lua"]:97: in function `UpdateJostle'
[string "@Interface/AddOns/ChocolateBar/Bar.lua"]:90: in function `UpdateAutoHide'
[string "@Interface/AddOns/ChocolateBar/Core.lua"]:505: in function `UpdateBars'
[string "@Interface/AddOns/ChocolateBar/Core.lua"]:160: in function <Interface/AddOns/ChocolateBar/Core.lua:156>
[string "=[C]"]: ?
[string "@Interface/AddOns/ChocolateBar/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Interface/AddOns/ChocolateBar/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function `EnableAddon'
[string "@Interface/AddOns/ChocolateBar/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:626: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:611>
fraerie commented 1 year ago

also getting this error and I'm finding it consistently doesn't load the broker menu item for Details and Paste - going into Chocolate Bar module config, unchecking the enabled checkbox and then rechecking it brings them back.

fraerie commented 1 year ago

Today's version of this error:

59x ChocolateBar/Bar.lua:97: attempt to call method 'Unregister' (a nil value) [string "@ChocolateBar/Bar.lua"]:97: in functionUpdateJostle' [string "@ChocolateBar/Bar.lua"]:90: in function UpdateAutoHide' [string "@ChocolateBar/Core.lua"]:505: in functionUpdateBars' [string "@ChocolateBar/Core.lua"]:160: in function <ChocolateBar/Core.lua:156>

[string "@Accountant/Libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:61> [string "@Accountant/Libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function EnableAddon' [string "@Accountant/Libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:626: in function <Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:611> [string "=[C]"]: in functionLoadAddOn' [string "@ArkInventory/Core/ArkInventory.lua"]:11540: in function LoadAddOn' [string "@ArkInventory/Core/ArkInventory.lua"]:11556: in functionBlizzardAPIHook' [string "@ArkInventory/Core/ArkInventory.lua"]:3179: in function <ArkInventory/Core/ArkInventory.lua:3148> ... [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:100: in function SetUpMajorFactionList' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:93: in functionRefreshMajorFactionList' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:88: in function `RefreshOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:80: in function <...sionLandingPage/Blizzard_DragonflightLandingPage.lua:76>

string "=[C]": in function CreateFrame' [string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:49: in functionCreateOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:63: in function RefreshExpansionOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:35: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:33>

Kiatra commented 1 year ago

@karenlk Do you have ArkInventory as well?

fraerie commented 1 year ago

Looking at it - it looks like it's an interaction with the Ace library - which is used by multiple addons.

karenlk commented 1 year ago

I did a search for ArkInventory and I see that the only addon I have that uses it is CanIMogIt. I disabled that addon but I still get this error upon login.

I still get the same error as the original. It looks like it is this line:

 jostle2:Unregister(self)

I don't know a lot about lua or warcraft addons and how it loads files, but it seems to me that jostle2.lua is not getting loaded. I added a print statement to the top of jostle2.lua to see if it was getting called when it loaded and it never printed that out. The same print statement at the top of jostle.lua prints the message. So seems to me something wrong with jostle2. But doesn't make sense to me how it gets past this statement if jostle2 is not loaded (but that might be my lack of lua knowledge!) if jostle2 then

fraerie commented 1 year ago

any progress on this?

Kiatra commented 1 year ago

I could not reproduce the error yet. Even with a fresh install.

Can you try to backup the saved variables of ChocolateBar and then delete them and try then with just this addon enabled?

To temporary delete the saved variables quit the game then move the File .../World of Warcraft/retail/WTF/Account//SavedVariables/ChocolateBar.lua and ChocolateBar.lua.bak to another location (your Desktop) and start the game again.

Do not forget to disable all other addons.

fraerie commented 1 year ago

one thing I'm noticing is that the errors all point back to the jostle module and for some reason there are two jostle files in the zip called "jostle" and "jostle2"

the Jostle file is 446 lines long the Jostle2 file is 241 lines long

differences I can see:

Jostle - functions

Jostle2 - functions

Removing jostle2 doesn't resolve the issues, clearing the chocolatebar saved variables doesn't appear to resolve the issue. turning off 3rd party addons don't seem to fully resolve the issue as it comes back as soon as you turn them back on, it seems to move to another addon when I delete the ones called out in the error message, and there is still the default blizzard module "Blizzard_ExpansionLandingPage" being invoked in the error.

Kiatra commented 1 year ago

Yes there are two jostle files that is intended used in retail and one in classic.

What exactly do you mean with "it seems to move to another addon when I delete the ones called out in the error message,"?

karenlk commented 1 year ago

Hi - Sorry I haven't had time to test this. Which jostle goes with retail and which for classic? That is the error I am seeing, relating to it trying to use jostle2, but if jostle2 is only for classic, that could be why it's not loading. But like I said, I haven't had time to test, been super busy with work and some traveling. Thanks! Karen

On Wed, Jan 25, 2023 at 8:39 AM Kiatra @.***> wrote:

Yes there are two jostle files that is intended used in retail and one in classic.

What exactly do you mean with "it seems to move to another addon when I delete the ones called out in the error message,"?

— Reply to this email directly, view it on GitHub https://github.com/Kiatra/ChocolateBar/issues/26#issuecomment-1403814610, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQT4R6IEQE5YAXZMI3YYF3WUFCKJANCNFSM6AAAAAAS7BZQFM . You are receiving this because you were mentioned.Message ID: @.***>

Kiatra commented 1 year ago

They are both loading for classic and retail as they are in the listed in the pom. Its only that depending on the game version on or the other will be used. You do need to quit the game once since the last update but I assume you have done this since then.

In my testing it worked out all well so far in retail and classic. I am still not sure why you get the issue.

fraerie commented 1 year ago

When I turn off any of the addons listed in the error message, the error message starts reporting virtually the same error but for different addons. So I end up with basically the same number of addons reported, it just works it's way down the list. One of the common threads - other than Jostle - seems to be the Ace3 lib.

fraerie commented 1 year ago

Digging into it further - the sections it's triggering in Ace3 is the following:

Line 66 in function at Line 61

local function safecall(func, ...)
    -- we check to see if the func is passed is actually a function here and don't error when it isn't
    -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not
    -- present execution should continue without hinderance
    if type(func) == "function" then
        return xpcall(func, errorhandler, ...)  <- this line
    end

Line 523

    safecall(addon.OnEnable, addon)

Line 626 in function at Line 611

local function onEvent(this, event, arg1)
    -- 2020-08-28 nevcairiel - ignore the load event of Blizzard addons which occur early in the loading process
    if (event == "ADDON_LOADED"  and (arg1 == nil or not BlizzardEarlyLoadAddons[arg1])) or event == "PLAYER_LOGIN" then
        -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
        while(#AceAddon.initializequeue > 0) do
            local addon = tremove(AceAddon.initializequeue, 1)
            -- this might be an issue with recursion - TODO: validate
            if event == "ADDON_LOADED" then addon.baseName = arg1 end
            AceAddon:InitializeAddon(addon)
            tinsert(AceAddon.enablequeue, addon)
        end

        if IsLoggedIn() then
            while(#AceAddon.enablequeue > 0) do
                local addon = tremove(AceAddon.enablequeue, 1)
                AceAddon:EnableAddon(addon)  <- this line
            end
        end
    end
end
Kiatra commented 1 year ago

When I turn off any of the addons listed in the error message, the error message starts reporting virtually the same error but for different addons. So I end up with basically the same number of addons reported, it just works it's way down the list. One of the common threads - other than Jostle - seems to be the Ace3 lib.

My guess is that you have a different version of Ace3 loaded than I do when we do the testing. Usually each addon loads the Ace3 lib that it was packaged with but only one will remain in memory. This is handled via LibStub.

One of the addons you have has an embedded Ace3 lib that is tied to the the issues. To find the one it is, try to disable all and turn them on one by one until you see the error.

fraerie commented 1 year ago

So what version of Ace3 are you testing with? So I can check and see what version is being used by other mods.

The last 'release' version is this one - https://www.wowace.com/projects/ace3/files/4040413 The most recent is from 5 days ago and is this one - https://www.wowace.com/projects/ace3/files/4368349

karenlk commented 1 year ago

ok I am back home and finally able to test this.

I renamed my AddOns folder, made a new empty one and copied the following Addons into it: !BugGrabber, BugSack, ChocolateBar (need the BugGrabber/Bugsack to catch the errors)

I renamed the WTF folder to totally remove any/all saved variables. So everything should be fresh and clean.

Started the game, logged in and still getting these 2 errors:

1x ChocolateBar/Core.lua:234: attempt to compare nil with string [string @./Core.lua"]:234: in function `isNewInstall' [string @./Core.lua"]:104: in function <ChocolateBar/Core.lua:94>

[string @./libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:61> [string @./libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:494: in function `InitializeAddon' [string @.***/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:619: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:611>

1x ChocolateBar/Core.lua:387: attempt to index field 'ChocolateBar1' (a nil value) [string @./Core.lua"]:387: in function `EnableDataObject' [string @./Core.lua"]:334: in function `LibDataBroker_DataObjectCreated' [string @.***/Core.lua"]:158: in function <ChocolateBar/Core.lua:156>

[string @./libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:61> [string @./libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:523: in function EnableAddon' [string ***@***.***/libs/AceAddon-3.0-13/AceAddon-3.0.lua"]:626: in function <...dOns/ChocolateBar/libs/AceAddon-3.0/AceAddon-3.0.lua:611> [string "=[C]"]: in functionLoadAddOn' [string @./UIParent.lua"]:544: in function `UIParentLoadAddOn' [string @./UIParent.lua"]:753: in function MajorFactions_LoadUI' [string ***@***.***_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:100: in functionSetUpMajorFactionList' [string @._ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:93: in function `RefreshMajorFactionList' [string @._ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:88: in function RefreshOverlay' [string ***@***.***_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:80: in function <...sionLandingPage/Blizzard_DragonflightLandingPage.lua:76> [string "=[C]"]: in functionCreateFrame' [string @._ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:49: in function `CreateOverlay' [string @._ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:63: in function `RefreshExpansionOverlay' [string @.***_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:35: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:33>

On Wed, Jan 18, 2023 at 10:24 AM Kiatra @.***> wrote:

I could not reproduce the error yet. Even with a fresh install.

Can you try to backup the saved variables of ChocolateBar and then delete them and try then with just this addon enabled?

To temporary delete the saved variables quit the game then move the File .../World of Warcraft/retail/WTF/Account//SavedVariables/ChocolateBar.lua and ChocolateBar.lua.bak to another location (your Desktop) and start the game again.

Do not forget to disable all other addons.

— Reply to this email directly, view it on GitHub https://github.com/Kiatra/ChocolateBar/issues/26#issuecomment-1387446657, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQT4R6UNXJGWK6CMEJTWALWTARNTANCNFSM6AAAAAAS7BZQFM . You are receiving this because you were mentioned.Message ID: @.***>

fraerie commented 1 year ago

Ace3 has been updated for 10.0.7 https://www.wowace.com/projects/ace3/files/4450770

still getting this error from ChocolateBar and still finding a number of modules don't load even though they are set to 'enabled' unless you turn them off and on again - they stay active until you next reload the UI.

Kiatra commented 1 year ago

I am using the the latest release version of Ace3 from Oct 22, 2022. I will try CB with the latest alpha of Ace3 and see if I can reproduce the issues mentioned here.

Edit: @fraerie Just installed the Ace3 version you linked (https://www.wowace.com/projects/ace3/files/4450770) and did not get any errors on login.

Kiatra commented 1 year ago

@karenlk

1x ChocolateBar/Core.lua:234: attempt to compare nil with string
[string ***@***.***/Core.lua"]:234: in function `isNewInstall'
[string ***@***.***/Core.lua"]:104: in function

This is fixed with the latest 3.10

fraerie commented 1 year ago

There are two Mainline.toc files

  1. ChocolateBar_Mainline.toc
  2. ChocolateBar-Mainline.toc

In order to stop the CB_playedtime error I had to comment out the modules in the second file. I noticed that it also didn't have the jostle2 module listed, whereas the first toc file did. When I added the jostle2 module to the list it stopped throwing the jostle error that's been bugging me since 10.0.5

karenlk commented 1 year ago

In order to stop the CB_playedtime error, I did this in CB_PlayedTime_Options.lua

local version = "" --GetAddOnMetadata("CB_PlayedTime","X-Curse-Packaged-Version") or ""

I realize it doesn't really fix anything, but just bypasses whatever is wrong with GetAddOnMetadata

On Thu, May 4, 2023 at 9:04 PM fraerie @.***> wrote:

There are two Mainline.toc files

  1. ChocolateBar_Mainline.toc
  2. ChocolateBar-Mainline.toc

In order to stop the CB_playedtime error I had to comment out the modules in the second file. I noticed that it also didn't have the jostle2 module listed, whereas the first toc file did. When I added the jostle2 module to the list it stopped throwing the jostle error that's been bugging me since 10.0.5

— Reply to this email directly, view it on GitHub https://github.com/Kiatra/ChocolateBar/issues/26#issuecomment-1535638387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQT4R6G4HWKAGTZ4XKT4BLXERU5NANCNFSM6AAAAAAS7BZQFM . You are receiving this because you were mentioned.Message ID: @.***>

Kiatra commented 1 year ago

that is fixed in the latest version