Community
Participate
Working Groups
I was using the Eclipse3.0M5 driver. During self-hosting, I ran into the following a JDT internal compiler error very often (every 10-15 minutes). It typically happens during PDE tools -> Update ClassPath or Build project. If I exit Eclipse and go back to the same workbench, the problem goes away most of the time (sometimes it takes a few tries). However, the problem will return in less than half an hour. I had tried starting Eclipse with the command "eclipse -vmargs -Xmx500M". It seems to buy a few more minutes but the problem still happens every half an hour or so. I had also tried changing to - Xmx800M but the higher number I tried, I tended to run into the problem with the workbench just hanging and I would have to kill it. Other people in different teams seems to run into similar problem with the M5 driver. This is making development very difficult. Any workaround or ways to avoid or defer the problem? Here's the detail error: Internal compiler error java.lang.NullPointerException 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:155) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build (IncrementalImageBuilder.java:113) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas (JavaBuilder.java:223) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build (JavaBuilder.java:151) at org.eclipse.core.internal.events.BuildManager$2.run (BuildManager.java:482) 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.events.AutoBuildJob.doBuild (AutoBuildJob.java:76) at org.eclipse.core.internal.events.AutoBuildJob.run (AutoBuildJob.java:112) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
Are you using an IBM VM with JIT enabled? It looks like a JIT bug. Try starting your VM adding this argument after the -vmargs: -Djava.compiler=NONE It will disable the JIT.
This is only intending to check whether this is another instance of the VM JIT bug we hit. If so, then you should provide a test case to the VM team directly, as this is really their bug. Until they fix it, you should then consider running Eclipse on a different VM.
I started eclipse with "-vmargs -Djava.compiler=NONE" and the problem did not happened so far after half an hour of lots of updating classpaths and rebuilding. I'll continue to run with JIT off to see if the problem showns up again. I was using the following VM: J2RE 1.4.1 IBM Windows 32 build cn1411-20030930.
Thanks for confirming. Closing as a JIT bug. You should report this 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.
Using -vmargs -Xj9 solved the problem.