4 - Cosplay Error upon Weapon Inspection

What steps will reproduce the problem?
1. Inspect a weapon will often give the error
2. Important that the dressing room frame is not open at the time of inspection

What is the expected output? What do you see instead?
The player will be shown equipping the weapon, as is expected, but an error is also thrown (below).

What version of the product are you using?

Do you have an error log of what happened?
Message: Interface\FrameXML\ModelFrames.lua:311 attempt to index local 'frame' (a nil value)
Time: 08/30/12 16:49:53
Count: 7
Stack: Interface\FrameXML\ModelFrames.lua:311 in function `SetDressUpBackground'
Interface\AddOns\Cosplay\Cosplay.lua:104 in function `Reset'
Interface\AddOns\Cosplay\Cosplay.lua:74 in function <Interface\AddOns\Cosplay\Cosplay.lua:73
[C]: in function `Show'
Interface\FrameXML\UIParent.lua:1738 in function `SetUIPanel'
Interface\FrameXML\UIParent.lua:1582 in function `ShowUIPanel'
Interface\FrameXML\UIParent.lua:1469 in function <Interface\FrameXML\UIParent.lua:1465
[C]: in function `SetAttribute'
Interface\FrameXML\UIParent.lua:2179 in function `ShowUIPanel'
Interface\FrameXML\ModelFrames.lua:259 in function <Interface\FrameXML\ModelFrames.lua:235
(tail call): ?
Interface\FrameXML\ContainerFrame.lua:781 in function <Interface\FrameXML\ContainerFrame.lua:780
[C]: in function `ContainerFrameItemButton_OnModifiedClick'
[string "*:OnClick"]:10: in function <[string "*:OnClick"]:1>
[C]: ?

Locals: frame = nil
fileName = nil
texture = "Interface\DressUpFrame\DressUpBackground-Orc"
(*temporary) = "Orc"
(*temporary) = "Interface\DressUpFrame\DressUpBackground-Orc"
(*temporary) = "Orc"
(*temporary) = nil
(*temporary) = "attempt to index local 'frame' (a nil value)"

Please provide any additional information below.

User When Change
Spiderkeg Sep 06, 2012 at 12:50 UTC Changed status from Waiting to Replied
phyber Sep 05, 2012 at 19:46 UTC Changed status from New to Waiting
Spiderkeg Aug 30, 2012 at 20:52 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Spiderkeg Spiderkeg Sep 13, 2012 at 16:09 UTC - 0 likes

    Oh, very nice find CMTitan... see... I suspected something had changed with the SetDressUpBackground() function, but couldn't find any sound documentation to back up my hunch. I'll integrate this fix into Cosplay on my end and test. I appreciate the reply.

  • Avatar of CMTitan CMTitan Sep 11, 2012 at 23:32 UTC - 1 like

    I haven't done thorough regression testing, in that I haven't recreated the error before trying to recreate the error after the fix. But I took this one from Undress Button ( where it reportedly works.

    Initial testing suggests this works, indeed. I've replaced the SetDressUpBackground() call with:

        local race, fileName = UnitRace("player")
        SetDressUpBackground(DressUpFrame, fileName)

    Credits go to boodaah for his post.

    Last edited Sep 11, 2012 by CMTitan: Plain text better for code
  • Avatar of Spiderkeg Spiderkeg Sep 06, 2012 at 13:52 UTC - 0 likes

    Tested with the cache folder deleted and a completely fresh WTF folder. Tried both the 32-bit and 64-bit clients, and I get the same error if conducted the same way.

    Doesn't always happen with EVERY item, but seems to happen quite often. If the Dressing Room window is already open, the error does not happen. Seems to only occur if you CTRL+Click an item, abruptly forcing the Dressing Room to open.

    I'm not sure what else I can do to test and verify this error to you, and if you are still not receiving the error I'm at a loss.

    EDIT: I tested on another machine and still received the error.

    Last edited Sep 06, 2012 by Spiderkeg
  • Avatar of Spiderkeg Spiderkeg Sep 06, 2012 at 12:50 UTC - 0 likes

    From the part of the code:

    function Cosplay:Reset() SetPortraitTexture(DressUpFramePortrait, "player") SetDressUpBackground() DressUpModel:SetUnit("player") end

    The problem seems to be stemming from "SetDressUpBackground()" of which, when commented out, the addon continues to work fine with no errors. I can't find much documentation on this function to tell if something has changed or not.

    Doesn't have to be a weapon, can be armor too. This is what I'm doing to produce this error, in steps:

    1. Reload UI Fresh 2. Open bags, make sure there's an item that can be worn 3. CTRL+Click that item, the Dressing Room should appear 4. Close the dressing room window 5. CTRL+Click the item again, the Dressing Room should appear, along with the error

    The error seems to begin after the second attempted CTRL+Click of an item to bring up the Dressing Room. This occurs even if Cosplay is the only addon running.

  • Avatar of phyber phyber Sep 05, 2012 at 19:46 UTC - 0 likes

    Just attempted to reproduce this by inspecting weapons on a few of my characters. Control-clicking weapons in my bags, from the inspect frame of my own character and of other characters who were standing around.

    Since I can't reproduce this, I'd suggest disabling all addons except for Cosplay, and seeing if you can still reproduce it. If you can't, enable addons one by one until you find the addon that is interfering. If you find it, let me know and I'll see if I can do anything to work around the issue.


  • Avatar of phyber phyber Sep 05, 2012 at 08:36 UTC - 0 likes

    When you say, "Inspect a weapon", I assume that means ctrl-clicking it to open the dressing room, correct? Which race are you playing as while doing this? Given the variables displayed here I'm guessing Orc or Troll. And finally, are you running any other addons that might be interfering with the dressing room in some way?


  • Avatar of Spiderkeg Spiderkeg Sep 04, 2012 at 23:20 UTC - 0 likes

    Even with the newest update, this error is still persisting.



Last updated
Sep 06, 2012
Aug 30, 2012
Replied - Someone has replied after waiting for more information.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees