Thread Tools Display Modes
01-03-23, 05:02 PM   #1
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Is anyone able to reproduce this crash bug?

Is it just me or does showing a frame from within a texture's OnEnter cause anyone else's client to crash to desktop if you /reload?

The following XML creates a small dialog frame with a left and right arrow.
  • The left arrow is a Button and if I put the mouse over it and /reload it reloads the client for me as expected.
  • The right arrow is a Texture and if I put the mouse over it and /reload it reliably 100% crashes to desktop for me. Without the typical crash dialog to type what you're doing and send to Blizzard.
  • If I move the mouse off the right arrow, /reload works just fine.
Code:
<Ui>
    <Frame name="TestCrashBug" parent="UIParent" inherits="DefaultPanelTemplate">
        <Size x="200" y="150"/>
        <Anchors>
            <Anchor point="CENTER"/>
        </Anchors>
        <Frames>
            <Button parentKey="CloseButton" inherits="UIPanelCloseButtonDefaultAnchors"/>
            <!-- if this frame is shown from the TestCrashBug.Texture's OnEnter, /reload will crash the client -->
            <!-- but moving the mouse off the frame so this frame is hidden, /reload will not crash the client -->
            <!-- (this behavior is the same if this frame has a different parent and no anchor/size/contents)-->
            <Frame name="TestCrashBugChild" hidden="true">
                <Size x="140" y="40"/>
                <Anchors>
                    <Anchor point="TOP" x="0" y="-32"/>
                </Anchors>
                <Layers>
                    <Layer level="ARTWORK">
                        <FontString parentKey="Text" inherits="GameFontHighlight" setAllPoints="true"/>
                    </Layer>
                </Layers>
            </Frame>
            <!-- if I /reload when the mouse is over this, reloads fine -->
            <Button parentKey="Button">
                <Size x="50" y="50"/>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" x="20" y="16"/>
                </Anchors>
                <NormalTexture file="Interface\Icons\Misc_ArrowLeft"/>
                <Scripts>
                    <OnEnter>
                        TestCrashBugChild.Text:SetText("/reload now and it may be fine")
                        TestCrashBugChild:Show()
                    </OnEnter>
                    <OnLeave>
                        TestCrashBugChild:Hide()
                    </OnLeave>
                </Scripts>
            </Button>
        </Frames>
        <Layers>
            <Layer level="ARTWORK">
                <!-- if I /reload when mouse is over this, client crashes -->
                <Texture parentKey="Texture" file="Interface\Icons\Misc_ArrowRight">
                    <Size x="50" y="50"/>
                    <Anchors>
                        <Anchor point="BOTTOMRIGHT" x="-16" y="16"/>
                    </Anchors>
                    <Scripts>
                        <OnEnter>
                            TestCrashBugChild.Text:SetText("/reload now and client may crash")
                            TestCrashBugChild:Show()
                        </OnEnter>
                        <OnLeave>
                            TestCrashBugChild:Hide()
                        </OnLeave>
                    </Scripts>
                </Texture>
            </Layer>
        </Layers>
    </Frame>
</Ui>
My other WoW machine is currently dedicated for other purposes and can't test on that one for now.
  Reply With Quote
01-04-23, 08:18 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Historically, regions (textures and fontstrings) don't support scripts. Though looking at the UI hierarchy, it appears they now inherit from an object type that does.

Similarly, they do have :SetScript(), :GetScript(), and :HasScript() functions. There's no documentation I'm aware of for their support specifically, so this may warrant some probing around.
__________________
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
01-04-23, 09:59 AM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
If you comment out the
Code:
TestCrashBugChild:Show()
in the texture OnEnter it doesn't crash so, likely bug.
Edit: If you don't show TestCrashBugChild it seems to work ok but if you show it (or have it shown by default), it will crash even without setting the text.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 01-04-23 at 10:30 AM.
  Reply With Quote
01-04-23, 12:07 PM   #4
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Thanks for testing to confirm. Yeah even if the frame has no user-defined elements (<Frame parentKey="TestCrashBugChild"/>) it seems to crash for me. I can do all sorts of stuff in the OnEnter, but showing another frame seems to cause the crash. And if the frame gets hidden, like in the OnLeave, it seems fine.

I'm very excited to use these new script handler-enabled textures. I hope this bug (and the issues with textures not inheriting script handlers unless any are explicitly defined in XML) are sorted out soon.

One of my addons has an intrinsic button template called RematchCompositeButton that I've been using for some time that makes textures into buttons with their own OnEnter/OnLeave/OnClick behaviors. While the mouse is over a button it periodically checks if the mouse is over a texture in the ARTWORK layer and triggers a callback if the texture was registered for one. (This was to solve a crash issue on Macs due to having too many buttons ontop of buttons in my lists.)

Blizzard's implementation is better since the parent button also gets an OnLeave and such, promoting the textures to actual button/frame behavior. GetMouseFocus() even returns the texture under the mouse instead of the button which is kind of wild.

Last edited by Gello : 01-04-23 at 12:09 PM.
  Reply With Quote
01-04-23, 12:23 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
I didn't test whether it was the actual frame being shown or just the child FontString (or a combination of the two). I did resize the TestCrashBugChild frame and fontstring to make sure they weren't overlapping the texture with OnEnter/OnLeave when shown but that didn't make a differnce.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-06-23, 04:37 PM   #6
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
The crash bug appears fixed on 10.0.5 PTR.

Still problems inheriting texture script handlers, but that's a far less serious issue.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Is anyone able to reproduce this crash bug?


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