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

mxmlc/as3 compiler confuses embedded asset identity as a function of variable name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • Adobe Flex SDK 3.3 (Release)
    • None
    • MXML Scripting
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:

      Include the given AS3 source file in a build, and populate a hierarchy of images such that the files referenced in the AS3 exist. Make sure _asset_16 is distinguishable (visually) from all other images.

      Actual Results:

      The referred-too asset will contain the image from one of the other assets, as if the compiler has internally confused the mapping from variable name to interned asset.

      Expected Results:

      The right image should be displayed.

      Workaround (if any):

      Adjust naming in asset class such that the variable names are distinguished by more than a numeric postfix. For example, appending an underscore to the end of all variables names avoids the issue (or at least changes the problem; perhaps other conflicts would be happening instead).

      Note that the bug is dependent on the full set of variables names (some kind of internal has collision somewhere?). It is not the case that any asset named "_asset_16" is always mistreated or similar.

      I have confirmed by stracing mlxmlc that the file pointed to by _asset_16 is definitely read from the file system during the build process even in the case where _asset_16 ends up pointing to the "wrong" content.

      I have only tested this on Linux, but selected "All OS platforms" since there are no indications of this being an OS specific bug. I am not sure if that is the intented use of that field in the bug submission form.

      For the record this bug was hit as a result of automatically generated AS3 source code (hence the seemingly stupid variable names). The attached test-case is a watered-down version of the actual triggering case, but it does still trigger the problem consistently for me with Flex 3.3.0 build 4589 (the form above did not allow me to select this build for some reason).

      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: