WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Crash using texture references (https://www.wowinterface.com/forums/showthread.php?t=53766)

maqjav 06-22-16 11:41 AM

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).


TSquared 06-22-16 01:34 PM

Could you post all the code that reproduces the crash?

Thanks!

maqjav 06-22-16 02:40 PM

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 :confused:


TSquared 06-22-16 03:11 PM

Where is the whole addon?

maqjav 06-23-16 07:56 AM

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.

TSquared 06-23-16 02:39 PM

Thanks for linking that!


We're still not repro-ing it. It's a tricky one.

maqjav 06-23-16 02:56 PM

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.

maqjav 06-27-16 09:49 AM

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.

maqjav 07-07-16 02:05 PM

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.


All times are GMT -6. The time now is 05:37 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI