Thread Tools Display Modes
12-04-14, 11:32 AM   #1
TrumpetX
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 2
Displaying an image, crashing WoW (Win 64 bit)

I'm displaying an image and it's crashing WoW on Windows 64 bit (I have not tested 32 bit). It does NOT crash on a Mac.

Here is my image:
http://www.wowinterface.com/forums/a...0&d=1417713965

Here is the code:
Code:
    local f = CreateFrame("Frame",nil,UIParent)
    f:SetFrameStrata("BACKGROUND")
    f:SetWidth(256)
    f:SetHeight(256)
    local t = f:CreateTexture(nil,"BACKGROUND")
    t:SetTexture("Interface/AddOns/MyAddon/pvp.tga")
    t:SetAllPoints(f)
    f.texture = t
    f:SetPoint("CENTER",0,0)
    f:Show()

Any help would be appreciated. The exact error varies depending on the timing of the image popping up; however when the full error happens, it's a memory corrupt #132? error. The exact text eludes my memory at the moment. The ErrorData in the wow folder didn't really give me any clues; however, after testing things out, the crash most certainly happens on the above code (I cleared out everything else to just this).


I have also tried t:SetTexture("Interface\\AddOns\\MyAddon\\pvp.tga")

The .tga file was created using Gimp's default settings, 256x256

Thanks
Attached Files
File Type: tga pvp.tga (4.7 KB, 193 views)
  Reply With Quote
12-04-14, 03:19 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Looks like it's an indexed color pallette, Blizzard suggests a 32-bit TGA format. To convert the image using GIMP, you need to open the image, then select Image > Mode > RGB in the menus. Then right-click the image in the layers dialog and choose Add Alpha Channel. Then you can go to File > Overwrite pvp.tga to save it back to your file. The end result should be a 32-bit TGA.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-04-14 at 03:22 PM.
  Reply With Quote
12-04-14, 07:56 PM   #3
TrumpetX
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 2
That was exactly the problem. Thanks! The tutorial I read said that Gimp's default versions were good enough, but I'm going to guess that the black/white image messed it up.
  Reply With Quote
12-04-14, 08:06 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Yep, GIMP's default settings when creating a new image and saving it as TGA do not include an indexed color palette.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-05-14, 03:44 AM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
The palette and RGB modes are in the base editor itself and not in the converter. It's easy to overlook when creating/converting an image. I think GIMP defaults to RGB mode when creating a new image and only switches to palettes when opening an image created as such.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Displaying an image, crashing WoW (Win 64 bit)


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