View Single Post
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