Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8107923

Cannot build project due to OutOfMemoryError with JavaFX 1.2.1 SDK

    XMLWordPrintable

    Details

      Description

      BLOCKER: It is not currently possible to build large projects in JavaFX.

      In the switch to the JavaFX 1.2.1 SDK, it became impossible to build the JFXtras project. This is a fairly large JavaFX codebase, which has contributions from numerous individuals. Here is a link to the project page where the source code can be found:
      http://code.google.com/p/jfxtras/

      Assuming that we were on the threshold of the normal Javac heap, and compiler changes in JavaFX 1.2.1 pushed us over the edge, the normal procedure on a Java project would be to increase the heap size of the JVM. However, it appears that none of the javafx launch scripts provide the ability to pass in VM options, such as max memory.

      The workaround for Macintosh is to modify the launch script in a text editor to directly pass in the max memory argument to the JVM. There is no known workaround for Windows, because the launch scripts are binary files that cannot be edited.

      Our project is being built via Netbeans, and fails on the ant target that launches the javafxpackager.

      Here is the error printed out to the console:
      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.OutOfMemoryError: Java heap space
              at com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:1516)
              at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:1616)
              at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:1688)
              at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1875)
              at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1807)
              at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:777)
              at com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:719)
              at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1306)
              at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1289)
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183)
              at com.sun.tools.javac.code.Types.asSuper(Types.java:1286)
              at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1302)
              at com.sun.tools.javac.code.Types$14.visitClassType(Types.java:1289)
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183)
              at com.sun.tools.javac.code.Types.asSuper(Types.java:1286)
              at com.sun.tools.javac.code.Types$5.visitClassType(Types.java:415)
              at com.sun.tools.javac.code.Types$5.visitClassType(Types.java:342)
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183)
              at com.sun.tools.javac.code.Types.isSubtype(Types.java:338)
              at com.sun.tools.javac.code.Types.isSubtype(Types.java:322)
              at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java:302)
              at com.sun.tools.javac.code.Types.isConvertible(Types.java:271)
              at com.sun.tools.javac.code.Types.isAssignable(Types.java:1489)
              at com.sun.tools.javac.comp.Check.checkType(Check.java:340)
              at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:142)
              at com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:755)
              at com.sun.tools.javac.comp.MemberEnter.access$300(MemberEnter.java:56)
              at com.sun.tools.javac.comp.MemberEnter$5.enterAnnotation(MemberEnter.java:723)
      ERROR: javafxc execution failed, exit code: 3

      This is currently blocking development on this project until a workaround is identified.

        Attachments

          Activity

            People

            Assignee:
            asotonajfx Adam Sotona (Inactive)
            Reporter:
            schin Stephen Chin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: