Community
Participate
Working Groups
Build Identifier: I20100608-0911 I was editing and saving an Aspect file when Eclipse crashed and quit. Here's the event details from the last error in the log before the crash: eclipse.buildId=I20100608-0911 java.version=1.6.0_18 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product Error Tue Sep 07 18:30:32 PDT 2010 Compile error: NullPointerException thrown: null java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.buildInterTypeAndPerClause(AjLookupEnvironment.java:546) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.collectAllITDsAndDeclares(AjLookupEnvironment.java:382) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:202) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:616) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:357) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1019) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:268) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:181) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:316) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:185) at org.aspectj.ajde.core.internal.AjdeCoreBuildManager.performBuild(AjdeCoreBuildManager.java:127) at org.aspectj.ajde.core.AjCompiler.build(AjCompiler.java:88) at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:245) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:317) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Reproducible: Didn't try
An AspectJ bug by the looks of it. You say that this bug caused Eclipse itself to quit? Do you have anything on the command line for that? This kind of bug doesn't usually cause Eclipse to shut down, unless there is an out of memory error involved in the mix. I'd recommend bumping up your heap size and perm gen size, which you can do by adding something like this to your eclipse.ini: -vmargs -Xmx768M -XX:PermSize=64M -XX:MaxP ermSize=256M
My eclipse.ini file has the following VM args: -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx1024m -Xss2m -XX:MaxPermSize=256m -XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC I can't be sure that this is what caused Eclipse to crash. It was just the last error in the Error Log.
Not sure if this is relevant but the crash happened while I was editing a before() advice that affects all JComponent methods (including subclasses) on a large Swing project. This Aspect does slow down my build quite a bit especially with the Cross References view open, and uses a lot of heap space so maybe it was an OOM.
Created attachment 178464 [details] JVM Error Log Attaching the JVM error log for posterity. I don't see anything related to AspectJ or AJDT though.
The null indicates a sourcetypebinding was being examined (looking at its membertypes) before the membertypes have been set. Even if the aspect has no member types the array should be initialized to an empty array constant before it is first referenced. I've put in a guard with a message to the console when this occurs.