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

Error "Cannot read field "sym" because "this.lvar[od]" is null" when compiling

XMLWordPrintable

    • b07
    • generic
    • generic

        ADDITIONAL SYSTEM INFORMATION :
        OS: Ubuntu 20.04 Desktop, Manjaro 20.2 Desktop
        JDK: OpenJDK, Tumurin, Corretto


        A DESCRIPTION OF THE PROBLEM :
        Upgrading my project to java 17. Receiving an error message when compiling. Reverting to java 16 fixes it.

        REGRESSION : Last worked in version 16.0.2

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Compile https://github.com/ProjectEdenGG/Nexus branch "feature/java-17"

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Program compiles
        ACTUAL -
        [ERROR] java.lang.NullPointerException: Cannot read field "sym" because "this.lvar[od]" is null
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Code.emitop1w(Code.java:956)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Items$LocalItem.load(Items.java:401)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:902)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitNewClass(Gen.java:1961)
        [ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1852)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:877)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitReturn(Gen.java:1837)
        [ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1709)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:610)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:645)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:631)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStats(Gen.java:682)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1097)
        [ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1091)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:610)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genStat(Gen.java:645)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:967)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:930)
        [ERROR] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:921)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genDef(Gen.java:610)
        [ERROR] at jdk.compiler/com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2414)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:737)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1617)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1585)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
        [ERROR] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
        [ERROR] at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
        [ERROR] at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)


        ---------- BEGIN SOURCE ----------
        https://github.com/ProjectEdenGG/Nexus

        The code base is so massive (130,000+ source lines), I wasnt able to pinpoint exactly what is causing the issue.
        ---------- END SOURCE ----------

        FREQUENCY : always


              jlahoda Jan Lahoda
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: