[abc-users] InternalCompilerError: unhandled exception during weaving/optimisation

From: Henrique Rebêlo <hemr_at_cin.ufpe.br>
Date: Fri, 6 Mar 2009 16:14:20 -0300

In order to give an example using a standard Java program, follows as an
attached file a simple java project that we can compile using abc or ajc
weavers. However, as I mentioned before, when we compile such attached
project using the abc weaver, we got a compile time error...

* [java] Exception in thread "main" polyglot.util.InternalCompilerError:
unhandled exception during weaving/optimisation
     [java] at
abc.main.CompileSequence.runSequence(CompileSequence.java:142)
     [java] at abc.main.Main.run(Main.java:406)
     [java] at abc.main.Main.main(Main.java:144)
     [java] Caused by: polyglot.util.InternalCompilerError: Exception while
processing <test.S: boolean accessor$checkPre$m$21(int,test.I)>
     [java] at abc.main.CompileSequence.weave(CompileSequence.java:414)
     [java] at
abc.main.CompileSequence.runSequence(CompileSequence.java:115)
     [java] ... 2 more
     [java] Caused by: java.lang.NullPointerException
     [java] at soot.AbstractValueBox.setValue(AbstractValueBox.java:42)
     [java] at
soot.jimple.internal.JimpleLocalBox.<init>(JimpleLocalBox.java:39)
     [java] at soot.jimple.Jimple.newLocalBox(Jimple.java:850)
     [java] at
soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:42)
     [java] at
soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:463)
     [java] at
abc.soot.util.MethodAccessorMethodSource.getBody(MethodAccessorMethodSource.java:100)
     [java] at
soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
     [java] at soot.SootMethod.retrieveActiveBody(SootMethod.java:329)
     [java] at abc.main.CompileSequence.weave(CompileSequence.java:410)
     [java] ... 3 more
     [java] Java Result: 1
*

If someone could show me how I can mitigate this problem ...

Note: To run the attached sample, you need to put into lib directory the
AspectJ weavers (.jar)
        files... Since I could not sent it with the source code. This sample
includes an ant task to facilitate the use of the sample!

Henrique Rebêlo

On Wed, Mar 4, 2009 at 6:31 PM, Henrique Rebêlo <hemr_at_dsc.upe.br> wrote:

> Just to add some information, this problem occurs when I trying to use
> inter-types to add methods into types (such as Interfaces). These
> inter-types I use to check precondition inheritance...
>
> regards,
>
> Henrique Rebêlo
>
>
> On Wed, Mar 4, 2009 at 6:15 PM, Henrique Rebêlo <hemr_at_dsc.upe.br> wrote:
>
>> Hello,
>>
>> I'm new to this list, and I work with AspectJ using both ajc and abc
>> weavers.
>>
>> My work consists in converting JML specifications into aspects to check
>> those specifications during runtime. Since I allow both Java SE and Java ME
>> dynamic assertion checking... enventually we need to use abc for constrained
>> environments such as Java ME.
>>
>> In this way, I got an error during a Java ME compilation using abc...
>>
>>
>> thread "main" polyglot.util.InternalCompilerError: unhandled
>> exception during weaving/optimisation
>> [java] at
>> abc.main.CompileSequence.runSequence(CompileSequence.java:142)
>> [java] at abc.main.Main.run(Main.java:406)
>> [java] at abc.main.Main.main(Main.java:144)
>> [java] Caused by: polyglot.util.InternalCompilerError: Exception
>> while processing <examples.cityguide.MapCanvas: boolean
>> accessor$checkPre$visitorStateChanged$251(examples.cityguide.CityMap,examples.cityguide.MapListener)>
>> [java] at
>> abc.main.CompileSequence.weave(CompileSequence.java:414)
>> [java] at
>> abc.main.CompileSequence.runSequence(CompileSequence.java:115)
>> [java] ... 2 more
>> [java] Caused by: java.lang.NullPointerException
>> [java] at
>> soot.AbstractValueBox.setValue(AbstractValueBox.java:42)
>> [java] at
>> soot.jimple.internal.JimpleLocalBox.<init>(JimpleLocalBox.java:39)
>> [java] at soot.jimple.Jimple.newLocalBox(Jimple.java:850)
>> [java] at
>> soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:42)
>> [java] at
>> soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:463)
>> [java] at
>> abc.soot.util.MethodAccessorMethodSource.getBody(MethodAccessorMethodSource.java:100)
>> [java] at
>> soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
>> [java] at soot.SootMethod.retrieveActiveBody(SootMethod.java:329)
>> [java] at
>> abc.main.CompileSequence.weave(CompileSequence.java:410)
>> [java] ... 3 more
>> [java] Java Result: 1
>>
>> the files that I used are in an attached file!!
>>
>> So, can someone help me with this issue?. Its important to note that this
>> code works fine (compiles ok) using ajc!
>>
>> the above error occurs using both abc 1.2 and abc 1.3...
>>
>> regards,
>>
>> Henrique Rebêlo
>>
>> --
>> Henrique Rebêlo, Centro de Informática, UFPE
>> http://www.cin.ufpe.br/~hemr <http://www.cin.ufpe.br/%7Ehemr>
>>
>
>
>
> --
> Henrique Rebêlo, Centro de Informática, UFPE
> http://www.cin.ufpe.br/~hemr <http://www.cin.ufpe.br/%7Ehemr>
>

-- 
Henrique Rebêlo, Centro de Informática, UFPE
http://www.cin.ufpe.br/~hemr

Received on Fri Mar 06 2009 - 19:14:26 GMT

This archive was generated by hypermail 2.2.0 : Sat Mar 07 2009 - 17:50:11 GMT