bug 10.1.7
Addonman opened this issue ยท 2 comments
Message: .../AddOns/Krowi_ExtendedVendorUI/Gui/MerchantFrame.lua line 85:
Usage: GetMerchantItemInfo(index)
Debug:
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "=[C]"]: ?
[string "@Interface/AddOns/Krowi_ExtendedVendorUI/Gui/MerchantFrame.lua"]:85: GetMerchantItemInfo()
[string "@Interface/AddOns/Auctionator/Source/CraftingInfo/Main.lua"]:8:
...face/AddOns/Auctionator/Source/CraftingInfo/Main.lua:7
[string "=[C]"]: xpcall()
[string "@Interface/FrameXML/ObjectAPI/AsyncCallbackSystem.lua"]:76: FireCallbacks()
[string "@Interface/FrameXML/ObjectAPI/AsyncCallbackSystem.lua"]:35:
Interface/FrameXML/ObjectAPI/AsyncCallbackSystem.lua:31
Locals:
(*temporary) = defined =[C]:-1
I've been looking into this one. Wall of text incoming...
The moment you get the error, Auctionator tries to cache all item prices on the vendor. It first gets the number of items on the vendor and tries to load the items but item loading is slow so a function is registered to do it when it's finished. This function still relies on the index of the items when the caching has started.
Now, whenever you open the vendor window the first time, the filter is set in the backend to All
and is only on the last time it's called set to your Class / All Specs
. This results on some vendors to return a different number of items. The game can handle unsafe calls so nothing seems wrong but Auctionator is in fact sometimes not seeing all items being cached.
An example is the renown vendor for the Valdrakken Accord in Valdrakken. After a fresh login (only works then), 89 items are returned. Auctionator starts caching all the items but during the caching the vendor updates properly now and returns 83 items (for my class). So, Auctionator thinks it can cache 89 items in a set order but will find different items in the end as only 83 are available. Auctionator solves this in a good way but still miss items.
A small example. On fresh login 3 items are returned A, B and C. Auctionator starts the caching of items with index 1, 2 and 3 here representing A, B and C. Now the vendor updates properly and for example only 2 items are returned A and C. These items have now index 1 and 2. Auctionator's caching is still going and item 1 and asks the vendor API for item with index 1. Item 1 which is A is cached. Now, caching item 2 which is C is also working fine. Now item 3's caching is started but item 3 does not return any valid values so Auctionator ignores it.
Blizz was so smart to return invalid values and no errors and Auctionator was smart enough to catch these.
Now, my addon is not working in a safe way. I index the items locally and return proper data based on the call. This means that when the number of items change, my internal cache changes and sometimes GetMerchantItemInfo
is called with nil
indices resulting in the error you reported.
Solution on my end will probably be to make the calls safe.