Bug 401016 - java.lang.RuntimeException: Illegal type for StackMapType: -4
Summary: java.lang.RuntimeException: Illegal type for StackMapType: -4
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.7.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-17 13:18 EST by Oliver Drotbohm CLA
Modified: 2013-02-18 12:05 EST (History)
1 user (show)

See Also:


Attachments
AspectJ compiler dump (31.64 KB, text/plain)
2013-02-17 13:18 EST, Oliver Drotbohm CLA
no flags Details
Aspect error dump with 1.7.2 (31.64 KB, text/plain)
2013-02-18 11:35 EST, Oliver Drotbohm CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Drotbohm CLA 2013-02-17 13:18:19 EST
Created attachment 227168 [details]
AspectJ compiler dump

I am using both the Spring Instrument LTW as well as a Datanucleus agent to enhance JPA entities at runtime. I configure Surefire with the following parameter:

<argLine>
  -javaagent:${settings.localRepository}/org/datanucleus/datanucleus-core/${datanucleus}/datanucleus-core-${datanucleus}.jar=-api=JPA
  -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar
</argLine>
Comment 1 Andrew Clement CLA 2013-02-18 11:04:44 EST
Oliver - can you perhaps try the AspectJ 1.7.2 that I just released and see if it helps your situation? It had at least one stack map related change in.
Comment 2 Oliver Drotbohm CLA 2013-02-18 11:09:48 EST
Which repo do I find it in? It doesn't seem to be in Maven Central yet.
Comment 3 Andrew Clement CLA 2013-02-18 11:26:30 EST
It is in the spring maven repos: maven.springframework.org

Getting it into central is painful manual step that I have to build up the enthusiasm to perform :)
Comment 4 Oliver Drotbohm CLA 2013-02-18 11:32:26 EST
Same result with 1.7.2.
Comment 5 Oliver Drotbohm CLA 2013-02-18 11:35:14 EST
Created attachment 227207 [details]
Aspect error dump with 1.7.2

I see quite a few unsupported types in other dumps: 108, -107, 122, 117, -4, -119.

Also got one with a java.lang.NegativeArraySizeException.
Comment 6 Andrew Clement CLA 2013-02-18 12:05:35 EST
Thanks for trying that.

Actually now I think back I've seen problems in the past related to datanucleus being in the mix. With two agents modifying bytecode we can get into trouble because one isn't aware of the other (I recall changing AspectJ for Roo usage at one point to work around a datanucleus quirk).

I suppose if you run just with AspectJ, all is well (the tests may fail, of course, but the AspectJ exceptions would be gone).  I also imagine you can't just switch around the agents as the spring one needs to do something based on the dn one?

You could try compiling with source/target 1.5 - this should prevent creation of the stackmap attributes which might get you a little further. But DN may just modify something else that AspectJ won't be able to cope with.

sorry I don't have any better answers at the moment.