[
https://issues.apache.org/jira/browse/NETBEANS-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16939666#comment-16939666
]
John Neffenger commented on NETBEANS-2290:
------------------------------------------
The second exception is logged as follows:
{noformat}
WARNING [org.netbeans.modules.java.source.indexing.JavaIndex]:
MultiPassCompileWorker caused an exception
File:
file:/home/john/src/ide/monocle-epd/src/javafx.graphics/classes/module-info.java
Root: /home/john/src/ide/monocle-epd/src/javafx.graphics/classes
Bootpath:
nbjrt:file:/home/john/opt/jdk-13/!/modules/java.base/:nbjrt:file:/home/john/opt/jdk-13/!/modules/java.datatransfer/:nbjrt:file:/home/john/opt/jdk-13/!/modules/java.desktop/:nbjrt:file:/home/john/opt/jdk-13/!/modules/java.xml/:nbjrt:file:/home/john/opt/jdk-13/!/modules/jdk.unsupported/
Classpath: /home/john/lib/javafx-sdk-13/lib/javafx.base.jar
Sourcepath: /home/john/src/ide/monocle-epd/src/javafx.graphics/classes
java.lang.NullPointerException
at
com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:421)
at com.sun.tools.javac.comp.Modules.enter(Modules.java:287)
at com.sun.tools.javac.comp.Modules.enter(Modules.java:268)
at com.sun.tools.javac.comp.Modules.initModules(Modules.java:259)
at
com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1121)
at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:393)
at
com.sun.tools.javac.api.JavacTaskImpl.enterTrees(JavacTaskImpl.java:451)
[catch] at
org.netbeans.modules.java.source.nbjavac.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:204)
{noformat}
The error occurs in the {{compile}} method of
[MultiPassCompileWorker.java|https://github.com/apache/netbeans/blob/master/java/java.source.nbjavac/src/org/netbeans/modules/java/source/nbjavac/indexing/MultiPassCompileWorker.java].
The last line in the code below throws the {{NullPointerException}}:
{code:java}
if (isLowMemory(flm)) {
dumpSymFiles(jt, previous.createdFiles, context);
jt = null;
diagnosticListener.cleanDiagnostics();
trees = null;
if ((state & MEMORY_LOW) != 0) {
if (isBigFile) {
break;
} else {
bigFiles.add(active);
active = null;
state &= ~MEMORY_LOW;
}
} else {
state |= MEMORY_LOW;
}
freeMemory(true);
continue;
}
Iterable<? extends Element> types;
types = jt.enterTrees(trees);
{code}
It seems that the {{NullPointerException}} is due to taking the path within the
preceding {{if}} statement, which causes the {{jt}} variable to be set to
{{null}}. As a work-around, I tried increasing the heap size with {{"-J-Xms1g
-J-Xmx4g"}} and even {{"-J-Xms4g -J-Xmx4g"}} in the {{netbeans.conf}} file, but
the error still occurred.
> OnePassCompileWorker AssertionError followed by MultiPassCompileWorker
> NullPointerException
> -------------------------------------------------------------------------------------------
>
> Key: NETBEANS-2290
> URL: https://issues.apache.org/jira/browse/NETBEANS-2290
> Project: NetBeans
> Issue Type: Bug
> Components: java - Compiler
> Affects Versions: 11.2
> Environment: Product = Apache NetBeans IDE 11.2 (Snap edge channel
> dated 2019-09-26)
> Java = OpenJDK 13 (build 13+33)
> Operating System = Ubuntu 16.04.6 LTS
> Reporter: John Neffenger
> Priority: Major
> Attachments: netbeans-exceptions.txt
>
>
> In NetBeans 9.0, 10.0, and 11.0, I get the following two errors every time I
> open the NetBeans project containing the OpenJFX graphics module
> (javafx.graphics) the first time after clearing the cache. If I click through
> the classes that failed to compile when opening the project, I can eventually
> get NetBean to compile all of them successfully.
> The errors are:
> {code:java}
> java.lang.AssertionError: Analyzer error when processing:
> private LinkedList<RunLoopControl> activeRunLoops
> = new LinkedList<RunLoopControl>()
> at com.sun.tools.javac.util.Assert.error(Assert.java:162)
> [catch] at org.netbeans.modules.java.source.nbjavac.indexing.
> OnePassCompileWorker.compile(OnePassCompileWorker.java:257)
> {code}
> immediately followed by:
> {code:java}
> java.lang.NullPointerException at com.sun.tools.javac.comp.
> Modules.setCompilationUnitModules(Modules.java:421)
> [catch] at org.netbeans.modules.java.source.nbjavac.indexing.
> MultiPassCompileWorker.compile(MultiPassCompileWorker.java:204)
> {code}
> The full text of the error and exception are attached below as the file
> _netbeans-exceptions.txt_.
> This might be the same problem reported for NetBeans 9.0 in [NETBEANS-1142:
> Exception when scanning
> projects|https://issues.apache.org/jira/browse/NETBEANS-1142].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists