Thread Tools Display Modes
04-28-10, 06:30 PM   #1
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
Help: Frame:SetBackdrop() "crashes" WoW

i have code like the following:
Code:
local SML = LibStub("LibSharedMedia-3.0")

local backdropTable =
{
	bgFile = SML:Fetch("background", bgName),
	-- edgeSize = 16,
	edgeFile = SML:Fetch("border", edgeName),
	insets = { left = 4, right = 4, top = 4, bottom = 4 },
}

frame:SetBackdrop(backdropTable)
bgName and edgeName are initialized with identifiers for suitable stuff inside of LibSharedMedia-3.0 (and valid references to texture/edge files within the addon space are returned and used). this code fragment is applied to various relevant pieces of nameplates (like the nameplate health bar). this basically works (it doesn't look very good, without an edgeSize value, but it functions).

however, if uncomment the "edgeSize" element of backdropTable, everything looks great... but the WoW Client experiences intermittent hard crashes, when any nameplates are visible. virtually always this will be with an error code of "132" (the (in)famous "#132 crash"). very occasionally (maybe one crash out of 20+), it will crash without any error code whatsoever (the WoW client will just disappear without warning). i can go hours without a crash, or i can crash within a few seconds of entering the game world. the invariant is that nameplates have to be visible.

i think i have narrowed this issue down very tightly, to the "single line of code" that seems to induce the problem: specifying any sort of edgeSize along with any sort of edgeFile (i.e. even an edgeSize of 0 seems to cause the problem). specifying any edgeSize with a edgeFile of "nil" seems to make the problem go away. specifying an edgeFile with no edgeSize seems to make the problem go away. specifying (or not) other pieces of backdropTable (like tile and tileSize) has no effect on the problem.

this problem started specifically with WoW 3.3.3, when Texture:SetTexCoordModifiesRect() was removed.

regardless of the ultimate cause (Blizzard bug, or whatever), i am really just interested in a workaround (if any). but at this point i am stumped. the only thing i can think of to do is disable borders entirely.

if anyone has any ideas, or even just wild guesses, i would be very happy to hear them .
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"
  Reply With Quote
04-28-10, 06:35 PM   #2
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
What are the details of the texture used? I had a crash problem with a 8x8 texture, but with a 64x64 texture it was fixed.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
04-28-10, 06:53 PM   #3
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
edit: had some MPQs already unpacked. the default tooltip border is 128x16 BLP, and the gold and silver dialog borders are 256x32 BLP. i am desperate enough to try converting my TGAs into BLPs, and changing the resolution to 256x32, but i don't have a lot of confidence that any of that will affect this problem .

Originally Posted by nightcracker View Post
What are the details of the texture used? I had a crash problem with a 8x8 texture, but with a 64x64 texture it was fixed.
these are "edge files", actually, not strictly "textures" (though that might not matter if they have somehow become "corrupt"). however, i can get these crashes to happen with Blizzard default border artwork as well (i.e. stuff referenced from inside the MPQs).

one of the edge files i use is the SharedMedia "Roth Square" border (a 128x16 TGA; filename "roth.tga"). the other edge file i use is distributed with Skinner (also a 128x16 TGA; filename "krsnik.tga"). i would have to rummage the MPQs for Blizzard artwork (though i expect they are the same: 128x16, either TGA or BLP). (aside: edge files are normal WoW texture files that must be 8x wider than they are high; described here).

these TGA files appear to be perfectly well formed (as "edge files"). and the artwork itself functions properly... right up until WoW crashes. finally, both of these TGA files "worked" perfectly for many months (years?) before WoW 3.3.3 arrived.
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"

Last edited by acapela : 04-28-10 at 07:01 PM.
  Reply With Quote
04-28-10, 06:57 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
What happens if you use :SetBackdrop() "normally"? (ie, you put the table right in the function instead of passing a variable - same with the file paths)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-28-10, 07:03 PM   #5
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
this code resulted in a #132 crash:
Code:
backdropFrame:SetBackdrop( { insets = { left = inset, right = inset, top = inset, bottom = inset, }, edgeFile = edgeFile, edgeSize = 16, bgFile = texture, } )
i am now testing this code (i.e. same code, just with no edgeSize):
Code:
backdropFrame:SetBackdrop( { insets = { left = inset, right = inset, top = inset, bottom = inset, }, edgeFile = edgeFile, bgFile = texture, } )
this will take a while. given that the crashes are intermittent, proving the negative (by not crashing) can take hours/days.

Originally Posted by Seerah View Post
What happens if you use :SetBackdrop() "normally"? (ie, you put the table right in the function instead of passing a variable - same with the file paths)
i.e. create the table anonymously inline, per the example for Frame:SetBackdrop() on WoWWiki?

i will try that, and update when i have some findings.
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"

Last edited by acapela : 04-28-10 at 07:31 PM.
  Reply With Quote
04-28-10, 07:30 PM   #6
Shadowed
...
Premium Member
Featured
Join Date: Feb 2006
Posts: 387
Originally Posted by acapela View Post
i.e. create the table anonymously inline, per the example for Frame:SetBackdrop() on WoWWiki?

i will try that, and update when i have some findings.
Correct, and also try hardcoding the paths in rather than going through SML.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Help: Frame:SetBackdrop() "crashes" WoW


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off