Bug 45824 - NPE while compiler using Eclipse 3.0 M4 compiler
Summary: NPE while compiler using Eclipse 3.0 M4 compiler
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: vm
Depends on:
Blocks:
 
Reported: 2003-10-30 14:55 EST by Olivier Thomann CLA
Modified: 2004-01-28 10:07 EST (History)
1 user (show)

See Also:


Attachments
The java core file from the crash described in my comment. (437.12 KB, text/plain)
2003-10-30 16:24 EST, Jeff Hoffman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2003-10-30 14:55:53 EST
From Eclipse newsgroup,

I have been using and enjoying Eclipse 3.0M4 for a week or so, now, and 
have had few problems. Out of the blue, my project refuses to build due 
to an internal error (NullPointerException) in the compiler.

Here is the traceback of the error:

Internal compiler error
java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.canBeSeenBy(ReferenceBinding.java:124)
	at 
org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java(Compiled

Code))
	at 
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java(Compiled

Code))
	at 
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:889)
	at 
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:271)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:515)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:328)
	at 
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java(Compiled

Code))
	at 
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:151)
	at 
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:51)
	at 
org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:211)
	at 
org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:134)
	at 
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:475)
	at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Inlined

Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:130)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:156)
	at 
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:182)
	at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Inlined

Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at 
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:185)
	at 
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:219)
	at 
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:247)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:172)
	at 
org.eclipse.jdt.internal.debug.ui.jres.JREsUpdater$2.execute(JREsUpdater.java:247)
	at 
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1555)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1572)
	at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)
	at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
Comment 1 Philipe Mulet CLA 2003-10-30 15:18:33 EST
The code at this line shouldn't be throwing an exception... which VM are you 
using ?
Comment 2 Olivier Thomann CLA 2003-10-30 15:39:10 EST
Could be a jit problem? To find out, disable the JIT (-Djava.compiler=NONE).
Comment 3 Jeff Hoffman CLA 2003-10-30 16:20:18 EST
Here is the version tag for my JVM from Help | About | Configuration:

java.fullversion=J2RE 1.4.1 IBM build cxia321411-20030930 (JIT enabled: jitc)

Also, I am on RedHat 9.0, not Windows.
Comment 4 Jeff Hoffman CLA 2003-10-30 16:22:43 EST
I launched Eclipse as follows:

$ /usr/local/eclipse/eclipse -Djava.compiler=NONE

From here, I went to Project | Rebuild All, and it went BOOM:

JVMDG217: Dump Handler is Processing a Signal - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to
/var/ccm-devel/dev/jeff/javacore.20031030.161335.27250.txt
JVMDG215: Dump Handler has Processed Exception Signal 11.
Comment 5 Jeff Hoffman CLA 2003-10-30 16:24:10 EST
Created attachment 6607 [details]
The java core file from the crash described in my comment.
Comment 6 Olivier Thomann CLA 2003-10-30 16:54:18 EST
You need to put -Djava.compiler=NONE in the -vmargs section of the command 
line. If you command line is simple "eclipse", then you need to write:
eclipse -vmargs -Djava.compiler=NONE

The -vmargs needs to be the last option on your command-line.
Comment 7 Philipe Mulet CLA 2003-10-30 17:54:53 EST
Could you provide steps to reproduce it ? 
Comment 8 Jeff Hoffman CLA 2003-10-31 11:26:14 EST
After correctly disabling the JIT, I got a successful build. Albeit a bit
slower, things seem to be working correctly. I will let you know if I have any
further problems.
Comment 9 Olivier Thomann CLA 2003-10-31 13:12:18 EST
So this clearly looks like another JIT bug. Of course without the JIT the
runtime is slower. This is why there is a JIT.
Comment 10 Philipe Mulet CLA 2003-10-31 15:32:17 EST
Closing as VM bug. You should report it to VM vendor.
Comment 11 Philipe Mulet CLA 2004-01-28 10:07:37 EST
FYI - when using IBM JREs, you should also specify the command line option "-
Xj9" which will likely make these JIT bug go away.