[ 
https://issues.apache.org/jira/browse/FLEX-33600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698332#comment-13698332
 ] 

Justin Mclean commented on FLEX-33600:
--------------------------------------

Any change you can provide an example that shows this?

What version of AIR were you using? Also do you know if this is an issue under 
Apache Flex 4.9? There has been a few fixes to the popup manager.

I tried a simple example with a menu and a dummy popup and no error occurs 
either on 4.6 or 4.9.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                                           
xmlns:s="library://ns.adobe.com/flex/spark" 
                                           
xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
                <![CDATA[
                        import mx.containers.TitleWindow;
                        import mx.events.MenuEvent;
                        import mx.managers.PopUpManager;

                        protected function menuChanged(event:MenuEvent):void
                        {
                                var label:String = event.item.@label;
                                
                                // clicking on a submenu brings up a dummy 
TitleWindow
                                if (label.search("-") >= 0) {
                                        PopUpManager.addPopUp(new 
TitleWindow(), this);
                                }
                        }
                        
                ]]>
        </fx:Script>
        
        <mx:MenuBar id="myMenuBar" labelField="@label" 
change="menuChanged(event)">
                <fx:XMLList>
                        <menuitem label="MenuItem A">
                                <menuitem label="SubMenuItem A-1" />
                                <menuitem label="SubMenuItem A-2" />
                        </menuitem>
                        <menuitem label="MenuItem B" />
                        <menuitem label="MenuItem C" />
                        <menuitem label="MenuItem D">
                                <menuitem label="SubMenuItem D-1" />
                                <menuitem label="SubMenuItem D-2" />
                                <menuitem label="SubMenuItem D-3" />
                        </menuitem>
                </fx:XMLList>
        </mx:MenuBar>
        
</s:WindowedApplication>

I can see that the code could RTE but to fix need to check what happens if we 
put a guard in.

                
> Creating a pop up from a menubar or from within Firefox crashes
> ---------------------------------------------------------------
>
>                 Key: FLEX-33600
>                 URL: https://issues.apache.org/jira/browse/FLEX-33600
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: PopUp Manager
>    Affects Versions: Adobe Flex SDK 4.6 (Release)
>         Environment: Adobe Air Windows - Flash program within Firefox
>            Reporter: Peter Wharmby
>            Priority: Critical
>              Labels: easyfix
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PopUpManagerImpl line 460 we have 
>               if (!localRoot)
>                       localRoot = DisplayObjectContainer(parent.root);
> This crashes if parent is null.
> Happens when trying to open a pop up when a menu is still closing in Air 
> (sometimes) or when called from firefox browser (always)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to