Thread Tools Display Modes
06-22-16, 11:41 AM   #1
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Crash using texture references

For the last couple of days I've been making different tests with the next code. It draws a line of items in the screen and every icon has a tooltip to show the info of the item.

Code:
local itemFrames = {}

for i=1, MAX_ITEMS_LOOT_BAR do 
	local itemFrame = _G.CreateFrame("Frame", "LootBarItem"..i, mainFrame.LootBar)
	itemFrame:SetSize(20, 20)
	itemFrame:SetPoint("LEFT", (5+16)* (i-1), 0)
	-- icon
	itemFrame.texture = itemFrame:CreateTexture()
	itemFrame.texture:SetAllPoints(itemFrame)
	-- tooltip
	itemFrame:SetScript("OnEnter", function(self)
		if self.link then
			GameTooltip:SetOwner(mainFrame, "ANCHOR_LEFT")
			GameTooltip:SetHyperlink(self.link)
			GameTooltip:Show()
		end
	end)
	itemFrame:SetScript("OnLeave", function(self)
		if self.link then
			GameTooltip:Hide()
		end
	end)
					
	itemFrames[i] = itemFrame
end
This icons are updated from another method every time I find a NPC. I get a list of itemsIDs from a local table and calling to GetItemInfo() I extract the texture and the hyperlink that I use with the previous frames.

Code:
	-- hide previous icons
	for i, itemFrame in ipairs(itemFrames) do
		if itemFrame:IsShown() then
			itemFrame:Hide()
		end
	end

	-- loop recovering 1-9 itemsMax, calling GetItemInfo() and on event GET_ITEM_INFO_RECEIVED:
	itemFrames[i].texture:SetTexture(itemTexture)
	itemFrames[i].link = itemHyperlink
	itemFrames[i]:Show()
Radomnly the client will crash while updating the icons, the most of the times if a tooltip is open (although it does happend with the tooltip close)

Here is the last log I got (If you want it complete let me know).
In this case I had the mouse on top of the first frame (LootBarItem1):

Code:
This application has encountered a critical error:

ERROR #0 (0x85100000) Assertion failure!

Program:	G:\World of Warcraft Public Test\WowT-64.exe
ProcessID:	4428
File:	CSimpleRender.cpp
Line:	792
Expr:	"renderable.GetGXTex() == TextureGetGxTexUnsafe(renderable.m_simpleTexture->GetHTEXTURE())", buffer = "Frame: nullptr, STex: LootBarItem1.texture, R-GXTEX: 0000010ec5ed1b9c, H-GXTEX: 0000000000000000, IsRFallback: false, IsRStub: false, IsHFallback: false, IsHStub: false"
Yesterday this was the error I was getting now and then. After updating to the last build I get this new error more often (it doesn't give much information).


Last edited by maqjav : 06-22-16 at 01:17 PM.
 
06-22-16, 01:34 PM   #2
TSquared
Big Daddy!
Join Date: May 2008
Posts: 527
Could you post all the code that reproduces the crash?

Thanks!
 
06-22-16, 02:40 PM   #3
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
I'm trying to extract a little snippet but I don't make it crash. Like the error is so random I don't know if I will be able to reproduce it without the whole addon.

Tonight it took me almost 30 minutes to see the error again with my addon (here is the screenshot, same error I posted before), for one sec I thought they had fix it with the patch they just released

 
06-22-16, 03:11 PM   #4
TSquared
Big Daddy!
Join Date: May 2008
Posts: 527
Where is the whole addon?
 
06-23-16, 07:56 AM   #5
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Hello TSquared.

Thank you for your time.

Here you can see the code: https://github.com/maqjav/rarescanne...aster/Core.lua

The methods involved are LoadLootBar and LoadItemFrame.
 
06-23-16, 02:39 PM   #6
TSquared
Big Daddy!
Join Date: May 2008
Posts: 527
Thanks for linking that!


We're still not repro-ing it. It's a tricky one.
 
06-23-16, 02:56 PM   #7
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
What I usually do is to fly over frostfire ridge looking for rares npc. It usually crash after locating 9 or 10, but some times it ocurs after one or two. If I can give you more info let me know, perhaps the whole log or more details about my system. I hope you can reproduce it.
 
06-27-16, 09:49 AM   #8
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Hello again.

I've noticed that the bug has changed, now the error is in a different line of "CsimpleRender.cpp"



This time it happened very fast, after 4-5 npc found.
 
07-07-16, 02:05 PM   #9
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Hello, I've been testing it again tonight after the last updates and I couldn't reproduce it, perhaps luck?, perhaps it's fixed? I will keep testing just in case.

Thanks.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Crash using texture references

Thread Tools
Display Modes

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