BagSync

BagSync

3M Downloads

Bagsync freezes guild bank

Caliban77 opened this issue ยท 72 comments

commented

I have my own guild banks on different realms for auction-housing, full of battle pets. Since the second pre-patch, any time I open one of my guild banks, the game freezes for a number of seconds. This happens even after the addon says 'guild bank sync is completed'. Also, any time I take an item out of the guild bank or even put an item in, the game freezes for a few seconds.

commented

So far right now it's as follows for the debugging version.

  1. Check Battle Pet by name, if found then return SpeciesID
  2. Check Battle Pet by itemTexture, if only 1 is found then return SpeciesID
  3. If multiple Battle Pets share the same itemTexture, then try to search by tooltip scanning. If found then return SpeciesID.
commented

So I tried the version and what happens is that, after opening a guild bank and the scan is finished, the game freezes for 15 (!) seconds, after which it's okay. This happens on all realms, and also again if I re-log the same character and open the guild bank.

commented

Darn, well it was worth a shot.

commented

Just replace it with the live version then.

commented

Done. Was worth a shot!

commented

https://www.curseforge.com/wow/addons/alreadyknown

This addon tracks pets already known apparently.

commented

Aww, I really appreciate you looking into that :) Unfortunately it doesn't do exactly what I need. In fact, I actually HAD the exact addon I wanted, and Gello, the author of THE pets addon 'Rematch', made me exactly that addon. In the thread below you can even see his 9.1.5 version of it, in terms of the code for it. He's extremely busy these days though so it seems he may not get to looking into it, and with those weird changes you explained that Blizz made regarding battle pets in banks, the addon may not work at all anymore anyway.

https://www.warcraftpets.com/community/forum/viewtopic.php?f=19&t=18994&p=148098#p148098

(If you're curious)

At any rate, I appreciate you still taking the time to look for a solution for me, and if in the future you need me to test stuff out for you for your addon, don't hesitate to ask! (I play on both a new Macbook Air and last year's Mac, so that might be of interest to you too).

commented

No problem :) Please note I have provided an option in the latest version 17.6 to allow folks to select if they want accurate scanning of Battle Pets. Including an explanation in the BagSync FAQ section. This option is enabled by default. For you however, you would want to turn this option off. That will make it exactly the same way it was before for you by just using the iconTexture. This will slightly be inaccurate again as I've pointed out.

commented

That's awesome. Thanks once again! :)

Kris

commented

Hmm thanks that gives me a bit of an idea. I'll see if I can reproduce the issue. I've already loaded your BagSync data but I'm not getting that delay. So it could be something else that I can trigger it. This may take some time.

In terms of the video the simplest solution would be to use https://wormhole.app/ to upload it. Hehehe I can understand that you are restricted in internet speeds. XD I can't imagine how crappy of a connection you must have to have a hard time uploading 80MB. It must be horrendous ๐Ÿ˜† Thank you for your patience as I try to figure this out.

commented

I gave it another try and it worked! It IS shitty quality but I had to compress it of course. Hope it still helps a bit. I mention the "beachball of death" which the cursor is supposed to turn into when the whole thing freezes, but that ball funnily enough got lost in the compression and it still shows as the regular wow curssor; but believe me, it turns into a ball, lol.

And than YOU for the patience :)

https://wormhole.app/N6x0b#Zm5PjFeDtJ960_eXahb_Dw

commented

Interesting... so the guild bank works fine for a few seconds BEFORE you get frozen. Hmm that is VERY odd.

commented

Correct.

commented

Battle pets are handled differently by WOW than standard items. In fact Battle Pets don't even have ItemID's. They use a Battle.Net ID Identifier instead. To combat this BagSync and other addons create FakeID based on the battle pets speciesID and other factors. So each time it has to process and create a FakeID for those items or at least parse the FakeID's. I never figured there would be several guildbanks full of them. Regardless if you are having the issue only now, that means something must have changed within the WOW Client.

Could you please provide me your BagSync.lua file from your WTF/Account/SavedVariables folder? That way I can dummy load it on my end and see what you see to try to reproduce the issue.

commented

Indeed it is a problem only now; before a few days ago Bagsync didn't freeze any of my guilbanks and correctly showed the inventory across the realms from all those guild banks.

I tried drag/dropping the .lua file in here but it says it doesn't support the file type. Can I mail it to you? Or share it some other way? Sorry for the hassle.

Kris

commented

Indeed it is a problem only now; before a few days ago Bagsync didn't freeze any of my guilbanks and correctly showed the inventory across the realms from all those guild banks.

