Topics

NetBEans crashes on clean checkout

Andrew Crosland
 

Windows 10, NetBeans 8.0.2

I started having problems on Thursday after fetching the latest upstream/master and merging into my local branch. NetBeans encounters an exception in the compiler when doing a clean and build. I thought I had messed up resolving a conflict, although surprised that could create the issue.

I tried fixing things up in git using both github desktop and command line, all to no avail.

I gave up and cloned JMRI/JMRI master (not my crosland/JMRI fork) into a clean directory and have the same problem. The log is attached below.

I have tried deleting the NB cache. Short of re-installing NB is there anything else I should look at?

Andrew



NM build log
==========
ant -f D:\\JMRI2\\JMRI\\nbproject\\nbjdk.xml clean debug
clean:
JMRI.clean:
JMRI.clean:
debug:
JMRI.init:
Created dir: D:\JMRI2\JMRI\target\classes
Created dir: D:\JMRI2\JMRI\target\classes\resources
Created dir: D:\JMRI2\JMRI\java\tmp\jmri\jmris\srcp\parser
Created dir: D:\JMRI2\JMRI\java\tmp\jmri\jmrix\srcp\parser
JMRI.copyfiles:
Copying 17 files to D:\JMRI2\JMRI\target\classes\resources
Copying 1724 files to D:\JMRI2\JMRI\target\classes
JMRI.jjtree:
Java Compiler Compiler Version 7.0.3 (Tree Builder)
(type "jjtree" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\src\jmri\jmris\srcp\SRCPParser.jjt . . .
opt:java
File "Node.java" does not exist.  Will create one.
File "SimpleNode.java" does not exist.  Will create one.
File "ASThandshakecommand.java" does not exist.  Will create one.
File "ASTcommand.java" does not exist.  Will create one.
File "ASTserviceversion.java" does not exist.  Will create one.
File "ASTconnectionmode.java" does not exist.  Will create one.
File "ASTbus.java" does not exist.  Will create one.
File "ASTaddress.java" does not exist.  Will create one.
File "ASTvalue.java" does not exist.  Will create one.
File "ASTcvno.java" does not exist.  Will create one.
File "ASTzeroaddress.java" does not exist.  Will create one.
File "ASTnonzeroaddress.java" does not exist.  Will create one.
File "ASTport.java" does not exist.  Will create one.
File "ASTdevicegroup.java" does not exist.  Will create one.
File "ASTgo.java" does not exist.  Will create one.
File "ASTget.java" does not exist.  Will create one.
File "ASThandshake_set.java" does not exist.  Will create one.
File "ASTprotocollitteral.java" does not exist.  Will create one.
File "ASTconnectionlitteral.java" does not exist.  Will create one.
File "ASTset.java" does not exist.  Will create one.
File "ASTterm.java" does not exist.  Will create one.
File "ASTcheck.java" does not exist.  Will create one.
File "ASTwait_cmd.java" does not exist.  Will create one.
File "ASTinit.java" does not exist.  Will create one.
File "ASTreset.java" does not exist.  Will create one.
File "ASTverify.java" does not exist.  Will create one.
File "ASTgl.java" does not exist.  Will create one.
File "ASTsm.java" does not exist.  Will create one.
File "ASTga.java" does not exist.  Will create one.
File "ASTfb.java" does not exist.  Will create one.
File "ASTtime.java" does not exist.  Will create one.
File "ASTpower.java" does not exist.  Will create one.
File "ASTserver.java" does not exist.  Will create one.
File "ASTsession.java" does not exist.  Will create one.
File "ASTlock.java" does not exist.  Will create one.
File "ASTdescription.java" does not exist.  Will create one.
File "ASTonoff.java" does not exist.  Will create one.
File "ASTzeroone.java" does not exist.  Will create one.
File "ASTdelay.java" does not exist.  Will create one.
File "ASTtimeout.java" does not exist.  Will create one.
File "ASTprogmode.java" does not exist.  Will create one.
File "ASTcv.java" does not exist.  Will create one.
File "ASTcvbit.java" does not exist.  Will create one.
File "ASTreg.java" does not exist.  Will create one.
File "ASTprotocol.java" does not exist.  Will create one.
File "ASTdrivemode.java" does not exist.  Will create one.
File "ASTfunctionmode.java" does not exist.  Will create one.
File "SRCPParserTreeConstants.java" does not exist.  Will create one.
File "SRCPParserVisitor.java" does not exist.  Will create one.
File "SRCPParserDefaultVisitor.java" does not exist.  Will create one.
File "JJTSRCPParserState.java" does not exist.  Will create one.
Annotated grammar generated successfully in D:\JMRI2\JMRI\java\tmp\jmri\jmris\srcp\parser\SRCPParser.jj
Java Compiler Compiler Version 7.0.3 (Tree Builder)
(type "jjtree" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\src\jmri\jmrix\srcp\SRCPClientParser.jjt . . .
opt:java
File "Node.java" does not exist.  Will create one.
File "SimpleNode.java" does not exist.  Will create one.
File "ASThandshakeresponse.java" does not exist.  Will create one.
File "ASTtimestamp.java" does not exist.  Will create one.
File "ASTserviceversion.java" does not exist.  Will create one.
File "ASTinforesponse.java" does not exist.  Will create one.
File "ASTinfo.java" does not exist.  Will create one.
File "ASTerror.java" does not exist.  Will create one.
File "ASTok.java" does not exist.  Will create one.
File "ASTcommandresponse.java" does not exist.  Will create one.
File "ASTbus.java" does not exist.  Will create one.
File "ASTpower.java" does not exist.  Will create one.
File "ASTzeroaddress.java" does not exist.  Will create one.
File "ASTnonzeroaddress.java" does not exist.  Will create one.
File "ASTport.java" does not exist.  Will create one.
File "ASTdevicegroup.java" does not exist.  Will create one.
File "ASTgl.java" does not exist.  Will create one.
File "ASTsm.java" does not exist.  Will create one.
File "ASTga.java" does not exist.  Will create one.
File "ASTfb.java" does not exist.  Will create one.
File "ASTtime.java" does not exist.  Will create one.
File "ASTserver.java" does not exist.  Will create one.
File "ASTsession.java" does not exist.  Will create one.
File "ASTlock.java" does not exist.  Will create one.
File "ASTdescription.java" does not exist.  Will create one.
File "ASTonoff.java" does not exist.  Will create one.
File "SRCPClientParserTreeConstants.java" does not exist.  Will create one.
File "SRCPClientParserVisitor.java" does not exist.  Will create one.
File "SRCPClientParserDefaultVisitor.java" does not exist.  Will create one.
File "JJTSRCPClientParserState.java" does not exist.  Will create one.
Annotated grammar generated successfully in D:\JMRI2\JMRI\java\tmp\jmri\jmrix\srcp\parser\SRCPClientParser.jj
Created dir: D:\JMRI2\JMRI\java\tmp\jmri\jmris\simpleserver\parser
Java Compiler Compiler Version 7.0.3 (Tree Builder)
(type "jjtree" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\src\jmri\jmris\simpleserver\JmriServerParser.jjt . . .
opt:java
File "Node.java" does not exist.  Will create one.
File "SimpleNode.java" does not exist.  Will create one.
File "ASTcommand.java" does not exist.  Will create one.
File "ASTpowercmd.java" does not exist.  Will create one.
File "ASTpower.java" does not exist.  Will create one.
File "ASTonoff.java" does not exist.  Will create one.
File "ASTturnoutcmd.java" does not exist.  Will create one.
File "ASTturnout.java" does not exist.  Will create one.
File "ASTturnoutdevice.java" does not exist.  Will create one.
File "ASTthrownclosed.java" does not exist.  Will create one.
File "ASTlightcmd.java" does not exist.  Will create one.
File "ASTlight.java" does not exist.  Will create one.
File "ASTlightdevice.java" does not exist.  Will create one.
File "ASTreportercmd.java" does not exist.  Will create one.
File "ASTreporter.java" does not exist.  Will create one.
File "ASTreporterdevice.java" does not exist.  Will create one.
File "ASTsensorcmd.java" does not exist.  Will create one.
File "ASTsensor.java" does not exist.  Will create one.
File "ASTsensordevice.java" does not exist.  Will create one.
File "ASToperationscmd.java" does not exist.  Will create one.
File "ASToperations.java" does not exist.  Will create one.
File "ASTtrains.java" does not exist.  Will create one.
File "ASTlocations.java" does not exist.  Will create one.
File "ASTterminate.java" does not exist.  Will create one.
File "ASTtraincmd.java" does not exist.  Will create one.
File "ASTattributelist.java" does not exist.  Will create one.
File "ASTattributename.java" does not exist.  Will create one.
File "ASTvalue.java" does not exist.  Will create one.
File "JmriServerParserTreeConstants.java" does not exist.  Will create one.
File "JmriServerParserVisitor.java" does not exist.  Will create one.
File "JmriServerParserDefaultVisitor.java" does not exist.  Will create one.
File "JJTJmriServerParserState.java" does not exist.  Will create one.
Annotated grammar generated successfully in D:\JMRI2\JMRI\java\tmp\jmri\jmris\simpleserver\parser\JmriServerParser.jj
JMRI.javacc:
Java Compiler Compiler Version 7.0.3 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\tmp\jmri\jmris\srcp\parser\SRCPParser.jj . . .
File "TokenMgrError.java" does not exist.  Will create one.
File "ParseException.java" does not exist.  Will create one.
File "Token.java" does not exist.  Will create one.
File "SimpleCharStream.java" does not exist.  Will create one.
Parser generated successfully.
Java Compiler Compiler Version 7.0.3 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\tmp\jmri\jmrix\srcp\parser\SRCPClientParser.jj . . .
File "TokenMgrError.java" does not exist.  Will create one.
File "ParseException.java" does not exist.  Will create one.
File "Token.java" does not exist.  Will create one.
File "SimpleCharStream.java" does not exist.  Will create one.
Parser generated successfully.
Java Compiler Compiler Version 7.0.3 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file D:\JMRI2\JMRI\java\tmp\jmri\jmris\simpleserver\parser\JmriServerParser.jj . . .
File "TokenMgrError.java" does not exist.  Will create one.
File "ParseException.java" does not exist.  Will create one.
File "Token.java" does not exist.  Will create one.
File "SimpleCharStream.java" does not exist.  Will create one.
Parser generated successfully.
JMRI.update-template-code:
Copying 1 file to D:\JMRI2\JMRI\java\tmp
JMRI.compile-generated-source:
Compiling 134 source files to D:\JMRI2\JMRI\target\classes
warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.NamedServiceProcessor' less than -source '1.8'
2 warnings
Copying 1 file to D:\JMRI2\JMRI\target\classes\jmri
JMRI.compile:
Compiling 4434 source files to D:\JMRI2\JMRI\target\classes
warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_7' from annotation processor 'org.netbeans.modules.openide.util.NamedServiceProcessor' less than -source '1.8'
An exception has occurred in the compiler (1.8.0_25). 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.  Thank you.
java.lang.AssertionError: isSubClass H
at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447)
at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456)
at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1469)
at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2671)
at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2653)
at com.sun.tools.javac.code.Types.implementation(Types.java:2682)
at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1529)
at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1518)
at com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:416)
at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:402)
at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:362)
at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1448)
at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1618)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1689)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1662)
at com.sun.tools.javac.comp.DeferredAttr$DeferredChecker$2.lookup(DeferredAttr.java:1325)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3325)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3310)
at com.sun.tools.javac.comp.DeferredAttr$DeferredChecker.quicklyResolveMethod(DeferredAttr.java:1333)
at com.sun.tools.javac.comp.DeferredAttr$DeferredChecker.visitApply(DeferredAttr.java:1223)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.comp.DeferredAttr$FilterScanner.scan(DeferredAttr.java:901)
at com.sun.tools.javac.comp.DeferredAttr.isDeferred(DeferredAttr.java:1088)
at com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:701)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1834)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:656)
at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1611)
at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692)
at com.sun.tools.javac.comp.Attr.visitSwitch(Attr.java:1289)
at com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JCTree.java:1087)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1142)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1035)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4342)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4252)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4181)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4156)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
D:\JMRI2\JMRI\nbproject\nbjdk.xml:8: The following error occurred while executing this line:
D:\JMRI2\JMRI\build.xml:624: The following error occurred while executing this line:
D:\JMRI2\JMRI\build.xml:594: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 minutes 6 seconds)
 




--
Andrew Crosland

Matthew Harris
 

Andrew,

Based on the start of the error:

> An exception has occurred in the compiler (1.8.0_25)

your JDK probably needs updating as we now use JDK 1.8.0_151 as our earliest supported compiler.

See 
https://www.jmri.org/help/en/html/doc/Technical/TechRoadMap.shtml

Best regards, 

Matt H

Randall Wood <rhwood@...>
 

Matt beat me to it, but per https://www.jmri.org/help/en/html/doc/Technical/JVMCapabilities.shtml (a different doc), "JMRI development requires Java 8u101 or later.” (u151 is continually tested since that’s the last version that can be installed on Windows XP).

I would also update your NetBeans version to 11.2 (since 8.x is no longer maintained).

On 11-Jan-2020, at 09:06, Matthew Harris <matthew.john.harris@...> wrote:

Andrew,

Based on the start of the error:

> An exception has occurred in the compiler (1.8.0_25)

your JDK probably needs updating as we now use JDK 1.8.0_151 as our earliest supported compiler.

See 
https://www.jmri.org/help/en/html/doc/Technical/TechRoadMap.shtml

Best regards, 

Matt H

Andrew Crosland
 

Ah. Thank you. I was only reading that the other day (for a different reason), but I convinced myself I had the correct tools :(

I now think I may have been checking the run time version.

I will try that...

--
Andrew Crosland

Andrew Crosland
 

I am a little confused. Should I stick with the latest Java 8 (jdk8_u231)? or switch to Java 11 (jdk11.0.5), or...?

I don't use the JDK for anything else.

Andrew

 
--
Andrew Crosland

Randall Wood <rhwood@...>
 

It’s entirely your choice. Both should work (and both are tested). I personally prefer the JDKs from adoptopenjdk.net and tend to use the latest LTS version (11) with the HotSpot JVM.

On 11-Jan-2020, at 09:29, Andrew Crosland <andrew@...> wrote:

I am a little confused. Should I stick with the latest Java 8 (jdk8_u231)? or switch to Java 11 (jdk11.0.5), or...?

I don't use the JDK for anything else.

Andrew

 
--
Andrew Crosland

Randall Wood <rhwood@...>
 

Actually, since you are using NetBeans, stick with Java 8, since NetBeans is configured to always prefer that in this project.

On 11-Jan-2020, at 09:32, Randall Wood via Groups.Io <rhwood@...> wrote:

It’s entirely your choice. Both should work (and both are tested). I personally prefer the JDKs from adoptopenjdk.net and tend to use the latest LTS version (11) with the HotSpot JVM.

On 11-Jan-2020, at 09:29, Andrew Crosland <andrew@...> wrote:

I am a little confused. Should I stick with the latest Java 8 (jdk8_u231)? or switch to Java 11 (jdk11.0.5), or...?

I don't use the JDK for anything else.

Andrew

 
-- 
Andrew Crosland


Andrew Crosland
 

It's sort of working now. It uses 2.5G of memory when compiling (the machine has 8G fitted)  and the "background scanning of projects" issue is even worse in 11, together with "building dictionary, refreshing indices, checking for external changes". There are numerous bug reports against NB over the years but I guess it's an inherent feature that can't be "fixed".

Thank you.

Andrew


--
Andrew Crosland

Svata Dedic
 

Noone sane uses JDK > 8, if not required by the environment. JDK9 with its "modular system" introduced a number of incompatibilities with reflection, class access etc. JDK 10+11 continue in that direction.

And the modular system is not even as usable as OSGi or NetBeans modules and does not (still) count with versioning and library evolution much.

-S.

Dne 11. 01. 20 v 15:33 Randall Wood via Groups.Io napsal(a):

Actually, since you are using NetBeans, stick with Java 8, since NetBeans is configured to always prefer that in this project.