[Bug Report] Bug on log in
karenlk opened this issue · 22 comments
What game version did the bug occur in?
Retail
Troubleshooting
- I have verified that ChocolateBar is up to date.
- I have tried to reproduce the bug with no other addons loaded.
- I have verified that the issue hasn't yet been reported.
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>
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 function
UpdateJostle'
[string "@ChocolateBar/Bar.lua"]:90: in function UpdateAutoHide' [string "@ChocolateBar/Core.lua"]:505: in function
UpdateBars'
[string "@ChocolateBar/Core.lua"]:160: in function <ChocolateBar/Core.lua:156>
[string "=[C]"]: ?
[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 function
LoadAddOn'
[string "@ArkInventory/Core/ArkInventory.lua"]:11540: in function LoadAddOn' [string "@ArkInventory/Core/ArkInventory.lua"]:11556: in function
BlizzardAPIHook'
[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 function
RefreshMajorFactionList'
[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]"]: ? [string "=[C]"]: ? [string "=[C]"]: in function
CreateFrame'
[string "@Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:49: in function CreateOverlay' [string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:63: in function
RefreshExpansionOverlay'
[string "@Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:35: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:33>`
@karenlk Do you have ArkInventory as well?
Looking at it - it looks like it's an interaction with the Ace library - which is used by multiple addons.
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
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.
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.
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
- function ChocolateBar:IsRetail()
- function JostleFrame:Schedule(time)
- <-- this is where the JostleFrame:UnregisterAllEvents() sits but it doesn't seem to be nested in a function. Lines 86 to 135
- function Jostle:WorldMapFrame_Hide()
- function Jostle:TicketStatusFrame_OnEvent()
- function Jostle:UIParent_ManageFramePositions()
- function Jostle:PlayerFrame_SequenceFinished()
- local function LockMainMenuBar()
- function Jostle:UNIT_EXITING_VEHICLE()
- function Jostle:UNIT_EXITED_VEHICLE()
- function Jostle:PLAYER_ENTERING_WORLD()
- function Jostle:PLAYER_REGEN_ENABLED()
- function Jostle:PLAYER_REGEN_DISABLED()
- function Jostle:WorldMapFrame_Hide()
- local function GetScreenTop()
- local function GetScreenBottom()
- local function UpdateBottom()
- local function UpdateTop()
- local function Adjust()
- function Jostle:RegisterBottom(frame)
- function Jostle:RegisterTop(frame)
- function Jostle:Unregister(frame)
- function Jostle:ProcessQueue()
- function Jostle:PLAYER_CONTROL_GAINED()
- local function isClose(alpha, bravo)
- function Jostle:Refresh(...)
Jostle2 - functions
- function Jostle2Frame:Schedule(time)
- function Jostle2:PLAYER_ENTERING_WORLD()
- local function GetScreenTop()
- local function GetScreenBottom()
- function Jostle2:RegisterBottom(frame)
- function Jostle2:RegisterTop(frame)
- function Jostle2:Unregister(frame)
- function Jostle2:ProcessQueue()
- function Jostle2:PLAYER_CONTROL_GAINED()
- local function isClose(alpha, bravo)
- function Jostle2:Refresh(...)
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.
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,"?
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.
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.
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
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.
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
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.
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
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.
There are two Mainline.toc files
- ChocolateBar_Mainline.toc
- 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