I tried drag/dropping the .lua file in here but it says it doesn't support the file type. Can I mail it to you? Or share it some other way? Sorry for the hassle.

Kris

Of course! No worries yeah sometimes GitHub can be a pain. You can do it two ways. You can zip it up and then attach it here. Which honestly would be the easiest way. The other way is to use file transfer services.

https://filetransfer.io/
https://wormhole.app/

commented

Here you go; hope this helps!
BagSync.lua.zip

commented

Thanks! I'll see if I can reproduce the issue. It's sometimes hard to do in scenarios like these because of different PC performance and other factors. But hopefully I can get the same issue you have and sort it out for you.

commented

Just to be DOUBLE sure when I check this out later. This only happens when you OPEN the guild bank and CLOSE it right? Only the guild bank no where else? The tooltip information still displays properly for item counts yes?

commented

Basically everything (the whole game) freezes after about three seconds after I open the guild bank. This lasts about ten seconds, but then ANY time I click on something in the guild vault in order to put it in my bags, it freezes again. Also, the tooltip doesn't seem to give any info about any pets in any of my other guild banks on other realms. It also freezes when I click on a different tab in the guild bank. When I close the guild bank, everything is fine again.

PS: I made a little video of the issue but even compressed to 80mb I'm having trouble using one of the two services you linked for file transfers, because I'm in Africa atm (for work) and the internet is shite :P But I hope this helps, and let me know if you have more questions.

commented

Only guild banks, yes.

Weird, I opened "scanner.lua" and did a search for "local tooltipData" in order to find the lines you wanted me to remove, but the line (or any other of the lines) does not appear to be there... So I can't replace it.

commented

It's in the debug version I gave you above. Make sure you follow those steps above one at a time. Don't do both at the same time.

commented

Sorry, internet went down but it's back up. Gonna try it now.

commented

I did it with removing the first part; it scans the tabs, and on the final tab it does freeze for a few seconds, but after, it seems fine. Did this on three out of my five realms/guild banks, always with the same result. Should I still remove the second part too? Technically I can live with the initial delay, but if we can get rid of this too, why not. What do you think?

commented

Spoke too son; on the fourth guild bank, I got major delays again. I'll try removing that other part.

commented

Done, but still it freezes.

commented

Okay, so now I went back to the lua file in the debug version of the addon which I'd previously copied into the WoW folder and which I'd edited by removing lines you asked me to remove. I open it again and do a search for "scannerTooltip:Hide()" to pinpoint the second part I need to delete... and the search result is zero. And, again, this IS the debug version now.

commented

I just downloaded the debug version again from above and opened up "scanner.lua" from wireframe. The lines are there. It's lines 232 and 233. You can do a search for SetGuildBankItem instead.

commented

Remember you have to remove both parts above in order to test it out fully. ๐Ÿ˜„

commented

Strange. I'll redownload it, remove both sections, and put the debug version back into the addons folder. Hold on.

commented

Okay so it's pretty much what I figured. It's the server response to get the speciesID for the Battle Pet. This is completely out of my hands. I will give a brief background to give you some insight.

Blizzard does not handle Battle Pets the same way in Guild Banks. In fact they don't even have a itemID. When you hover over it, it will display the Battle Pet tooltip, but in reality the item itself in the Guild Bank is stored as a "Pet Cage" with an itemID of 82800 and that's it. It doesn't allow me to get any information in regards to the Battle Pet while it's in the guild bank.

Here you can test this yourself. Chat Link (meaning shift+click as if you are linking an item in chat) a pet you have in the Guild Bank. Click on the link and you will see it's labeled as "Pet Cage". https://www.wowhead.com/item=82800/pet-cage

So in order for me to generate a proper Battle Pet fakeID. I have to first ASSIGN the item in the guild bank to a fake scanning tooltip. This triggers a request from the server for the information. It then returns information in regards to the tooltip, including the Battle Pet speciesID. Then I can grab that information and create a fakeID using that. But that requires me to do a request from the server for EVERY battle pet that is in the guild bank. So you can imagine, this causes a delay. I didn't anticipate a person to have as many Battle Pets in the guild bank across multiple characters.

Blizzard has completely revamped Tooltips and how addons access them when they released 10.0.2. This is what broke so many addons that rely on Tooltip data. In general they no longer return the SpeciesID that I require with just a simple tooltip call. Instead I have to assign it then use their tooltip data parser to grab the information. This causes a delay again because I have to request the information from the server.

My hands are sort of tied here as I'm limited to what code and functions blizzard provides to interact with the Guild Bank. In general there isn't much I can do when they return an idiotic itemID of 82800 or "pet cage" for a Battle Pet that is stored in the guild bank. I have NO idea why they do this practice as it would be just easier to send the SpeciesID for addon authors to use.

That ONLY other thing I can do is do a search through ALL the pets by their textureID. Meaning the icon textureID that is assigned to the Pet. There is a slight problem though, this could be extremely inaccurate. What if multiple pets with different names share the same textureID? Then it would be inaccurate as it would be grabbing the first speciesID that matches the textureID regardless. This is technically the only other resource I have to try to scan the battle pets in the guild bank.

So the options are try the texture trick I mentioned or put up with the lag until Blizzard gives addons authors better control of the guild bank data. Your case is EXTREMELY rare and unique as I have not come across or anticipated someone having as many Battle Pets as you have.

If you would like to try the TextureID method let me know and we can give it a go and see if you still get lag. Though remember this "may" (i'm not entirely sure) be entirely not accurate. But it's worth a shot.

commented

Huh? That makes no sense as it's not really parsing any battle pet information if you removed all the lines above. it's as if it was the original and initial actions I had you to remove? I'm so confused now. I'm SUPER baffled now.

This this scanner.lua
scanner.zip

commented

MAYbe I did something wrong? Though I don't think I did...

Do you want me to put the scanner.lua you just linked into the wireframe folder?

commented

yes please ;) The reason I'm baffled is the changes I did are similar to the instructions I had you follow here: #195 (comment)

Please try the scanner.lua I gave you above. I think from now on I will just provide you the changes myself rather than have you do it. JUST in case hehe

commented

Hehe, sounds good. I TOLD you I'm like an old digitally illiterate grandma!

commented

Done. No delays at all.

commented

Well, THAT seems to work, no delays and it shows the guild vault data cross-realm! I've tested it only with a few pets, but this is already much better even IF it won't potentially be always accurate. Thanks!

commented

Thanks for the explanation. Yea, I'm quite the exception with my battle pets, lol. Anyway, I'm up for it but only if you're wanting to do this. You've already invested a lot of time into this exceptional situation. I'm also about to fly home to Amsterdam tonight so we'd have to look into it tomorrow. What do you think?

commented

This is the textureID method to try to see if I can get the SpeciesID from the Guild Bank. You can try this version if you like and see if you still get the lag. Like I said, I cannot promise you it will be accurate. But it's worth a shot to try to see if it will help. I really wish Blizzard would just pass the actual Battle Pet information in the guild bank rather then a generic "Pet Cage" with an itemid of 82800

BagSync.zip

just replace your entire BagSync install with the one in the zip.

commented

What do I do when you release new versions though? I can't (and don't!) expect you to make me custom versions every time of course. Can I just copy a lua or something, in the future?

commented

I need to do some more further changes. But I will push that version instead and just deal with the occasional person telling me if something is inaccurate with Battle Pets in the guild bank ๐Ÿ˜† . I need to make some more adjustments across the board to fully implement that. Don't worry I'll push that version live.

commented

Well, thanks a lot for your patience and time, dude. I really appreciate it!

commented

Btw, not sure if this is of value to you but I found a case where it seems to be weird; some pets it shows now as being in guild banks on different realms, which is great. On one occasion I just found though, the pet 'Ragepeep' I have four of in my guild bank, and those four do not show up on the tooltip... even though they do show up on TSM's tooltip! (This of course concerns data checked on one realm; TSM apparently can't show cross-realm data like your addon can, or like Altoholic could before it got all messed up recently). Anyway, this still works for me much better than it did, so it's no big deal; just thought this info might help somehow.

commented

You would still need to scan ALL you characters again. Remember I changed the way that Battle Pet FakeID's are generated by my addon. So you have to record the new method for ALL your characters by logging in and scanning them with the new updates. Then it should be a little more accurate.

I'm still working on some of those changes. There is two other tickets I need to handle then I will push the live version with the changes to this one that we worked out together.

commented

Don't forget there is a SLIGHT possibility of inaccuracy if multiple pets share the same textureID icon. Nothing I can do there :(

commented

I pushed the changes to the repository but haven't pushed it live yet.
2ca1f2a

commented

Gotcha. Thanks again!

commented

Another thing I just noticed; I was just auctioning on a realm where my guild bank has only one half full tab (as opposed to the one I sent you the video of, which had all tabs almost entirely full) and there IS a delay here, but only of about a second per action (so taking something out for example).

commented

I may have you test out Debugging versions of BagSync to see if we can pinpoint it. I've been trying to replicate it and it just won't do it. So it has to do with having the actual items in the bank themselves when they get processed rather then having them stored in the DB.

