JDK-6415455 : REGRESSION: NPE when compiling Mustang Swing classes on Linux-64
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux_suse_sles_8
  • CPU: x86
  • Submitted: 2006-04-19
  • Updated: 2010-04-02
  • Resolved: 2006-05-08
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.
JDK 6
6Resolved
Related Reports
Relates :  
Description
Deployment build in BUR is failing on linux-64 on jdp-linux-amd64-01.east.
We are getting a NullPointerException trying to compile Swing classes.  Here
is the error message.  The entire build log is attached.

# Running javac:
/scratch/nightly_build/bin/javac -J-XX:ThreadStackSize=1536 -J-Xms128m -J-Xmx512m -classpath /scratch/nightly_build/classes -bootclasspath /scratch/nightly_build/lib/jce.jar:/scratch/nightly_build/lib/jsse.jar -sourcepath /scratch/nightly_build/gensrc:../../../src/solaris/classes:../../../src/share/classes -d /scratch/nightly_build/classes -encoding ascii -source 1.5 -target 6 @/scratch/nightly_build/tmp/com/javax.swing/.classes.list
An exception has occurred in the compiler (1.6.0). 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.NullPointerException
	at com.sun.tools.javac.comp.Flow.visitIdent(Flow.java:1213)
	at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1543)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.scanExpr(Flow.java:500)
	at com.sun.tools.javac.comp.Flow.visitApply(Flow.java:1115)
	at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1206)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:157)
	at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1070)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:484)
	at com.sun.tools.javac.comp.Flow.scanStats(Flow.java:492)
	at com.sun.tools.javac.comp.Flow.visitBlock(Flow.java:747)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:735)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:484)
	at com.sun.tools.javac.comp.Flow.visitMethodDef(Flow.java:693)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:635)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:627)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:571)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:484)
	at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:470)
	at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:580)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:571)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:484)
	at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:470)
	at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:580)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:571)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
	at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:1255)
	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:967)
	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:931)
	at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:668)
	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:639)
	at com.sun.tools.javac.main.Main.compile(Main.java:332)
	at com.sun.tools.javac.main.Main.compile(Main.java:255)
	at com.sun.tools.javac.main.Main.compile(Main.java:246)
	at com.sun.tools.javac.Main.compile(Main.java:70)
	at com.sun.tools.javac.Main.main(Main.java:55)
make[3]: *** [.compile.classlist] Error 4
make[3]: Leaving directory `/scratch/ws-nightly-1.6.0/j2se/make/javax/swing'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/scratch/ws-nightly-1.6.0/j2se/make/javax'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/scratch/ws-nightly-1.6.0/j2se/make'
make: *** [j2se-build] Error 2
End of actual linux-amd64 build at: 04/19/06_02:57:46

Comments
EVALUATION I'm not able to reproduce this problem anymore. It is likely that this was fixed by 6356636 or 6397652.
08-05-2006

WORK AROUND While I continue to investigate the problem, please add ../../../src/share/classes/java/awt/geom/Path2D.java to javac command line to work around the problem: Add this line: FILES_java = $(TARGDIR)java/awt/geom/Path2D.java to /net/jdp-linux-amd64-01.east/scratch/ws-nightly-1.6.0/j2se/make/javax/swing/FILES.gmk
20-04-2006

EVALUATION I found a work around and lowered the priority. However, this remains a critical issue for Mustang.
20-04-2006

EVALUATION The problem appears to be related to java.awt.geom.Path2D. The compiler reads the class from both source and class path.
20-04-2006

EVALUATION I can reproduce the problem and is working on paring down the test case.
20-04-2006

WORK AROUND The obvious work-around doesn't work :-( The obvious work-around is to disable flow analysis with -XD-relax, however, then we get this: ../../../src/share/classes/java/awt/geom/Path2D.java:142: name clash: Float() and Float() have the same erasure public Float() { ^ ... Let me go on the record and express my concern about using that particular name!
20-04-2006