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

Incremental compile causes a "Variable xx is not defined" error with embedded resource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.6 (Release)
    • None
    • Compiler API
    • None

    Description

      [Problem]
      =========
      The customer got "Variable xx is not defined" error when they compiled the project.

      More details are as below:

      1. the customer found that the error will not show up without following code.

      [Embed(source="/images/stopSign-icon.gif")]
      public static var lc_stopSignIcon:Class;

      2. the customer found that if they set incremental="false" in build.xml, the error will not show up.

      STEPS TO REPRODUCE:
      ===================
      1. change following parameter to work path in build.xml.
      base.dir
      FLEX_HOME
      ANT_HOME

      2. run build_swf.bat.

      3. modify src/Test.mxml. (add a new line)

      4. run build_swf.bat again.

      5. run flex/Test.swf, following error will show up.

      ReferenceError: Error #1065: Variable CommonIcon_lc_stopSignIcon is not defined.

      at flash.display::MovieClip/nextFrame()
      at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:278]
      at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2627]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.preloaders::Preloader/timerHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
      at flash.utils::Timer/_timerDispatch()
      at flash.utils::Timer/tick()

      RESULT:
      =======
      compile error shows up

      EXPECTED:
      =========
      no compile error

      [System environment]
      ====================
      Flex 4.6.0
      apache-ant-1.8.0
      use Ant to compile

      Attachments

        1. apache-ant-1.8.0.z01
          7.00 MB
          Bi Jane Jia
        2. apache-ant-1.8.0.zip
          4.78 MB
          Bi Jane Jia
        3. COMPILE_sample.zip
          710 kB
          Bi Jane Jia

        Activity

          People

            Unassigned Unassigned
            jane Bi Jane Jia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: