[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Regression from 1.5: can't find type error in AspectJ 1.6

Hi Kevin,

Thanks for trying that.  Instead of the unhelpful 'Argh!' message I now get a much more reasonable:
Unable to pack method, jump (with opcode=167) is too far: 42205
java.lang.IllegalStateException: Unable to pack method, jump (with opcode=167) is too far: 42205
at org.aspectj.apache.bcel.generic.InstructionBranch.updatePosition(InstructionBranch.java:179)
at org.aspectj.apache.bcel.generic.BranchHandle.updatePosition(BranchHandle.java:92)
at org.aspectj.apache.bcel.generic.InstructionList.setPositions(InstructionList.java:905)

in your ajcore file. And I think that is enough information for me to fix it.

Andy.

2008/8/27 Kevin Hoffman <kevinjohnhoffman@xxxxxxxxx>
Hi Andy,

I tried with the latest development version (version string is Wed Aug
27 2008 at 1:27:57 GMT) with the same results.

Here are the new corefiles.

http://www.cs.purdue.edu/homes/kjhoffma/ajcore.20080827.160703.630.txt
http://www.cs.purdue.edu/homes/kjhoffma/ajcore.20080827.160703.864.txt

I'll email you a direct link to the zip that allows you to easily
reproduce. Is there indication which method is becoming too large? Let
me know what else I can do to help.

Thanks,
Kevin

On Tue, Aug 26, 2008 at 11:37 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> Hi Kevin,
>
> I have raised:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=245274
>
> to look at this.
>
> The exception is thrown because the method becomes too large during weaving
> and cannot fit into the max method code size when we come to pack it up and
> write it to disk.  Why is it bigger than previously?  I'm thinking right now
> that it is this:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=243192
>
> which I only fixed a week ago.  That fix is in the latest dev builds of
> AspectJ (as we get ready for AspectJ 1.6.2) - can you please try it out? The
> dev builds are available at the top of the download page.
>
> It is possible that weaving can cause a method to become too large - and we
> currently do not have a solution to that (we have open bugs relating to it),
> but if it previously didn't get too big, there is no reason why it should
> now be too big.  If you try it out with a dev build and it still fails, I'll
> probably ask you for the extra materials to recreate it.  If nothing else
> I'll certainly change the exception message from 'Argh!' ;)
>
> cheers,
> Andy.
>
> 2008/8/25 Kevin Hoffman <kevinjohnhoffman@xxxxxxxxx>
>>
>> Hello,
>>
>> I'm using the aj5 script to perform dynamic weaving on Xalan for Java.
>> Things were working fine when we were using AspectJ 1.5. Recently I
>> upgraded to version 1.6.1 and recompiled my aspects using the newer
>> compiler. The runtime weaving / aspects still work most of the time,
>> but I have encountered an important case where AspectJ core-dumps with
>> ajcore files when trying to dynamically weave a certain class:
>>
>> Aug 25, 2008 6:20:52 PM org.aspectj.weaver.tools.Jdk14Trace error
>> SEVERE: org/apache/xalan/xslt/Process
>> java.lang.IllegalStateException: Argh!
>>    at
>> org.aspectj.apache.bcel.generic.InstructionBranch.updatePosition(InstructionBranch.java:178)
>>    at
>> org.aspectj.apache.bcel.generic.BranchHandle.updatePosition(BranchHandle.java:92)
>>    at
>> org.aspectj.apache.bcel.generic.InstructionList.setPositions(InstructionList.java:905)
>>    at
>> org.aspectj.apache.bcel.generic.InstructionList.setPositions(InstructionList.java:826)
>>    at
>> org.aspectj.apache.bcel.generic.InstructionList.getByteCode(InstructionList.java:931)
>>    at
>> org.aspectj.apache.bcel.generic.MethodGen.getMethod(MethodGen.java:699)
>>    ...
>>
>> Process is a class that has a main method. (I'm able to weave other
>> classes not from Xalan that have main methods just fine.) I have tried
>> compiling Xalan with Java 1.4 or 1.5 but it doesn't affect the result.
>> I haven't tried compiling with 1.6.
>>
>> I still have the JAR of my aspects that were compiled with AspectJ
>> 1.5. Using the JAR of aspects compiled with AspectJ 1.5 with the
>> AspectJ 1.6 runtime weaver produces the same error. Using the AspectJ
>> 1.5 runtime weaver with the aspects compiled with AspectJ 1.5 still
>> works fine. (and using the AspectJ 1.5 runtime with the aspects
>> compiled with AspectJ 1.6 isn't possible...)
>>
>> Here are links to the ajcore files (two ajcore files generated per
>> attempt at weaving the class):
>>
>> http://www.cs.purdue.edu/homes/kjhoffma/ajcore.20080825.182052.910.txt
>> http://www.cs.purdue.edu/homes/kjhoffma/ajcore.20080825.182053.153.txt
>>
>> The Java class file that it is having trouble weaving is also available:
>>
>> http://www.cs.purdue.edu/homes/kjhoffma/Process.class
>>
>> I can provide information to download the full package with JARs and
>> scripts to reproduce off-list. Let me know what else I can gather to
>> help get this issue fixed.
>>
>> Thanks,
>> Kevin
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users