Toys not found
tflo opened this issue · 21 comments
Somehow GS doesn't find any toys for me anymore (I'm sure it worked at some point in the past).
Example:
Search string corgi
--> it finds pets and mounts and whatnot, but not my "Overtuned Corgi Goggles". Other search strings (e.g. overtuned
) don't work either.
If I use just e
as search string, and then go through the first 50 of the ~800 result pages, I don't see any toy listed either.
Also happens with all other addons disabled. Search filters of the toy box are at default, and "Toys" is selected as provider in GS's settings.
Please let me know if it works when you do this:
- Turn off "Preload Cache":
/reload
- Open the default UI toys section to ensure the game client has loaded the toys before GlobalSearch caches them
- Search for a toy with GlobalSearch
Also, some more information that would be useful if that did work:
/reload
- Does
/dump C_ToyBox.GetToyFromIndex(1)
output a positive number, -1, or something else? - If the previous command output a positive number, does
/dump C_ToyBox.GetToyInfo(C_ToyBox.GetToyFromIndex(1))
output a list of 6 values, or "empty result"? - If step 2 was something other than a positive number, or step 3 was "empty result", open the default UI toys section to ensure toys are loaded, and then repeat step 2 and step 3.
OK, first the straightforward thing:
In every case where GS fails to find toys, C_ToyBox.GetToyFromIndex(1)
returns correctly 184418
, which is the first toy in the collection (Acrobatic Steward).
Now the ugly stuff:
Despite what I said in my first post, it is an addon conflict. The reason why I didn't recognize that is that sometimes it seems to be necessary to open the toy collection after the (addon-clean) reload, to make GS work again. (I found this out thanks to your hint above.)
Unfortunately, I cannot nail it to just one addon. What I found out so far is:
- With WoWthing_Collector loaded, GS's toy search does not work.
- With Can I Mog It loaded, GS's toy search does not work.
- With Altoholic & Datastore loaded, GS's toy search sometimes does not work.
- Perhaps/probably there are more conflicting addons.
I took a closer look at WoWthing_Collector:
The responsible function is Addon:PLAYER_ENTERING_WORLD()
at line 84 in /WoWthing_Collector/Core.lua, and inside this function it is the for loop that iterates through all modules calling their respective OnEnteringWorld()
function successively.
Unfortunately, there is no "toy" module, and I haven't (yet) figured out if there is one particular module that is the culprit.
However, I wrapped the for loop with the module iterations into a 20 seconds C_Timer, and observed the following after reload:
- If GS's preload is not enabled and I wait with the first toy search until after WoWthing_Collector's timer, then toys are not found.
- If GS's preload is not enabled and I wait till after WoWthing_Collector's timer, and then open the toy journal UI and then do a search, it finds toys, but only the ones where I had opened the page (i.e. to make all toys available for search, I would have to scroll through all 47 pages).
- If I start a toy search in the 20s before WoWthing_Collector starts iterating, or if GS's preload is activated (at max speed for testing purposes), then all toys are found for the rest of the session. (Not necessary to open the toy journal.)
After a – brief – test, it seems the behavior in conjunction with Can I Mog It is analogous (doing a GS search immediately after login versus waiting a few seconds).
I hope we find a better solution than putting every conflicting addon on a C_Timer long enough for GS to finish preloading 🥺
Thanks for the detailed response. I narrowed it down to WoWThing_Collector's transmog module. I have no idea why when that module calls C_TransmogCollection.GetAppearanceSources
, the game unloads the toys or something, but I think I see what needs to be done to fix it.
Oh, great. Thanks for continuing the research where I let it down.
I did a search in my AddOns folder and found – in addition to CanIMogIt and WoWThing_Collector – these addons that are also calling C_TransmogCollection.GetAppearanceSources
:
- AppearanceTooltip
- ls_Toasts
- BetterWardrobe
- WowheadQuickLink
So if you can fix or work around the problem, you would probably solve a whole bunch of addon conflicts in one go, some of which would perhaps be difficult to trace if the call is made on demand rather than at login.
(The function is not used by Altoholic/DataStore, so this is probably a different problem. But unlike with CanIMogIt and WoWThing_Collector, the problem is intermittent, and Altoholic is not in good technical shape at the moment anyway.)
Please let me know if it works with all of your addons enabled in the latest alpha.
In short:
Without cache preloading, it seems to work fine. Tested with a smallish addon set, but with all addons that have been mentioned here loaded (incl. Altoholic).
With cache preloading, I got mixed results, and also often getting this error:
15x .../GlobalSearch/SearchProviders/ToysSearchProvider.lua:140: attempt to concatenate local 'name' (a nil value)
15x .../GlobalSearch/SearchProviders/ToysSearchProvider.lua:140: attempt to concatenate local 'name' (a nil value)
[string "@GlobalSearch/SearchProviders/ToysSearchProvider.lua"]:140: in function `GetToyItems'
[string "@GlobalSearch/SearchProviders/ToysSearchProvider.lua"]:113: in function `?'
[string "@Accountant/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:119: in function <...ant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Accountant/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:29: in function <...ant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:25>
[string "@Accountant/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:64: in function `Fire'
[string "@Ace3/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <Ace3/AceEvent-3.0/AceEvent-3.0.lua:119>
Locals:
self = <table> {
GetToyItems = <function> defined @GlobalSearch/SearchProviders/ToysSearchProvider.lua:124
description = "Provides all known toys."
numConsecutiveToysUpdatedCalls = 0
RegisterMessage = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90
UnregisterMessage = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153
ClearCache = <function> defined @GlobalSearch/Internal/SearchProvider.lua:89
category = "GlobalSearch"
toysUpdatedCount = 2
SendMessage = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:59
TOYS_UPDATED = <function> defined @GlobalSearch/SearchProviders/ToysSearchProvider.lua:101
Fetch = <function> defined @GlobalSearch/SearchProviders/ToysSearchProvider.lua:71
RegisterEvent = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90
UnregisterAllMessages = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:174
RefreshCacheAsync = <function> defined @GlobalSearch/Internal/SearchProvider.lua:62
items = <table> {
}
RefreshCache = <function> defined @GlobalSearch/Internal/SearchProvider.lua:46
prevSettings = <table> {
}
UnregisterAllEvents = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:174
name = "Toys"
UnregisterEvent = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153
Get = <function> defined @GlobalSearch/Internal/SearchProvider.lua:39
}
tooltipStorage = <table> {
SetDefaultModuleLibraries = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:363
Enable = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:290
UnregisterAllEvents = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:174
EnableModule = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:328
modules = <table> {
}
GetModule = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:206
IterateEmbeds = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:438
defaultModuleLibraries = <table> {
}
UnregisterChatCommand = <function> defined @Accountant/Libs/AceConsole-3.0/AceConsole-3.0.lua:107
Printf = <function> defined @Accountant/Libs/AceConsole-3.0/AceConsole-3.0.lua:65
tooltip = GlobalSearchHiddenTooltip {
}
SetDefaultModulePrototype = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:405
name = "GlobalSearch_TooltipStorage"
IsEnabled = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:447
orderedModules = <table> {
}
DisableModule = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:346
RegisterMessage = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90
UnregisterMessage = <function> defined @Accountant/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:153
Print = <function> defined @Accountant/Libs/AceConsole-3.0/AceConsole-3.0.lua:50
GetItemByID = <function> defined @GlobalSearch/Modules/TooltipStorage.lua:28
baseName = "GlobalSearch"
GetTooltipClassic = <function> defined @GlobalSearch/Modules/TooltipStorage.lua:75
IsModule = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:213
GetTooltipRetail = <function> defined @GlobalSearch/Modules/TooltipStorage.lua:52
SetDefaultModuleState = <function> defined @Accountant/Libs/AceAddon-3.0/AceAddon-3.0.lua:383
GetTooltip = <function> defined @GlobalSearch/Modules/TooltipStorag
Stopped testing here, as I cannot exclude that the error affects the results.
Initially, I got the error only when preloading the cache. But then I did a stress test without cache preloading, and with all addons in the AddOns folder enabled1 and got the error too. So I really think it would be better to address this first.
Btw, the new toy routine is firing twice according to your debug ouput:
GlobalSearch_Search: Search provider GlobalSearch_Toys fired refresh items
GlobalSearch_Search: Search provider GlobalSearch_Toys fired refresh items
Footnotes
-
Except some incompatible or bugged addons. ↩
Should work now under high load, please try alpha v0.21.2-7-ga2aa067.
On my first try with the new version, something interesting:
- Reloaded with GS (was not loaded in last session on that toon)
- Waited ~20s after login, opened search (cache preloading disabled; most of the "conflicting" addons loaded)
- Got this (never seen, I think) message: GlobalSearch: ToysSearchProvider: Toy list matches previous tick, aborting
- Now I did some searches:
- "zhevra" for Zhevra Lounge Cushion (last toy in the collection): not found
- "acrobatic" for Acrobatic Steward (first toy in the collection): not found
- "corgi" for Overtuned Corgi Goggles (somewhere in the middle): found(!)
Opening the toy journal and scrolling through the pages did not fix it. Reloading did not fix it either.
Maybe a "Rebuild Cache" button (like for the achievements) would be helpful here?
Edit/PS: This was not a high-load stress test with all addons enabled, just a regular, smallish set.
I reproduced your issue and investigated a bit more. I found the issues with my previous approaches, described in 913507b and c704f03. I believe I fully understand the behavior now, so if this doesn't solve it, hopefully it's just a mistake in my implementation. Otherwise, I might just give up for now and disable caching for toys.
Please try v0.21.2-10-gc704f03.
Congrats, it seems you've done it 🥳
Did four tests, and all of them were successful:
- With cache preloading, regular addon set
- With cache preloading, all addons from the AddOns folder loaded
- Without cache preloading, regular addon set
- Without cache preloading, all addons from the AddOns folder loaded
Always waiting till GS's debug messages stopped, then searching for Acrobatic Steward , Overtuned Corgi Goggles and Zhevra Lounge Cushion. Also tried it when GS was not loaded in the previous session.
Many thanks to you!
A thing I thought of:
Preloading the cache seems like a nice idea to me, but why are you doing it right after login? The first 30 seconds or so after login is the absolute rush hour for server queries (item info, quest status, transmog, etc.) and other stuff done by addons or the client. With a good amount of addons loaded, open the event tracer immediately after login, you will be shocked ;-)
I imagine waiting 40, 50 or 60 seconds would only be beneficial. And if the user really starts a search before that, I think he can live with the short delay.
I have it set to run 5 seconds after login right now, but yeah, a bigger delay would probably be better. I think I'll make the default 30 seconds but have it be configurable. I'd rather not make the default too long after login to prevent confusion about FPS drops after the point that the user expects all addons should be done with initialization. The task does pause in combat though, so in combat FPS drops aren't a concern.
Is it just that I never had a properly working preload before due to my conflicting addons, or is the preload (even when set to 1ms) really dragging down my FPS? Or is something wrong or has something changed? I have disabled preload for the time being because it really does have a huge impact.
I don't think it should really be too different. I haven't measured, but I doubt the performance drop from my fix for the toys is significant. I'll add more detailed profiling, but for now, please turn on debug mode, /reload, and post the message with the PreloadCache task stats like the one below.
GlobalSearch_TaskQueue: Finished task PreloadCache after 5.986504 seconds, It was polled a total of 9086 times. The average poll duration was 0.000065 seconds, and the longest was 0.086003 seconds.
OK, did a quick test:
Preload with 1ms Task Queue Time Allocation, and 60s delay to have it well separated from other addons' initialization stuff:
FPS drop peaked at 13 (From my set 50 FPS down to 37.)
This is the debug output:
GlobalSearch_TaskQueue: Ticker is not running, starting it.
GlobalSearch_TaskQueue: Starting task PreloadCache. It was queued 0 seconds ago.
GlobalSearch: ToysSearchProvider: Found 105 toys initially
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 496 toys.
GlobalSearch: ToysSearchProvider: Found 496 toys initially
GlobalSearch_TaskQueue: Finished task PreloadCache after 11.199665 seconds. It was polled a total of 15187 times. The average poll duration was 0.000095 seconds, and the longest was 0.412443 seconds.
GlobalSearch_TaskQueue: The queue is empty. Stopping ticker.
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 496 toys.
So, this seems quite normal and is definitely not what I was experiencing the other days.
I'll keep preload enabled and will observe if I get the massive FPS drop again, under various conditions. Maybe it was another addon collision ;-)
OK, now I had again something that comes a bit closer to what I've experienced the other days:
GlobalSearch_TaskQueue: Ticker is not running, starting it.
GlobalSearch_TaskQueue: Starting task PreloadCache. It was queued 0 seconds ago.
GlobalSearch: ToysSearchProvider: Found 35 toys initially
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 498 toys.
GlobalSearch: ToysSearchProvider: Found 126 toys initially
GlobalSearch_TaskQueue: Finished task PreloadCache after 25.348066 seconds. It was polled a total of 14933 times. The average poll duration was 0.000151 seconds, and the longest was 0.732624 seconds.
GlobalSearch_TaskQueue: The queue is empty. Stopping ticker.
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 498 toys.
FPS dropped from 40 to around 12 at peaks. Still not as worse as the other day but closer. Unfortunately, this was with a different addon set than in the post above, so it seems indeed that I'll have to find conflicting addons once again ;)
This one was worse:
GlobalSearch_TaskQueue: Ticker is not running, starting it.
GlobalSearch_TaskQueue: Starting task PreloadCache. It was queued 0 seconds ago.
GlobalSearch: ToysSearchProvider: Found 45 toys initially
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 511 toys.
GlobalSearch: ToysSearchProvider: Found 511 toys initially
GlobalSearch_TaskQueue: Finished task PreloadCache after 34.772290 seconds. It was polled a total of 15359 times. The average poll duration was 0.000126 seconds, and the longest was 0.532346 seconds.
GlobalSearch_TaskQueue: The queue is empty. Stopping ticker.
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 511 toys.
FPS down to 5.
This is the diff between the addon sets where I get a huge FPS drop, and where the FPS drop is low or negligible:
Addon sets diff
➜ ~ diff -U999 /Users/tom/_Tmp\ ƒ/addons\ small.txt /Users/tom/_Tmp\ ƒ/addons\ big.txt
--- /Users/tom/_Tmp ƒ/addons small.txt 2023-07-10 23:13:41
+++ /Users/tom/_Tmp ƒ/addons big.txt 2023-07-10 23:13:22
@@ -1,127 +1,166 @@
+DBM-Core
+DBM-StatusBarTimers
+DBM-SoundEventsPack
+DBM-VPVEM
Accountant_Classic
ActionBarButtonGrowthDirection
AddonUsage
AdiBags
AdvancedInterfaceOptions
AllTheThings
Alts
AppearanceTooltip
Armory
ArmoryGuildBank
Auctionator
AutoQuestTracker_MkIII
AutoConfirmEquip
BagSync
BankStack
BattlePetBattleUITweaks
BattlePetBreedID
+Battle Pet Daily Tamer
BattlePetCount
Bazooka
Bazooka_Options
+BelowAverageItems
BetterFishing
BetterWorldQuests
BlizzMove
Broker_Calendar
Broker_Everything
Broker_TSMProfile
Broker_Cash
Broker_WorldQuests
BrokerAnything
+BtWQuests
+BtWQuestsDragonflight
+BtWQuestsDragonflightPrologue
!BugGrabber
BugSack
ButtonForge
ButtonForge TFPlugin
BuyEmAll
CanIMogIt
ColorPickerPlus
+CooldownToGo
+CooldownToGo_Options
CopyAnything
CraftSim
+DeathAlert
DevTool
DMFQuest
+DropTheCheapestThing
EasyMail
EditBox-Font-Improver
EmoteLDB
+EnhancedRaidFrames
+ErrorFilter
EventTracker
Executive_Assistant
ExtraQuestButton
FactionAddict
GlobalSearch
+GTFO
GuildBankSnapshots
+HHTD
HandyNotes
+HandyNotes_Dragonflight
+HandyNotes_DragonflightTreasures
+HandyNotes_TravelGuide
HandyNotes_DMF_basic
HandyNotes_DMF_treasure
+HandyNotes_LimitedSupplyVendors
HandyNotes_WorldMapButton
Hekili
ImprovedStableFrame
InProgressMissions
+InFlight_Load
+InstanceAchievementTracker
InteractiveWormholes
+KillTrack
Krowi_AchievementFilter
LargerMacroIconSelection
LastSeen
Leatrix_Maps
Leatrix_Plus
Ace3
LiteMount
LiteMount TF-Enhance
ls_Toasts
M6
+MacroTalk
+MapLine
MasterPlanA
MerchantPlus
+MiniMapLine
MobInfo2
MoveEmAll
MoveIt
SharedMedia_MyMedia
NameplateAuras
NameplateCooldowns
NamePlateKAI
NoAutoClose
+NPCTime
OPie
Paragon
Paste
+PersistentWorldMap
tdBattlePetScript
PetWalker
!PileOfCode
PrettyReputation
+Quartz
+Quartz_School
Quester
QuestsChanged
Rarity
+Rarity_Options
Recent
ReEnhancedStackSplit
Rematch
Rematch_TSMPetValues
SavedInstances
+SellableItemDrops
ServerRestartSound
SexyReputation
SharedMedia
SharedMedia_NoAsianFonts
+Sheepdog
SilverDragon
+SilverDragon_Overlay
SilverDragon_RangeExtender
SimpleAddonManager
SimpleItemLevel
+Simulationcraft
+Skada
Stash
TaintLess
TalentLoadoutBroker
TalentLoadoutManager
TalentTreeTweaks
TalentTreeViewer_Loader
TinyPad
TipTac
TipTacItemRef
TipTacTalents
TokenPrice
TomeOfTeleportation
+TomTom
ToyBoxEnhanced
TradeSkillMaster
TradeSkillMaster_AppHelper
UnlimitedMapPinDistance
Vendor
VenturePlan
VolumeTooltip
WeakAuras
WhatsOnTheMap
+WorldMapTrackingEnhanced
WowheadQuickLink
WoWthing_Collector
WQAchievements
xanAchievementMover
zifPet
ZonePetsList
This means that it is likely that one of the additional addons is involved. (Load-on-demand modules are not listed.)
Any idea or intuition?
I don't know when or if I'll start the undertaking of trying to isolate the culprit(s). I may just go back to using the ad-hoc cache for now. (Maybe I'll find it by accident some day…)
So feel free to close this again; if I find out anything I'll let you know anyway.
Turns out the fix I implemented can be really slow. a843eb8 speeds up fetching toys on retries after the first significantly. Let me know if it's fixed in v0.22.2.
Finally did some tests with 0.22.3 preload, and with the same addon set that previously made the preload unusable, with preload delays between 60 and 90 seconds:
The first one was disastrous, with the FPS down to 5, but the next four were all fine, with an FPS drop between 10 and 20, and not even during the whole preload time. So if I ignore the weird first outlier (maybe TSM's account sync collided with the preload, I don't know), I'd say it's great now!
This is a typical debug output:
GlobalSearch_TaskQueue: Ticker is not running, starting it.
GlobalSearch_TaskQueue: Starting task PreloadCache. It was queued 0 seconds ago.
GlobalSearch: ToysSearchProvider: Found 45 toys initially
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 519 toys.
GlobalSearch: ToysSearchProvider: Found 519 toys initially
GlobalSearch_TaskQueue: Finished task PreloadCache after 24.933100 seconds. It was polled a total of 19919 times. The average poll duration was 0.000083 seconds, and the longest was 0.472446 seconds.
GlobalSearch_TaskQueue: The queue is empty. Stopping ticker.
GlobalSearch: ToysSearchProvider: TOYS_UPDATED stopped firing. Found 519 toys.
The tests were all on the same toon, but in theory there shouldn't be a difference on other toons.
Thank you very much!
(Closing this, hopefully for good this time ;)
PS/BTW: It is really good that you allow the delay to be adjusted over such a wide range. There are other addons with a fixed timer (e.g. Krowi's Achievement Filter seems to do its event checks at 100s), and this makes it possible to avoid collisions perfectly.
Hi.
It turned out that the "first one was disastrous" was not really always the first one only. Rather the other way round, unfortunately.
I didn't report back immediately because I didn't know what the trigger was. And I still do not know, I'm rather wondering why I did get so good results on the day where I posted the above comment, and then no more.
I'm reporting back now not because I want you to optimize the addon even more (if using it with ad-hoc actualization, it's OK for me), but just to let you know that the preload thingy still needs work.
From what I've read from our communications, you are not using many other addons besides Blizz and yours. And my impression was also that your main intent for the addon was to have it used mainly with the Blizz standard config (i.e. no third-party stuff, or as less as possible).
And for that, it works pretty well, I would say.