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

[macos 10.15] Compiler gets null pointer error

XMLWordPrintable

    • x86
    • os_x

      ADDITIONAL SYSTEM INFORMATION :
      macOS Catalina 10.15.2
      IntelliJ IDEA 2020.1 EAP (Bug occurs same way with 2019.3)


      A DESCRIPTION OF THE PROBLEM :
      Information:java: An exception has occurred in the compiler (13.0.1). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      Information:java: java.lang.NullPointerException
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1334)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1737)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:405)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:218)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1523)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:1083)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1030)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:1049)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:876)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:1012)
      Information:java: at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:784)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1427)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1417)
      Information:java: at jdk.compiler/com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:217)
      Information:java: at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1406)
      Information:java: at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1380)
      Information:java: at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:972)
      Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
      Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
      Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
      Information:java: at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
      Information:java: at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:207)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:490)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:342)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:267)
      Information:java: at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:220)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1412)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1090)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1157)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1051)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:880)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:447)
      Information:java: at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:188)
      Information:java: at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:139)
      Information:java: at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:297)
      Information:java: at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
      Information:java: at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:232)
      Information:java: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      Information:java: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      Information:java: at java.base/java.lang.Thread.run(Thread.java:830)
      Information:java: Errors occurred while compiling module 'Galgulador'
      Information:javac 13.0.1 was used to compile java sources
      Information:28/1/2020, 11:16 AM - Build completed with 1 error and 0 warnings in 3 s 499 ms
      Error:java: Compilation failed: internal java compiler error

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile source: class A<T extends B> extends C { ... }

      Where C is: class C<U extends V> { ... }

      replace 'C' with 'C<extends W>' in A fixes it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
       It should produce error/warning
      ACTUAL -
      Exception

      ---------- BEGIN SOURCE ----------
      too complicated to provide. About 10 confidential classes involved. Would be considerable effort.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Few my source code

      FREQUENCY : always


            tongwan Andrew Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: