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

RTE when using CrossFade

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK 4.0 (Release)
    • None
    • Spark: Effects
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Scenario:

      • I have a button with a custom skin, which only contains a BitmapImage.
      • The BitmapImage has different "source" values depending on the button state.
      • All source values are @Embeds.
      • Transitions between states are animated using a CrossFade with the BitmapImage as target.
        (see attached SwitchViewButtonSkin.mxml as example)

      Very infrequently, when hovering over or out of the button, the RTE posted below occurs.

      I was able to create a test case (attached Test.mxml) where a CrossFade-effect on a BitmapImage with no size (0x0) causes such a RTE, but I think that the actual problem is, that the @Embed-image is not yet loaded at the time the CrossFade wants to capture a snapshot of the BitmapImage.

      Actual Results:

      ArgumentError: Error #2015: Invalid BitmapData.
      at flash.display::BitmapData()
      at spark.primitives.supportClasses::GraphicElement/http://www.adobe.com/2006/flex/mx/internal::captureBitmapData()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\primitives\supportClasses\GraphicElement.as:3099]
      at spark.effects::AnimateTransitionShader/getValueFromTarget()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\effects\AnimateTransitionShader.as:281]
      at mx.effects::Effect/http://www.adobe.com/2006/flex/mx/internal::captureValues()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Effect.as:1462]
      at mx.effects::Effect/captureStartValues()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Effect.as:1364]
      at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9778]
      at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9701]
      at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087]
      at spark.components.supportClasses::SkinnableComponent/commitProperties()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:428]
      at spark.components.supportClasses::ButtonBase/commitProperties()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\ButtonBase.as:735]
      at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7772]
      at mx.managers::LayoutManager/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:572]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:700]
      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

      So it happens at the following line (wrong values passed to BitmapData constructor):

      var bitmapData:BitmapData = new BitmapData(Math.ceil(rectBounds.width), Math.ceil(rectBounds.height), transparent, fillColor);

      with the following values (from a live project, not the test case):

      this spark.primitives.BitmapImage
      transparent true
      fillColor 0
      useLocalSpace false
      clipRect null
      restoreDisplayObject false
      oldDisplayObject null
      topLevel mx.managers.WindowedSystemManager
      rectBounds flash.geom.Rectangle
      bottom 6710896
      height 0
      left 6711742.4
      right 6711742.4
      top 6710896
      width 0
      x 6711742.4
      y 6710896
      bitmapData null
      m null

      "rectBounds" looks quite wrong.

      Expected Results:
      no RTE

      Workaround (if any):
      no idea

      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: