Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-16711

Stack overflow in mx.managers::SystemManager/Stage_resizeHandler on dispatchEvent(new Event('resize', true));

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • Adobe Flex SDK 3.2 (Release)
    • None
    • MXML Components
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Any bubbling event with type 'resize' causes a stack overflow in Flex SystemManager/Stage_resizeHandler() method.
      This issue was discovered because Flash CS3 component fl.controls.Label dispatches a bubbling ComponentEvent with
      colliding 'resize' type when autoSize is set to non-'none' value.

      Steps to reproduce:
      Compile and run this MXML:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      addedToStage="dispatchEvent(new Event('resize', true));"/>

      Actual Results:
      Error: Error #1023: Stack overflow occurred.
      at mx.core::Application/resizeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Application.as:1454]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2581]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2581]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2581]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2581]
      (...)

      Expected Results:
      Invalid resize event is ignored.

      Workaround (if any):
      function cancelResize(event:Event):void
      {
      if (event.target != stage)
      event.stopImmediatePropagation();
      }

      stage.addEventListener('resize', cancelResize, false, int.MAX_VALUE);

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: