Bug 458660 - abort ABORT -- (IllegalArgumentException) info cannot be null
Summary: abort ABORT -- (IllegalArgumentException) info cannot be null
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.4   Edit
Hardware: PC Windows 7
: P3 blocker (vote)
Target Milestone: 1.8.5   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-28 12:23 EST by Thekepat Sudesh CLA
Modified: 2015-01-28 18:38 EST (History)
1 user (show)

See Also:


Attachments
abort ABORT -- (IllegalArgumentException) info cannot be null (62.09 KB, text/plain)
2015-01-28 12:23 EST, Thekepat Sudesh CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thekepat Sudesh CLA 2015-01-28 12:23:09 EST
Created attachment 250310 [details]
abort ABORT -- (IllegalArgumentException) info cannot be null

---- AspectJ Properties ---
AspectJ Compiler 1.8.4 built on Thursday Nov 6, 2014 at 20:19:21 GMT
---- Dump Properties ---
Dump file: ajcore.20150128.121204.163.txt
Dump reason: java.lang.IllegalArgumentException
Dump on exception: true
Dump at exit condition: abort
---- Exception Information ---
java.lang.IllegalArgumentException: info cannot be null
	at org.aspectj.org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:5620)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile.generateStackMapTableAttribute(ClassFile.java:4352)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1403)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:342)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:274)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:567)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:664)
	at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:368)
	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:807)
	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:480)
	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:420)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1036)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:272)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
	at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
	at org.aspectj.tools.ajc.Main.run(Main.java:371)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:248)
	at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:524)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Comment 1 Thekepat Sudesh CLA 2015-01-28 12:25:35 EST
When running aspectjtools (ajc) in aspectj-maven-plugin
works for simple projects, but a particular project always causes it to crash
jdk 1.7.0_45
compliance level = 1.7

Could someone give a solution ASAP?
This is a high profile project.

Thanks
Comment 2 Andrew Clement CLA 2015-01-28 12:30:35 EST
Does the java code for the project build ok in Eclipse? (Eclipse 4.4) (Not sure if you are using inter type declarations or just advice in your projects - I understand it may be tricky to try this if you are using inter type declarations).

If the java code doesn't build in Eclipse then it is an Eclipse compiler bug that we are inheriting in AspectJ (since we use their compiler). If that is the case then I can try to pick up their fix (assuming they've fixed it) and put it into AspectJ.

(I presume you cannot share the failing project with me - being able to recreate would enable it to be fixed more quickly)
Comment 3 Thekepat Sudesh CLA 2015-01-28 12:36:01 EST
I am using mvn on command line with aspectj-maven-plugin enabled.
so it must be in aspectjtools.jar's ajc causing this.
Comment 4 Thekepat Sudesh CLA 2015-01-28 12:37:06 EST
unfortunately, I cannot share the project.
but I guess the fix from jdt into aspectj might fix it!
Comment 5 Andrew Clement CLA 2015-01-28 12:52:46 EST
I understand you are using aspectjtools - but I am just trying to work out if it is a bug in AspectJ or a bug in Eclipse JDT.  The stack trace suggests the latter. If the java code in your project builds in eclipse cleanly then it is an aspectj bug, if it has the same problem it is a JDT bug.  Searching the JDT bugs I see this one which is a possible candidate:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=410892

I could try folding that fix into AJ to see if it helps you, possibly including a bit of extra debug too.
Comment 6 Thekepat Sudesh CLA 2015-01-28 13:23:51 EST
That will be great.Please let me know when done.
Unfortunately we have a plethora of projects (maven modules) that belong to several teams & this happens to be one of them.
I was thinking that a fix n JDT would automatically finds it's way into aspectjtools.jar.
Didn't realize they were not using the same code gen...
Comment 7 Andrew Clement CLA 2015-01-28 14:53:31 EST
I merged in the changes under that bug and included some diagnostics that might give us the offending method when/if this continues to happen. The 1.8.5.BUILD-SNAPSHOT of AspectJ is published to our spring maven repo, which I think is:

<repository>
    <id>maven.springframework.org</id>
    <name>SpringSource snapshots</name>
    <url>http://maven.springframework.org/snapshot</url>
</repository>

Can you try it?
Comment 8 Thekepat Sudesh CLA 2015-01-28 15:00:34 EST
I can now reproduce it in a test program. since I cannot send ANY code by email...
the code being woven looks like this:

public static void main(String[] args) {
        Properties _properties = System.getProperties();
        System.out.println("The System properties [" + _properties + "]");
        String property = "reproduction";


        Map<String, String> properties = new HashMap<>();

        switch (property) {
            case "reproduction":
                String runtimeStatus = properties.remove("runtimestatus");
                if(runtimeStatus == null)
                    runtimeStatus = properties.remove("runtimeStatus");

                if(runtimeStatus != null) {
                    String [] parts = runtimeStatus.split(",");
                    int position = 0;
                    for (String part : parts) {
                        setRuntimeStatusAt(position++, part);
                    }
                }
        }
    }

    private static void setRuntimeStatusAt(int position, String part) {
        System.out.println("position [" + position + "], part [" + part + "]");
    }
}
Comment 9 Thekepat Sudesh CLA 2015-01-28 15:01:51 EST
snapshot Not found (404)....
Comment 10 Thekepat Sudesh CLA 2015-01-28 15:15:17 EST
restricted access. Could you email me.
I can test it quickly, since I have a test prog that reproduces the bug.
Thanks
Comment 11 Andrew Clement CLA 2015-01-28 15:22:03 EST
Looks like some lag with the snapshot appearing, i couldn't see it for a moment but I can now.
Comment 12 Thekepat Sudesh CLA 2015-01-28 15:26:38 EST
No access.
email: Thekepat.j.Sudesh@wellsfargo.com 
Thanks
Comment 13 Andrew Clement CLA 2015-01-28 18:38:13 EST
Thekepat confirmed the changes I pulled in from JDT (that address the referenced bug) seem to fix the issue here, so I'm folding this into AJ 1.8.5.