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

mx.skins.ProgrammaticSkin crashed in width or height is undefined

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Adobe Flex SDK 4.1 (Release)
    • Fix Version/s: None
    • Component/s: Styles
    • Labels:
      None
    • Environment:
      Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

      Description

      Steps to reproduce:

      Please validate width and hight on NaN in mx.skins.ProgrammaticSkin.as
      g.drawRect(x, y, width, height); failing draw component custom skin if width or height equals to null or undefined.
      Currently you are validation on ZERO. But in some cases UI component binding size by other UI component (what may not be created or not in the current state) to reproduce that problem. For safety I recomment to include

      isNaN(width) || isNaN(height)

      Thanks,
      David

      protected function drawRoundRect(
      x:Number, y:Number, width:Number, height:Number,
      cornerRadius:Object = null,
      color:Object = null,
      alpha:Object = null,
      gradientMatrix:Matrix = null,
      gradientType:String = "linear",
      gradientRatios:Array /* of Number */ = null,
      hole:Object = null):void
      {
      var g:Graphics = graphics;

      // Quick exit if weight or height is zero.
      // This happens when scaling a component to a very small value,
      // which then gets rounded to 0.
      if (width == 0 || height == 0 || isNaN(width) || isNaN(height))
      return;

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: