2 Replies Latest reply on Feb 8, 2013 12:44 PM by Nabren

    Flash Builder 4.7 Embed Error

    Nabren Level 3

      I am trying to convert a Flash Builder 4.5 project to Flash Builder 4.7. I am having a lot of problems and eventually gave up and deleted the project files and just re-made the projects from scratch.

       

      However, I am having problems embedding an asset. This line works:

       

      [Embed(source = "image.png", mimeType="image/png")]

       

      This line:

       

      [Embed(source = image.png", mimeType="image/png", compression="true")]

       

      Genererates the following errors:

       

      DescriptionResourcePathLocationType

      Internal error in ABC generator subsystem, when generating code for: <removed>.as: java.lang.NullPointerException


      at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscoder.equals(JPEGTransco der.java:220)

      at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedData.java:522)

      at java.util.WeakHashMap.eq(Unknown Source)

      at java.util.WeakHashMap.get(Unknown Source)

      at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEmbedData(Workspace.ja va:933)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getEmbedData(EmbedCom pilationUnitFactory.java:120)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getCompilationUnit(Em bedCompilationUnitFactory.java:62)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :116)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :126)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :43)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.collectEmbedDatas(Emb edCompilationUnitFactory.java:136)

      at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:184)

      at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest(ASCompila tionUnit.java:374)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(Compil ationUnitBase.java:870)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBas e.java:107)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:309)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:305)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)<removed>.as/<removed>line 0Flex Problem

       

      and

       

      DescriptionResourcePathLocationType

      Internal error in outgoing dependency subsystem, when generating code for:<removed>.as: java.lang.NullPointerException


      at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscoder.equals(JPEGTransco der.java:220)

      at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedData.java:522)

      at java.util.WeakHashMap.eq(Unknown Source)

      at java.util.WeakHashMap.get(Unknown Source)

      at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEmbedData(Workspace.ja va:933)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getEmbedData(EmbedCom pilationUnitFactory.java:120)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getCompilationUnit(Em bedCompilationUnitFactory.java:62)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :116)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :126)

      at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :43)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.updateEmbedCompilationUnitDep endencies(CompilationUnitBase.java:946)

      at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleOutgoingDependenciesReque st(ASCompilationUnit.java:458)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRe quest(CompilationUnitBase.java:886)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBas e.java:107)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:378)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:374)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)<removed>.as/<removed>line 0Flex Problem

       

       

      Further, this line:

       

      [Embed(source = "../../../../../../image.png", mimeType="image/png", compression="true", quality="70")]

       

      Generates the following errors:

       

      DescriptionResourcePathLocationType

      Internal error in outgoing dependency subsystem, when generating code for: image.png: java.lang.ArrayIndexOutOfBoundsException: 0


      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.analyze(EmbedCompilationUnit .java:224)

      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.handleOutgoingDependenciesRe quest(EmbedCompilationUnit.java:193)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRe quest(CompilationUnitBase.java:886)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBas e.java:107)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:378)

      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:374)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)image.png/<removed>line 0Flex Problem

       

       

      DescriptionResourcePathLocationType
      The definition of base class Bitmap was not found.<removed>
      line 0Flex Problem

       

      and a warning:

       

      DescriptionResourcePathLocationType
      Definition flash.utils.Bitmap could not be found.<removed>
      line 0Flex Problem

       

      I am trying to make the project of type "ActionScript Library Project" using the Flex 4.6 SDK overlayed with AIR SDK 3.5 however without including the AIR library files.

        • 1. Re: Flash Builder 4.7 Embed Error
          Nabren Level 3

          Here is some more clear info:

           

          Steps to reproduce:

          1. Use the Embed tag above a class variable to embed a png

           

           

          [Embed(source = "Image.png", mimeType = "image/png", compression="true")]

          private static var _imageClass:Class;

           

           

          NOTE: This occurs with or without specifying the mimeType as long as compression is being set to "true"

           

           

          2. Save/Compile the Code

           

           

          3. Note the compiler errors:

           

           

          Internal error in ABC generator subsystem, when generating code for: C:\Users\user\Adobe Flash Builder 4.7\TestProject\src\TestProject.as: java.lang.NullPointerException

                    at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscoder.equals(JPEGTransco der.java:220)

                    at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedData.java:522)

                    at java.util.WeakHashMap.eq(Unknown Source)

                    at java.util.WeakHashMap.get(Unknown Source)

                    at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEmbedData(Workspace.ja va:933)

                    at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getEmbedData(EmbedCom pilationUnitFactory.java:120)

                    at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getCompilationUnit(Em bedCompilationUnitFactory.java:62)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :116)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :126)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :43)

                    at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.collectEmbedDatas(Emb edCompilationUnitFactory.java:136)

                    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:184)

                    at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest(ASCompila tionUnit.java:374)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(Compil ationUnitBase.java:870)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBas e.java:107)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:309)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:305)

                    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

                    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

                    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

                    at java.util.concurrent.FutureTask.run(Unknown Source)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                    at java.lang.Thread.run(Unknown Source)          TestProject.as          /TestProject/src          line 0          Flex Problem

           

           

          Internal error in outgoing dependency subsystem, when generating code for: C:\Users\user\Adobe Flash Builder 4.7\TestProject\src\TestProject.as: java.lang.NullPointerException

                    at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscoder.equals(JPEGTransco der.java:220)

                    at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedData.java:522)

                    at java.util.WeakHashMap.eq(Unknown Source)

                    at java.util.WeakHashMap.get(Unknown Source)

                    at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEmbedData(Workspace.ja va:933)

                    at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getEmbedData(EmbedCom pilationUnitFactory.java:120)

                    at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.getCompilationUnit(Em bedCompilationUnitFactory.java:62)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :116)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :126)

                    at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilationUnit(EmbedNode.java :43)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.updateEmbedCompilationUnitDep endencies(CompilationUnitBase.java:946)

                    at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleOutgoingDependenciesReque st(ASCompilationUnit.java:458)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRe quest(CompilationUnitBase.java:886)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBas e.java:107)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:378)

                    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:374)

                    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

                    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

                    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

                    at java.util.concurrent.FutureTask.run(Unknown Source)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                    at java.lang.Thread.run(Unknown Source)          TestProject.as          /TestProject/src          line 0          Flex Problem

           

           

           

          Actual Results:

           

           

          Setting compression to true generates a compiler error.

           

          Expected Results:

           

          I expected to be able to compress embedded images with Flash Builder.

           

          Workaround (if any):

           

          None.

           

           

          Additonal Notes:

           

           

          Trying to explicitly set compression to false:

           

           

          [Embed(source = "Image.png", mimeType = "image/png", compression="false")]

          private static var _imageClass:Class;

           

           

          Generates the following error:

          The attribute compression can't be used with the mime type: image/png

           

           

          Switching the mimeType to jpeg in this case:

           

           

          [Embed(source = "Image.png", mimeType = "image/jpeg", compression="false")]

          private static var _imageClass:Class;

           

           

          Generates the following error:

          The attribute compression can't be used with the mime type: image/jpeg

           

          Anyone else get these results when trying to compress an embedded image?

          • 2. Re: Flash Builder 4.7 Embed Error
            Nabren Level 3

            Also, just note that specifying a quality:

             

            [Embed(source = "Image.png", mimeType = "image/png", compression="true", quality="90")]

            private static var _imageClass:Class;

             

            Changes the errors to:

             

            Internal error in outgoing dependency subsystem, when generating code for: C:\Users\clivsey\Adobe Flash Builder 4.7\TestProject\src\Image.png: java.lang.ArrayIndexOutOfBoundsException: 0

                      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.analyze(EmbedCompilationUnit .java:224)

                      at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.handleOutgoingDependenciesRe quest(EmbedCompilationUnit.java:193)

                      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOutgoingDependenciesRe quest(CompilationUnitBase.java:886)

                      at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$500(CompilationUnitBas e.java:107)

                      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:378)

                      at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call(CompilationUnitBase. java:374)

                      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)

                      at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)

                      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

                      at java.util.concurrent.FutureTask.run(Unknown Source)

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                      at java.lang.Thread.run(Unknown Source)          Image.png          /TestProject/src          line 0          Flex Problem

             

            The definition of base class Bitmap was not found.

             

            and a warning:

             

            Definition flash.utils.Bitmap could not be found.

             

             

            Here's the ENTIRE code that gets this error:

            package

            {

                      import flash.display.Sprite;

             

                      public class TestProject extends Sprite

                      {

                                [Embed(source = "Image.png", mimeType = "image/jpeg", compression="true", quality="80")]

                                private static var _imageClass:Class;

             

                                public function TestProject()

                                {

             

                                }

                      }

            }