JDK-4832887 : NPE from com.sun.tools.javac.v8.comp.Flow.checkInit in Mantis beta
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.1_05,1.4.2
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,linux_redhat_7.2
  • CPU: x86
  • Submitted: 2003-03-14
  • Updated: 2003-07-25
  • Resolved: 2003-03-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 b19Fixed
Related Reports
Duplicate :  
Relates :  
Description
I found that the Mantis javac throws an error trying to compile the java/src/ tree of NetBeans sources. These sources are used by both the NetBeans and Sun ONE Studio IDEs. The error seems reproducible in both the NetBeans CVS trunk and on the release35 branch used also by S1S "Nevada" ~ 5.0. Only checked on Linux.

I managed to extract all relevant files into one bundle. Unpack it (tar xvfz) and do

cd javacbug
./run.sh

with the JDK's bin/ dir in your path. I get an error under JDK 1.4.2 b11 and b18, but not in 1.4.1_01:

javacbug$ PATH=/space/jdk1.4.1_01/bin:$PATH ./run.sh 
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.

javacbug$ PATH=/space/jdk1.4.2-beta-b18/bin:$PATH ./run.sh 
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b18)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b18, mixed mode)
An exception has occurred in the compiler (1.4.2-beta). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
java.lang.NullPointerException
	at com.sun.tools.javac.v8.comp.Flow.checkInit(Flow.java:380)
	at com.sun.tools.javac.v8.comp.Flow.visitIdent(Flow.java:1131)
	at com.sun.tools.javac.v8.tree.Tree$Ident.accept(Tree.java:1111)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.tree.TreeScanner.visitSelect(TreeScanner.java:242)
	at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanExpr(Flow.java:501)
	at com.sun.tools.javac.v8.comp.Flow.visitBinary(Flow.java:1123)
	at com.sun.tools.javac.v8.tree.Tree$Binary.accept(Tree.java:1014)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:42)
	at com.sun.tools.javac.v8.tree.TreeScanner.visitNewArray(TreeScanner.java:200)
	at com.sun.tools.javac.v8.tree.Tree$NewArray.accept(Tree.java:922)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanExpr(Flow.java:501)
	at com.sun.tools.javac.v8.comp.Flow.visitVarDef(Flow.java:703)
	at com.sun.tools.javac.v8.tree.Tree$VarDef.accept(Tree.java:511)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492)
	at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711)
	at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.visitIf(Flow.java:996)
	at com.sun.tools.javac.v8.tree.Tree$If.accept(Tree.java:756)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492)
	at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711)
	at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.visitForLoop(Flow.java:793)
	at com.sun.tools.javac.v8.tree.Tree$ForLoop.accept(Tree.java:605)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492)
	at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711)
	at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483)
	at com.sun.tools.javac.v8.comp.Flow.visitMethodDef(Flow.java:665)
	at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java:482)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.visitClassDef(Flow.java:615)
	at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:443)
	at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33)
	at com.sun.tools.javac.v8.comp.Flow.analyzeTree(Flow.java:1156)
	at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:361)
	at com.sun.tools.javac.v8.Main.compile(Main.java:569)
	at com.sun.tools.javac.Main.compile(Main.java:36)
	at com.sun.tools.javac.Main.main(Main.java:27)

###@###.### 2003-03-14
###@###.### 2003-03-19

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta tiger FIXED IN: mantis-beta tiger INTEGRATED IN: mantis-b19 mantis-beta tiger tiger-b14
14-06-2004

PUBLIC COMMENTS ...
10-06-2004

WORK AROUND Do you know where in the sources this is? I see something similar to what you mention in JavaConnections.java compareMethods(...). Is there a particular workaround that will help in Mantis? ###@###.### 2003-03-19
19-03-2003

EVALUATION The problem is this: boolean x=true, y=false; boolean a[] = new boolean[] { !x, y }; ###@###.### 2003-03-18
18-03-2003