What I could do is create a BagSync version that DOESN'T store any pets when you use the bank to see if it's the Pets themselves while being parsed that is creating the issue. Instead of us trying to go straight to the overall guild bank scan. If we can pinpoint the issue then we can see where the delay is actually occurring.

A few things to test would be the following.

  1. Guild Bank scan
  2. Pets being parsed via code. (FakeID generation).
  3. Pets being recorded in the DB.
  4. Delay from Blizzard server for Guild Bank contents being sent to the client (yes this can happen)
  5. A bug in the timer module that is parsing the guild tabs at 0.5 second intervals. Perhaps a longer delay must be done now.

I recommend also that you have the guild bank scanning alert window enabled in the BagSync options. That way we can see if the tabs are being scanned properly and if the issue is after the actual scans.

Though my first priority would be to rule out the Battle Pets themselves.

commented

I'm totally up for helping out any way I can, but you'll have to guide me like I'm your digitally illiterate grandma, hehe. So yeah, tell me exactly what you'd like me to do, step by step, and I'll do it.

Also, I've been thinking; would it be worth it trying to download a previous version of the addon? Or will that cause problems in the future anyway?

commented

I'm totally up for helping out any way I can, but you'll have to guide me like I'm your digitally illiterate grandma, hehe. So yeah, tell me exactly what you'd like me to do, step by step, and I'll do it.

Also, I've been thinking; would it be worth it trying to download a previous version of the addon? Or will that cause problems in the future anyway?

Downloading an older version will cause errors as it's not compatible with the Dragonflight changes in 10.0.2.

All you really need is Notepad or NotePad++ or ANY basic Text Editor (not Microsoft Word) and you should be okay. I'll guide you step by step.

Lets start with the actual guild bank scanning from the Blizzard server. Ignoring actually parsing and storing the information in the DB. This will let us know if it's an issue on Blizzards end.

Go to your BagSync addon install directory.
WOW/_retail/Interface/Addons/BagSync

Now open up the "wireframe" folder. Find the file called "events.lua" and open that open in NotePad or Notepad++ or whatever text editor you use on your PC. As long as it's not Microsoft Word. Just a plain simple text file reader application will be fine.

Find these two lines.

		-- the bank is ready for reading
		Scanner:SaveGuildBank()

Delete them both and save the file. Then launch WOW and login and use the guild bank. it should still do the scanning process but NONE of the data will be stored in BagSync. We want to rule out the initial guild bank request from Blizzard first before we go to the BagSync parsing of the guild bank.

Let me know if you still get the slowdown.

commented

Done. And no slowdown! Is that good?

commented

Done. And no slowdown! Is that good?

Make sure that the Guild Bank scanning alert window is enabled and it's scanning all the Guild Bank Tabs correctly. It should display a count for each tab. So please verify that ๐Ÿ˜‰

Also yes and no. Yes as we have ruled out the Blizzard Servers. No as it has to do with how BagSync is parsing the data. I suspect it's the Battle Pets. But we will test for it.

You may want to download BagSync manually so you can replace the files you edit back to their original code. Just go here and download v17.3 manually.
https://www.curseforge.com/wow/addons/bagsync/files

You will want to replace the events.lua file with the one from that zip. That way we can undo the file changes we made. The next step would be to check if it's the Battle Pets that are causing the issue.

Open up "scanner.lua"

Find:

					--check if it's a battle pet cage or something, pet cage is 82800.  This is the placeholder for battle pets
					--if it's a battlepet link it will be parsed anyways in ParseItemLink
					if shortID and tonumber(shortID) == 82800 then
						speciesID = scannerTooltip:SetGuildBankItem(tab, slot)
						scannerTooltip:Hide()
					end
					if speciesID then
						link = BSYC:CreateFakeBattlePetID(nil, nil, speciesID)
					else
						link = BSYC:ParseItemLink(link, count)
					end
					table.insert(slotItems, link)

replace with:

					--check if it's a battle pet cage or something, pet cage is 82800.  This is the placeholder for battle pets
					--if it's a battlepet link it will be parsed anyways in ParseItemLink
					if shortID and tonumber(shortID) == 82800 then
						--do nothing its a pet
					else
						link = BSYC:ParseItemLink(link, count)
						table.insert(slotItems, link)
					end

See if that causes a slowdown

commented

Done. It does not cause a slowdown at all, but I took out a 'Blue Flitter' pet and put it into my bags. There are eleven of those still in the guild bank, but that is not represented in the tooltip.

commented
  • Guild bank scanning alert is enabled.
  • There is a count for each tab, and then in the chat it says "guild bank scan complete!"

So that's verified. I'll follow the rest of your instructions and get back to you.

commented

Done. It does not cause a slowdown at all, but I took out a 'Blue Flitter' pet and put it into my bags. There are eleven of those still in the guild bank, but that is not represented in the tooltip.

The information will not be saved during this debugging process. Right now I'm trying to determine what is actually causing the slowdown. ๐Ÿ˜„ Hmm let me see something on my end before we try something else.

commented

Aha, gotcha.

commented

For the time being replace the "scanner.lua" file with the correct one from the zip to undo any changes you have done. I will do some additional research into the issue with the pet parsing before we try something else. I'll get back to you.

commented

No problem. Thanks for all your time and effort btw :) I'm off to bed for now. 'night!

commented

Okay so I changed the way how BattlePets are stored in the BagSync DB. By removing a bit more processing going on with them. Perhaps this will solve the issue. Please note that previous Battle Pets totals will not properly work until you rescan. The point of this debugging exercise is to see if it has fixed the pausing situation. I have a feeling I know what it is and it may be out of my hands.

Try this special debugging version of BagSync and tell me if you still get the slowdown. Perhaps you may want to try logging in to several toons to test.

BagSync.zip

commented

Unfortunately the delay is as bad as it ever was, with this version.

commented

Again it's only in the Guild Bank right?

commented

Open up "scanner.lua"

Remove the following lines.


						local tooltipData = scannerTooltip:GetTooltipData()
						
						--https://github.com/tomrus88/BlizzardInterfaceCode/blob/4e7b4f5df63d240038912624218ebb9c0c8a3edf/Interface/SharedXML/Tooltip/TooltipDataRules.lua

						if tooltipData and tooltipData.battlePetSpeciesID then
							link = BSYC:CreateFakeBattlePetID(nil, nil, tooltipData.battlePetSpeciesID)
						end

Save and try it without that. If it still happens then open up "scanner.lua" again and remove the following lines.

						scannerTooltip:SetGuildBankItem(tab, slot)
						scannerTooltip:Hide()

Save and try it with that and see if you get the slowdown still.

commented

Yeah, I can't for the life of me figure why they do this except for making things difficult for me, lol.

commented

I pushed the new version live. It has the updated code to fix the lag issue. Should be 17.5. Remember you will need to scan all your characters again.

commented

In an effort to try to make things a bit more accurate. I wondered if I could do a fallback to the Tooltip method only when there was a Battle Pet that shared more than one itemTexture/icon. Meaning, if a Battle Pet only has one itemTexture then use that if found. Otherwise if multiple Battle Pets use the same texture, then try the tooltip method instead.

I have programmed that fallback in this debugging version of BagSync. Could you please try this version and see if you get lag? It should be much more accurate if it works.

BagSync.zip

commented

Awesome! Thanks :) I'm back in the Netherlands again, enjoying my awesome internet, hehe. By the way, I'm just wondering, do you know of a way I could, on the icons of pets within my bags, bank and guild vault, have an animation or just a color filter appear to indicate that the pet is learnable? Right now I have to manually hover over every single pet in a guild bank, bank and my bags in order to see if I can put any into my pet collection, which takes FOREVER. If I could see instantly which pets I can learn that would save me an insane amount of time auctioning.

Is that something you could easily write up as an addon? I'd totally be willing to pay you the equivalent of a token's privce in gold, provided of course you're situated in Europe. If me asking you here is inappropriate; I totally understand and consider the question never asked :)

commented

There may be some addons already out there that do that. Search for Battle Pet addons. In general remember that it will have the same problems/restrictions as I have when dealing with the Guild Bank. As it is I already found one inaccurate pet.

Toxic Wasteling shares the same icon as Jade Oozeling. So yeah it's not 100% accurate. I did say that would happen.

I appreciate the offer to pay, but I really don't have time to make a new addon from scratch. Thanks though!

commented

Totally understand, no worries. And indeed there's a few pets with the same icons, but that's no problem for me; I'm still very happy with the solution you came up with :)

commented

No problem. I wish they would at least give us the Battle Pet names. Even in the Guild Bank transaction logs it's listed as "Pet Cage".

commented

Hi there! Just wanted to chime in and say I've made some significant changes on how Tooltips tallies are done and handling of the DB has been improved. I've also made some significant performance enhancements in many of the scanning algorithms. So try giving the accurate guild bank scanning a go in the latest v18.3 version, it could possibly work better for you now with the changes. I can't promise you it will, but it's worth a shot.

commented

Thanks for the work and the heads up; i'll definitely check it out!