Caerdon Wardrobe

Caerdon Wardrobe

421k Downloads

Game client crash when vendoring items with CaerdonWardrobe loaded

Arrhae opened this issue ยท 12 comments

commented

This is an odd one. With no other addons except CaerdonWardrobe loaded, I get consistent client crashes when vendoring/buying back items, typically within about 30 seconds. If I disable CaerdonWardrobe I can sell/buyback to my heart's content. The crash dump seems to indicate some sort of rendering issue.

OS: Windows 11 22H2
GPU: RTX 4090 FE
Drivers: 526.98
WoW: 10.0.2.46741
Caerdon Wardrobe: 3.3.3
Sample crash dump: 2022-11-27 18.42.51 Crash - 423272 - Redacted.txt

commented

Further testing with different CaerdonWardrobe versions:
3.2.2: No crash
3.2.3: No crash
3.2.4: No crash
3.3.0: No crash
3.3.1: No crash
3.3.2: Crash
3.3.3: Crash

commented

This points to something in 2354669 triggering the crash.

commented

Bisected the commit, this is my minimum diff that no longer crashes. Something with self.dressUp = CreateFrame("DressUpModel") makes my WoW client very very very angry.

diff --git a/types/EquipmentMixin.lua b/types/EquipmentMixin.lua
index 4e8b0d6..4994a81 100644
--- a/types/EquipmentMixin.lua
+++ b/types/EquipmentMixin.lua
@@ -175,20 +175,9 @@ function CaerdonEquipmentMixin:GetTransmogInfo()
             -- print(item:GetItemLink() .. " is dressable")

             if not self.dressUp then
-                self.dressUp = CreateFrame("DressUpModel")
-                self.dressUp:SetUnit('player')
             end

-            self.dressUp:Undress()
-            self.dressUp:TryOn(itemLink, slotID)
             -- print("CHECKING FOR SLOT: " .. tostring(slotID))
-            local transmogInfo = self.dressUp:GetItemTransmogInfo(slotID)
-            if transmogInfo then
-                sourceID = transmogInfo.appearanceID -- I don't know why, but it is.
-                if sourceID and sourceID ~= NO_TRANSMOG_SOURCE_ID then
-                    appearanceID = select(2, C_TransmogCollection.GetAppearanceSourceInfo(sourceID))
-                end
-            end
         end
     end
commented

Update: Tested on my Steam Deck and it also crashes when CaerdonWardrobe 3.3.2 or 3.3.3 is loaded. Does not crash with 3.3.1.

commented

Oh... also - if you happen to have Debug Mode enabled in Caerdon, can you try and disable it and see if it makes any difference?

commented

Argh - thanks for digging in here! I found some issues where I was generating invalid slot numbers and landed that fix in 3.3.4.

Can you check that version and see if it's still a problem? If so, can you try commenting out just the transmogInfo section and see if it still crashes? If that still does, try additionally removing the "TryOn" line. I'm (unfortunately) not seeing any crashes here, so we'll have to poke a bit. I could remove this addition, but it's pretty critical for identifying items that Blizzard isn't returning appropriate transmog info for.

commented

Debug mode is off in CaerdonWardrobe. All other addons are off. The most reproducible form of the crash on my systems seems to be during the "buyback" process of my testing.

3.3.4: Crash
3.3.4 with transmogInfo commented: Crash
3.3.4 TryOn also commented: Crash
3.3.4 with Undress also commented: Crash
3.3.4 with SetUnit also commented: Crash
3.3.4 with CreateFrame also commented: No crash.

This is my minimum diff that does not crash in 3.3.4:

diff --git a/types/EquipmentMixin.lua b/types/EquipmentMixin.lua
index eb97fe4..45baa3f 100644
--- a/types/EquipmentMixin.lua
+++ b/types/EquipmentMixin.lua
@@ -206,21 +206,12 @@ function CaerdonEquipmentMixin:GetTransmogInfo()
             -- print(item:GetItemLink() .. " is dressable")

             if not self.dressUp then
-                self.dressUp = CreateFrame("DressUpModel")
-                self.dressUp:SetUnit('player')
             end

             if slotID and slotID > 0 then
-                self.dressUp:Undress()
-                self.dressUp:TryOn(itemLink, slotID)
                 -- print("CHECKING FOR SLOT: " .. tostring(slotID))
-                local transmogInfo = self.dressUp:GetItemTransmogInfo(slotID)

                 if transmogInfo then
-                    sourceID = transmogInfo.appearanceID -- I don't know why, but it is.
-                    if sourceID and sourceID ~= NO_TRANSMOG_SOURCE_ID then
-                        appearanceID = select(2, C_TransmogCollection.GetAppearanceSourceInfo(sourceID))
-                    end
                 end
             end
         end

These are the items that I'm repeatedly buying/selling in my test. The crash typically happens after I've bought back 6-8 of the items:
image

commented

This has been my specific testing process on all of my test machines:

  1. Log into WoW with only CaerdonWardrobe enabled and the 10 items in my bags (plus various other items also in my bags)
  2. Hop on Grand Expedition Yak and bring up the vendor, right click each of the 10 items to sell in my bags.
  3. Flip to the Buyback tab and start buying back the items by right-clicking the upper-left item in the buyback window.
  4. On my test computers, in the impacted versions, the crash happens consistently after 6-8 times of right clicking in the buyback window.
commented

I tested on an alt with few things in their bags, and can't reproduce on that character. My main however, I can reproduce 100% of the time.

commented

Haven't been able to repro the crash, but it just dawned on me as to what is likely occurring... working on a fix...

commented

I expect this will be fixed in v3.3.5. Let me know if you're still having problems!

commented

Looks like that took care of it!