Closed Hendo72 closed 1 month ago
UPDATE: It wasn't until i started comparing the changes between each release that i realized I have auto-update turned on in Curseforge and I was getting conflicting facts because of it.
This notwithstanding, I still have the error with the new release.
I'm going to start looking into what's causing it.
Thanks for the report and for investigating. I'm out with my family today, so I'll only be able to investigate later tonight, if I'm not too tired from the day out. I'll try my best to solve it soon though.
I think i found where the error is kicking...
When i comment out the if statement block at 4416, the error disappears. Your error lies somewhere within that code block.
** I'll keep an eye on your progress while I go back to working on my own Addon.
Does it still happen if you have no other addons enabled, or is it only with ElvUI enabled? The stack trace mentions ElvUI.
I'm expecting there to be no way to not have AutoGearBestItems
populated yet at the time of hovering over any item buttons, but I guess it can somehow, even though I haven't seen that happen. I will add a guard for that for now and think about how it could happen.
I've released an update. Do the errors go away, at least? If so, what behavior can you observe with the tooltips? Can you show me with /ag debuginfo on
so I can see the maximum amount of information?
Everything seems to be working as intended now. To follow up with your earlier question, the old version was throwing the error with and without ElvUI.
I'll give it a couple days to see if it comes back or the fix broke something else. :)
Thanks. Can you please check various item tooltips with /ag debuginfo on
and let me know if any information looks unexpected to you?
Not seeing anything amiss. I consider this issue resolved.
Well, AutoGearBestItems
being nil
at that time in the first place is a major issue that I haven't anticipated and still don't understand, so I need to fix that. It should never be nil
by the time you're able to view a tooltip.
I'm not sure if this is a side effect, but I ran '/ag scan' and I got this:
Cool, but none of it was equipped.
I still have an open Trinket spot. I ran it twice to see if it was a one-off.
Oh, this is exactly what I need to figure out. There's another issue ticket where other users have reported this behavior, but I still haven't reproduced it on my own character I've been leveling recently. I need as much information as you can give me.
Are you able to /dump AutoGearBestItems[INVSLOT_TRINKET1]
and copy the text output with a chat addon like Prat that lets you copy-paste from the chat? Also /dump AutoGearEquippedItems[INVSLOT_TRINKET1]
and /dump AutoGearActionQueue
might tell me something.
Please do these dumps just after reproducing the issue.
Here's your dump. Do you need anything else?
EDIT: It looks a lot better when I'm editing it. Sorry
Dump: value=AutoGearBestItems[INVSLOT_TRINKET1]
[1]={
bag=0,
score=6.06,
slot=11,
info={
Intellect=6,
isGear=true,
guid="Item-4387-0-4000000569DED60A",
bop=1,
item={
GetItemLocation=
Yes, the other 2 dumps I mentioned in my previous comment would be extremely helpful here. This has equipped=false
, meaning it should have added an action to the action queue to equip it, and that action should have executed PickupContainerItem(curAction.container, curAction.slot)
and EquipCursorItem(curAction.replaceSlot)
, resulting in the item being equipped. It would be nice to see if the action queue is empty and what the AutoGearEquippedItems
has for that slot.
Sorry, i didn't see the other two.
This time when I tried to reproduce, it worked as intended.However, as soon as I did a reload, I was able to reproduce it again.
Dump: value=AutoGearEquippedItems[INVSLOT_TRINKET1]
[1]={
equipped=1,
score=0,
info={
empty=1,
item={
GetItemLocation=
/dump AutoGearActionQueue is too big for the chat window to show.
Thanks for that. I can see that the equipped item is correctly updated as nothing for that slot. Was that true at that time? There was nothing in that slot? If so, the updating of equipped items is working as intended.
However, the fact that AutoGearActionQueue
isn't cleared is a problem. It should be executing and emptying the queued actions, including the equip action. I need to see an element in AutoGearActionQueue, and the first element should be fine, so please try /dump AutoGearActionQueue[1]
after reproducing the issue. I think that should dump the first element in the table.
This may have given me enough information to reproduce the issue myself, too. I'll try to reload UI with an empty trinket slot but a trinket in my bags, then scan. I'll try that later today when I have time for WoW.
By the way, the reason I'm asking for all this is that I've inspected the whole code path for equipping and there's nothing that looks wrong. I've considered all the logic and can't see anywhere that the logic could go wrong, and haven't reproduced the issue myself. So, your help with these dumps is much-appreciated.
I'm out and about right now. I'll see what I can do when I get home in a few hours. I'm looking for a way to show more of my chat. /chatlog doesn't seem to be working. Trying to expand elvui.
It seems odd, but when I logged in I was able to run the scan and it equipped my trinket no problem. Reloading caused it to break.
/ag scan AutoGear: [Chelsea's Nightmare] (6.06) was determined to be better than nothing (0.00). Equipping. Dump: value=AutoGearActionQueue[1] [1]={ action="localupdate", t=326789.33 }
I'm not sure if this is the same issue that we've been looking into. Previously, we were working with an empty slot. This itime it's a lower grade for a higher grade item.
I just did a /AG scan because I had an item that was showing as an upgrade and it's not swapping the item.
It says it did it, but it didn't.
I even tried manually swapping it and then using AG after I swapped back; still didn't work.
It was working fine on this toon until now.
The BoP warning would have been on-screen there. It's a BoP white item, so you'd have to click the BoP confirmation. There's a setting to have AutoGear confirm the BoP warning though.
https://www.wowhead.com/item=57400/gold-dust-belt
Here's the relevant code for this.
elseif (event == "EQUIP_BIND_CONFIRM") or
(event == "EQUIP_BIND_REFUNDABLE_CONFIRM") or
(event == "EQUIP_BIND_TRADEABLE_CONFIRM") then
local rarity = Item:CreateFromItemLocation(C_Cursor.GetCursorItem()):GetItemQuality()
if rarity == nil then return end
if ((rarity ~= 3) and (rarity ~= 4) and (AutoGearDB.AutoConfirmBinding == true)) or
((rarity == 3) and (AutoGearDB.AutoConfirmBindingBlues == true)) or
((rarity == 4) and (AutoGearDB.AutoConfirmBindingEpics == true)) then
EquipPendingItem(arg1)
end
This basically means that if you enable "Automatically confirm binding for non-blues/non-epics", the BoP warning will be confirmed and the item will be equipped. Do you have that setting enabled?
There is no BoP confirmation because it's a quest reward for Gold Dust Exchange.It was working for every other item I've gotten the same way.
Oh yeah, my comment makes no sense now that you mention that. It wouldn't have a binding confirmation on equipping. I'm not sure what I was thinking. How strange.
I can't reproduce this. I don't know why it gets messed up for you, but I haven't been able to reproduce it even once in my questing in the past 2 weeks.
I have disabled every addon except AG and Bugsack and I'm getting the same result.
I tried reinstalling and same result.
I even went nuclear and deleted everything with no success.
For some reason, it says it's equipping the items, but it doesn't.
I've tried tracing the code to see what might be stopping it from equipping the items. Save me some time by telling where in the code is the item actually equipped.
It's in AutoGearMain
.
PickupContainerItem(curAction.container, curAction.slot)
EquipCursorItem(curAction.replaceSlot)
I think I may have stumbled onto something...
I've been in the right area all along. (thanks for confirming.) I'll do some research when I'm done work.
Ok here's where we are at... if I run /ag scan when i first start the game, it works properly. If I unequip the items and run the scan again, it will equip them.
If I reload, it stops working until I restart again
I think the issue is AutoGearItemDataIsGenerallyAvailable. When I restart, it's set to 1 and it stays 1. As soon as I reload, it becomes nil and stays nil until I restart again.
As long as AutoGearItemDataIsGenerallyAvailable is nil, it will go through the motions of doing it, but won't actually equip the items.
What causes the "GET_ITEM_INFO_RECEIVED" event to fire? That's the only way AutoGearItemDataIsGenerallyAvailable gets reset to 1.
This seems to have fixed it.
GET_ITEM_INFO_RECEIVED
is fired after any GetItemInfo
call gets data back from the server. Here's the documentation.
I tried it a few times, and when I reload UI and /dump AutoGearItemDataIsGenerallyAvailable
, I see that AutoGearItemDataIsGenerallyAvailable
is 1 every time. That being said, It's possible I have some other addon that calls GetItemInfo
and I've been relying on it without realizing it. I purposely avoid calling GetItemInfo
in AutoGear since it's not instant if the item is not yet cached and causes a server call every time it's called. Thanks for identifying this. I'm going to refactor AutoGear in a way that it doesn't rely on this to determine initialization readiness.
I did that and committed. Would you mind testing with the latest commit?
It's working now, even after a reload.
These error messages in chat are just because I have debug turned on?
Looks like my logic for displaying that message was incorrect, so that message was just wrong. I've fixed that in the new latest commit. Thanks for pointing that out.
By the way, the reason you were able to see that message at all even though its logic was incorrect was because you have AutoGear's logging verbosity set to 3 ("debug" level), which makes sense if you're figuring out issues. You can set /ag verbosity 1
to make AutoGear less verbose if you want, at least until you see something super messed up again.
If the issues are resolved for you after your next test result, I'll close this and tag a release. So, I'm eagerly awaiting your next message. Thanks for all your help with this stuff.
Not a problem. I appreciate your addon.
Good to flex my skills once in a while.
The boss at WoWPro is pretty good at fixing things before I get to it.
There's no test result in your comment, but you sound positive, so I'm closing this. Please let me know if there are still issues either here or in a new ticket. Thanks again for your help.
Just started getting this NIL error yesterday when i mouseover a slot or a button that references one of the slots.
After checking with Github and doing some test prints, it appears that AutoGearBestItems and info.guid are both nil in this situation.![image](https://github.com/AlexFolland/AutoGear/assets/39675478/d982f10a-87ae-4b93-a54f-d136ba7313bb)
Seems like the issue was introduced with 2024-06-24-release. Error goes away if I rollback to 2024-06-18-release. Upon further investigation, this error is limited to Cata. Vanilla is not effected.