andrew6180 / TradeSkillMaster

TradeSkillMaster 2.8 backported to 3.3.5
48 stars 13 forks source link

Post-Scan seems to be buggy #40

Open Nilohim opened 6 months ago

Nilohim commented 6 months ago

Hello there!

I use the addon (latest version) on the Rising-Gods private server (3.3.5a).

While doing a post-scan I noticed that some of the items (1-5%) that are listed in the auction house are not recognized/found and TSM is suggesting to use the normal price, although the items are already in the auction house. There is no seller name listed next to these items, as if they do not already exist in the auction house. But when I check manually within the original auction page they indeed already exist.

I did a lot of testing and it SEEMS to be that Items with the following characters are more often affected than others:

Ää Öö Üü :

But I am not sure about that because some of them are not affected by this although they contain the beforementioned characters.

What I noticed: There are some "issue causer" items. If they are removed from a group, then some of the items that were previously not found and set to normal price will be found and set to the right listing method instead. Even if these "issue causer" items are in a different group they affect the items when the groups are being scanned together.

Some examples that I found. The item left to the arrow will make TSM not find the item right to the arrow:

Lucky Strike Axe (ID 25212) --> Demonslayer (ID 13044)

Schematic: Fused Wiring (ID 32381) --> Schematic: Goblin Jumper Cables XL (ID 18653)

Here are some screen shots. I put only these two items in a group. If I remove the Lucky Strike Axe (picture 2) then the post-scan works as intended.

tsm bug 1 tsm bug 2 tsm bug 4 tsm bug 3

What I already tried:

Nothing helps, which makes me believe that this has to be a bug.

Did anyone else encounter this or does anybody have a solution or suggestion? Help is very much appreciated. If something is unclear I will try my best to provide you with more information.

Thank you very much!

Arcitec commented 4 months ago

Hi, I'm the guy who rewrote a ton of TSM code and fixed about 40 or so bugs last year.

The original TSM authors were absolutely braindead people, who for example hadn't even implemented scanning and market price calculation correctly (literally every version of TSM was completely broken until modern WoW, and nobody seemed to realize that all prices were wrong). They had also re-implemented their own scanning algorithm 4 separate times for each different type of scan, with different bugs in every area of their code, rather than reusing a single, smart scan algorithm.

Their auction scanner code was also an absolute disaster in terms of CPU and memory, and kept crashing for people (due to "out of memory" errors and lots of bugs), which broke people's entire scans and wasted hours of people's times by breaking their scans. I rewrote the auction scanning algorithm to only use 5% as much memory and about 5-10% as much CPU as their old code, which means it doesn't crash anymore.

So, first of all, I can tell you that there are two possibilities here:

  1. Typical Private Server auction API bugs or severe throttling (such as them not returning any results if you do 4 item scans in a row, etc, which will easily happen if you use group scans). This is a strong possibility. If so, it's caused by the server you are on.
  2. Some other bug exists in TSM's code when dealing with player names with weird characters. This is possible too.

Unfortunately, the TSM code is a biological hazard which I will not work on any more. The things I fixed were the most severe, critical, utterly braindead issues in TSM's code. You can check the changelog in my repo's latest release to see just how much was fixed:

https://github.com/Arcitec/TradeSkillMaster/releases/latest

(You may see a button that says "Read more" when you reach the bottom.)

I'm only mentioning this so that you can understand that TSM's old code is dead. It's an utter shitpile. It's a wonder that some of us have spent time on fixing it at all. Personally, I only did it because I could not stand the look of Auctioneer and Auctionator.

But digging in again, to hunt for extremely obscure bugs in some of the worst code ever written by any human? No thanks.

I would be very surprised if anyone else digs in either. But of course, anyone is welcome to have a look around. :)

Your report is high quality. I'd probably ask a bit more about what you mean by "names". Which names? The item names or the seller's names? I'm guessing that it's the latter (non-English player names) that seems to cause it.

Anyway, I spotted this ticket when I came back after a WoW break and decided to check if anyone has worked more on TSM after my patches in March 2023, and I see that nobody's working on it. I'm not surprised. It's pretty much the worst code I've ever seen. It's not a fun, enjoyable task to do anything in this project. All the code is duplicated, things are linked to each other everywhere like spaghetti, there's tons of dead (unused but still existing) code, and all code is broken and extremely unintelligent in pretty much every aspect of the project. It's a wonder it even runs at all. :)

It's a shame too, since TSM did a lot of things right, in terms of ideas, even if their code was garbage. ;)

I often wish that Blizzard managed the official Classic better, since they have access to every modern, well-written addon instead of these legacy piles. But I refuse to pay $15 / month for servers full of bots and toxicity, which Blizzard inevitably wipes 2 years later to move on to the next expansion. Their only true permanent classic realm is Vanilla, and that's such a missed opportunity.

Lastly, all I can do to sum this up is to say: I feel your pain. I wish we weren't "forced" to run these old, dead addons on old WoW clients just to play the most fun expansion of the game. :)

Arcitec commented 4 months ago

Well, something just happened: I saw it for myself for the first time now, and it's almost certainly a Private Server bug or their deliberate configuration choice.

I personally saw it now on the ChromieCraft server:

Workaround:

Real solution:

Arcitec commented 4 months ago

Actually, yes, that's exactly it. The AzerothCore server core has a very old and buggy auction house implementation, which among other things is missing GetAll, missing the ability to search by item level requirement range, and has many other bugs.

There's some work on making it better here, but at a quick glance it only seems to cover fixing the unimplemented GetAll scan, and possibly some other improvements:

https://github.com/azerothcore/azerothcore-wotlk/pull/17644

If you feel strongly about this, you could communicate with their team there and work further on narrowing down any Auction House issues that are experienced.