Bug 53698

Summary: VerifyError is thrown when trying to run an ajc-built applet in IE using microsoft JVM
Product: [Tools] AspectJ Reporter: Alexey Maksimov <lesha>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.2.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Alexey Maksimov CLA 2004-03-03 20:23:50 EST
Exception occurred during event dispatching:
com.ms.lang.VerifyErrorEx: Aspect.<clinit>: stack overflow
	at Aspect.<clinit>
	at Aspect.aspectOf
	at TestApplet.update
	at com/ms/awt/WComponentPeer.doUpdate
	at com/ms/awt/WComponentPeer.doUpdate
	at com/ms/awt/WUpdate.run
	at com/ms/ui/windowmanager/RunnableMessage.run
	at com/ms/awt/WSystemQueue.getMessage
	at com/ms/awt/WEventQueue.getNextEvent
	at java/awt/EventDispatchThread.run

applet:
public class TestApplet extends Applet {
  private int i;
  
  
  public void init ( ) {
    new Thread ( ) {
      public void run ( ) {
        for ( i = 0; i < 10; i++ ) {
          try {
            sleep ( 500 );
          } catch ( InterruptedException e ) {
            e.printStackTrace();
          }
          repaint();
        }
      }
    }.start();
  }
  
  public void update ( Graphics g ) {
    paint ( g );
  }
  
  public void paint ( Graphics g ) {
    g.setColor ( Color.pink );
    g.fillRect ( 0, 0, getSize().width, getSize().height );
    g.setColor ( Color.black );
    g.drawString ( "" + i, 50, 50 );
  }
}

aspect ( file Aspect.aj ):
aspect Aspect {
  after() returning : !within ( Aspect ) && call ( void paint (..)) {
    System.out.println ( "" + thisJoinPoint );
  }
}

compiled with "-target 1.1"

Note: works perfectly under Java1.4
Comment 1 Mik Kersten CLA 2004-07-27 11:32:52 EDT
Since the Microsoft JVM does not support Java2, AspectJ bytecodes will not run 
on it.  This is a known limitation:

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-
home/doc/faq.html#q:msjvm

Note that Microsoft has declared that the MSJVM will reach its end of life on 
December 31st, 2007.  This means that it will no longer evolve and is not 
available for distribution. 

http://www.microsoft.com/mscorp/java/
Comment 2 Adrian Colyer CLA 2004-10-21 04:32:33 EDT
Fix released as part of AspectJ 1.2.1