Please help me focus on compiler crash (original) (raw)
Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Feb 14 11:30:30 PST 2013
- Previous message: Please help me focus on compiler crash
- Next message: hg: jdk8/tl/langtools: 8006225: tools/jdeps/Basic.java failes with AssertionError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 14/02/13 19:20, Boaz Nahum wrote:
Thanks - It helps a lot.
I was managed to locate the java file that cause the problem and by elimination the line. The exception was caused by missing dependency. The line is: PostProcessor.registerRequiredReferences(ResultsSaver.getResultsSaverServiceImpl(), ScanStatisticsCollectorHelper.getStatisticsCollectorServiceImpl(), SynchWithScanHelper.getProcessingControlServiceImpl()); The problem: ScanStatisticsCollectorHelper implements DefectsProcessor I'm compiling unit (Jar) C. ScanStatisticsCollectorHelper is compiled in unit B DefectsProcessor is in unit A. When compiling C, A is not in classpath. And this what caused the exception. After adding A compilation succeeded.
Also we have exception from the exact same reason: [javac] at com.sun.tools.javac.code.Types.rank(Types.java:3043) [javac] at com.sun.tools.javac.code.Types.rank(Types.java:3015) [javac] at com.sun.tools.javac.code.Types.rank(Types.java:3019) [javac] at com.sun.tools.javac.code.Types.rank(Types.java:3019) [javac] at com.sun.tools.javac.code.Symbol$TypeSymbol.precedes(Symbol.java:591) We have many issues like this in JDK 8. C->B->A. In JDK 7 we just add B to C classpath and it was compiled successfully. In JDK 8 we have 3 different results: 1. A message that A cant be found 2. Exception: at com.sun.tools.javac.code.Types.rank(Types.java:3043) 3. Exception: at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1196) I think that can be caused by the fact that the JDK 8 compiler needs to look at more superinterfaces than the JDK 7 compiler did - which might result in JDK 8's javac being more sensitive at missing/broken stuff.
Maurizio
Thank you for your help. Boaz
On Thu, Feb 14, 2013 at 7:56 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com_ _<mailto:maurizio.cimadamore at oracle.com>> wrote: Add -XDverboseCompilePolicy That should print detailed info about what the compiler is doing (i.e. which file it's compiling before the crash). Maurizio On 14/02/13 17:43, Boaz Nahum wrote: Hi. I'm building lambda/lambda on daily basis. When compiling I get this compiler error, I'm compiling old stuff with no JDK 8 features: [javac] [loading ZipFileIndexFileObject[F:\views2\BoazMainWFJDK8p2\Qsnap\Qrelease\Jar\Core.jar(wf/core/base/GetterSetter.class)]] [javac] An exception has occurred in the compiler (1.8.0-internal). Please file a bug at the Java Developer Connection (http://java.sun. com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Tha nk you. [javac] java.lang.NullPointerException [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1196) [javac] at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1440) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:174) [javac] at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1271) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57) [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:959) [javac] at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:884) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:926) [javac] at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:771) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:889) [javac] at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:686) [javac] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1276) [javac] at com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1266) [javac] at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:212) [javac] at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1328) [javac] at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1302) [javac] at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:907) [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:866) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:505) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:365) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:354) [javac] at com.sun.tools.javac.main.Main.compile(Main.java:345) [javac] at com.sun.tools.javac.Main.compile(Main.java:76) [javac] at com.sun.tools.javac.Main.main(Main.java:61) Because I'm compiling large number of files, I have no way to know which one causes the problem. I added -verbose But it didn't help match (maybe if I send the output it to you ?) Is there any thing I can do to get more information ? Thanks Boaz
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20130214/051d95ce/attachment.html
- Previous message: Please help me focus on compiler crash
- Next message: hg: jdk8/tl/langtools: 8006225: tools/jdeps/Basic.java failes with AssertionError
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]