Bug 258653

Summary: crash weaving staticinitialization
Product: [Tools] AspectJ Reporter: mauro <mauro>
Component: CompilerAssignee: AJDT-inbox <AJDT-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: aclement, andrew.eisenberg
Version: DEVELOPMENT   
Target Milestone: 1.6.3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
simply using staticinitialization none

Description mauro CLA 2008-12-12 08:15:02 EST
Created attachment 120313 [details]
simply using staticinitialization

Build ID: M20080911-1700

Steps To Reproduce:
see attachment

More information:
AJDT Version: 1.6.2.20081210195409
AspectJ version: 1.6.3.20081210163000

the same when not using annotations
Comment 1 Andrew Clement CLA 2008-12-12 11:13:57 EST
can you tell us what error you get? what is the stack trace?
Comment 2 mauro CLA 2008-12-12 11:41:34 EST
(In reply to comment #1)
> can you tell us what error you get? what is the stack trace?

java.lang.NullPointerException
at org.aspectj.weaver.model.AsmRelationshipProvider.getNode(AsmRelationshipProvider.java:437)
at org.aspectj.weaver.model.AsmRelationshipProvider.adviceMunger(AsmRelationshipProvider.java:372)
at org.aspectj.weaver.bcel.BcelWorld.reportMatch(BcelWorld.java:132)
at org.aspectj.weaver.Shadow.implementMungers(Shadow.java:614)
at org.aspectj.weaver.Shadow.implement(Shadow.java:527)
at org.aspectj.weaver.bcel.BcelCl ... staticinit.print ()V
    |               RETURN
    staticinitialization(void MyType.<clinit>())
  end static void <clinit>()
end public class MyType

Comment 3 Andrew Eisenberg CLA 2008-12-12 11:45:42 EST
Do you consistently get this error, or does it happen only sometimes?
Comment 4 Andrew Eisenberg CLA 2008-12-12 11:49:36 EST
I have tried your test case and cannot reproduce, so please provide more information.
Comment 5 mauro CLA 2008-12-12 11:53:26 EST
(In reply to comment #3)
> Do you consistently get this error, or does it happen only sometimes?
> 

the error is always there...

I switched back to
Version: 1.6.1.20081104192500
AspectJ version: 1.6.3.20081028135200

and everything works fine...

I created a workspace with only that file in it... so I don't know what details could be useful...
Comment 6 Andrew Eisenberg CLA 2008-12-12 12:02:25 EST
OK.  Realized that I wasn't using the same version.  Just tried it again from the latest dev branch and I am able to reproduce this problem on the code supplied.
Comment 7 Andrew Clement CLA 2008-12-12 12:17:23 EST
yey, just the stack trace I wanted to work on today, thanks for the simple test program.  test and fix is in AJ, will be in AJDT in a bit.  bit surprised none of our own tests triggered this situation, hmmm.
Comment 8 mauro CLA 2008-12-12 12:42:27 EST
(In reply to comment #7)
> yey, just the stack trace I wanted to work on today

happy to be usefull...
may I suggest to use the time you saved ;) to take a look at bug 253751 that really hurts me?