Project: AspectJ
Bug 152631 Problem with decp on an aspect using cflow
Reported: 2006-08-02 13:26:23 | Status: resolved fixed

This occurs in the AspectJ build in AJDT from August 1 but not from July 31: java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelTypeMunger.enforceDecpRule1_abstractMethodsImplemented(BcelTypeMunger.java:250) at org.aspectj.weaver.bcel.BcelTypeMunger.mungeNewParent(BcelTypeMunger.java:194) at org.aspectj.weaver.bcel.BcelTypeMunger.munge(BcelTypeMunger.java:106) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:454) at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:119) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1597) at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1548) at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1328) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1124) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:451) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:389) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:377) at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:98) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:533) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:891) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:246) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:165) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:122) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) trouble in:public class glassbox.agent.ErrorContainmentTest$ErrorMockAspect extends java.lang.Object implements glassbox.agent.api.NotSerializable: private static Throwable ajc$initFailureCause [Synthetic] public static final glassbox.agent.ErrorContainmentTest$ErrorMockAspect ajc$perSingletonInstance [Synthetic] static void <clinit>(): catch java.lang.Throwable -> E0 | INVOKESTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$postClinit ()V (line 60) catch java.lang.Throwable -> E0 GOTO L0 E0: ASTORE_0 ALOAD_0 PUTSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$initFailureCause Ljava/lang/Throwable; L0: RETURN end static void <clinit>() void <init>(): ALOAD_0 // Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; this (line 60) INVOKESPECIAL java.lang.Object.<init> ()V RETURN end void <init>() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$1$9589fc() AdviceAttribute(before, (scope() && call(* hook1())), 0, 1670) : NEW java.lang.RuntimeException (line 64) DUP LDC "rte" INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V ATHROW end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$1$9589fc() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$2$f75db3e2() AdviceAttribute(before, execution(* glassbox.agent.ErrorContainmentTest.hook5()), 0, 1764) : NEW java.lang.RuntimeException (line 67) DUP LDC "rte" INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V ATHROW end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$2$f75db3e2() public void ajc$around$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$3$a3a17d(org.aspectj.runtime.internal.AroundClosure) AdviceAttribute(around, (scope() && call(* hook2())), 1, 1913) : NEW java.lang.Error (line 71) DUP LDC "foo" INVOKESPECIAL java.lang.Error.<init> (Ljava/lang/String;)V ATHROW end public void ajc$around$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$3$a3a17d(org.aspectj.runtime.internal.AroundClosure) static void ajc$around$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$3$a3a17dproceed(org.aspectj.runtime.internal.AroundClosure) throws java.lang.Throwable org.aspectj.weaver.AjAttribute$AjSynthetic@19a01f9 : ALOAD_0 // Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; this (line 1) ICONST_0 ANEWARRAY java.lang.Object INVOKEVIRTUAL org.aspectj.runtime.internal.AroundClosure.run ([Ljava/lang/Object;)Ljava/lang/Object; INVOKESTATIC org.aspectj.runtime.internal.Conversions.voidValue (Ljava/lang/Object;)Ljava/lang/Object; RETURN end static void ajc$around$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$3$a3a17dproceed(org.aspectj.runtime.internal.AroundClosure) throws java.lang.Throwable public void ajc$after$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$4$bfd07f() AdviceAttribute(after, (scope() && call(* hook4())), 0, 1991) : NEW org.aspectj.lang.SoftException (line 74) DUP ACONST_NULL INVOKESPECIAL org.aspectj.lang.SoftException.<init> (Ljava/lang/Throwable;)V ATHROW end public void ajc$after$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$4$bfd07f() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$5$e5bddfdc() AdviceAttribute(before, logErrorInTest(), 0, 2446) : GETSTATIC glassbox.agent.ErrorContainmentTest.logCount I (line 84) ICONST_1 IADD PUTSTATIC glassbox.agent.ErrorContainmentTest.logCount I RETURN (line 85) end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$5$e5bddfdc() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$6$16ecfe62() AdviceAttribute(before, (adviceexecution(* *) && (within(glassbox.util.logging.api.LogManagement) && (cflow(logError()) && cflow((execution(* testLoggingError(..)) && within(glassbox.agent.ErrorContainmentTest)))))), 0, 2506) : GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 87) LDC "match" INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V RETURN (line 88) end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$6$16ecfe62() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$7$e9ae8482() AdviceAttribute(before, (adviceexecution(* *) && (within(glassbox.util.logging.api.LogManagement) && cflow((execution(* testLoggingError(..)) && within(glassbox.agent.ErrorContainmentTest))))), 0, 2721) : GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 90) LDC "match in test" INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V RETURN (line 91) end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$7$e9ae8482() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$8$c6ac5351() AdviceAttribute(before, (adviceexecution(* *) && (within(glassbox.util.logging.api.LogManagement) && cflow(logError()))), 0, 2923) : GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 93) LDC "match in log" INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V RETURN (line 94) end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$8$c6ac5351() public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$9$16ecfe62() AdviceAttribute(before, (adviceexecution(* *) && (within(glassbox.util.logging.api.LogManagement) && (cflow(logError()) && cflow((execution(* testLoggingError(..)) && within(glassbox.agent.ErrorContainmentTest)))))), 0, 3069) : GETSTATIC glassbox.agent.ErrorContainmentTest.recursiveThrows I (line 96) ICONST_1 IADD PUTSTATIC glassbox.agent.ErrorContainmentTest.recursiveThrows I GETSTATIC glassbox.agent.ErrorContainmentTest.recursiveThrows I (line 97) ICONST_2 IF_ICMPGE L0 NEW java.lang.RuntimeException (line 98) DUP LDC "recursive logging failure" INVOKESPECIAL java.lang.RuntimeException.<init> (Ljava/lang/String;)V ATHROW L0: RETURN (line 100) end public void ajc$before$glassbox_agent_ErrorContainmentTest$ErrorMockAspect$9$16ecfe62() public static glassbox.agent.ErrorContainmentTest$ErrorMockAspect aspectOf() org.aspectj.weaver.AjAttribute$AjSynthetic@3cd8fe : GETSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$perSingletonInstance Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; (line 1) IFNONNULL L0 NEW org.aspectj.lang.NoAspectBoundException DUP LDC "glassbox_agent_ErrorContainmentTest$ErrorMockAspect" GETSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$initFailureCause Ljava/lang/Throwable; INVOKESPECIAL org.aspectj.lang.NoAspectBoundException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V ATHROW L0: GETSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$perSingletonInstance Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; ARETURN end public static glassbox.agent.ErrorContainmentTest$ErrorMockAspect aspectOf() public static boolean hasAspect() org.aspectj.weaver.AjAttribute$AjSynthetic@1bd4f6 : GETSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$perSingletonInstance Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; (line 1) IFNULL L0 ICONST_1 IRETURN L0: ICONST_0 IRETURN end public static boolean hasAspect() private static void ajc$postClinit() org.aspectj.weaver.AjAttribute$AjSynthetic@1febf91 : NEW glassbox.agent.ErrorContainmentTest$ErrorMockAspect (line 1) DUP INVOKESPECIAL glassbox.agent.ErrorContainmentTest$ErrorMockAspect.<init> ()V PUTSTATIC glassbox.agent.ErrorContainmentTest$ErrorMockAspect.ajc$perSingletonInstance Lglassbox/agent/ErrorContainmentTest$ErrorMockAspect; RETURN end private static void ajc$postClinit() end public class glassbox.agent.ErrorContainmentTest$ErrorMockAspect when type munging with (BcelTypeMunger ResolvedTypeMunger(Parent, null)) when weaving aspects when weaving when batch building BuildConfig[C:\devel\glassbox\.metadata\.plugins\org.eclipse.ajdt.core\glassboxMonitor.generated.lst] #Files=107 The source is: public class ErrorContainmentTest extends TestCase { ... static aspect ErrorMockAspect implements NotSerializable { ... I will try to narrow this down if the problem isn't obvious.

Files changed in fix:
tests/bugs153/pr152631/EMA.java tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java