Community
Participate
Working Groups
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)
The code at this line shouldn't be throwing an exception... which VM are you using ?
Could be a jit problem? To find out, disable the JIT (-Djava.compiler=NONE).
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.
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.
Created attachment 6607 [details] The java core file from the crash described in my comment.
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.
Could you provide steps to reproduce it ?
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.
So this clearly looks like another JIT bug. Of course without the JIT the runtime is slower. This is why there is a JIT.
Closing as VM bug. You should report it to VM vendor.
FYI - when using IBM JREs, you should also specify the command line option "- Xj9" which will likely make these JIT bug go away.