Bug 561774 - Couldn't find target for branch: ifeq[153](size3) -> null
Summary: Couldn't find target for branch: ifeq[153](size3) -> null
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.11   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-04 11:19 EDT by Sagar Gandhi CLA
Modified: 2020-04-21 00:48 EDT (History)
2 users (show)

See Also:


Attachments
core dump (205.96 KB, text/plain)
2020-04-04 11:19 EDT, Sagar Gandhi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sagar Gandhi CLA 2020-04-04 11:19:47 EDT
Created attachment 282337 [details]
core dump

[ERROR] com.mycompany.targetclass -- (ClassGenException) Couldn't find target for branch: ifeq[153](size3) -> null
[ERROR] Couldn't find target for branch: ifeq[153](size3) -> null
[ERROR] org.aspectj.apache.bcel.generic.ClassGenException: Couldn't find target for branch: ifeq[153](size3) -> null
[ERROR] at org.aspectj.apache.bcel.generic.InstructionList.<init>(InstructionList.java:223)
[ERROR] at org.aspectj.apache.bcel.generic.MethodGen.<init>(MethodGen.java:212)
[ERROR] at org.aspectj.weaver.bcel.LazyMethodGen.initialize(LazyMethodGen.java:372)
[ERROR] at org.aspectj.weaver.bcel.LazyMethodGen.markAsChanged(LazyMethodGen.java:540)
[ERROR] at org.aspectj.weaver.bcel.LazyMethodGen.getBody(LazyMethodGen.java:929)
[ERROR] at org.aspectj.weaver.bcel.BcelShadow.init(BcelShadow.java:668)
[ERROR] at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2693)
[ERROR] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:480)
[ERROR] at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1692)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1636)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1401)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1183)
[ERROR] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:514)
[ERROR] at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterCompiling(AjPipeliningCompilerAdapter.java:375)
[ERROR] at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$afterReturning$org_aspectj_ajdt_internal_compiler_CompilerAdapter$2$f9cc9ca0(CompilerAdapter.aj:78)

Caused by: org.aspectj.apache.bcel.generic.ClassGenException: Couldn't find target for branch: ifeq[153](size3) -> null
    at org.aspectj.apache.bcel.generic.InstructionList.<init>(InstructionList.java:223)
    at org.aspectj.apache.bcel.generic.MethodGen.<init>(MethodGen.java:212)
    at org.aspectj.weaver.bcel.LazyMethodGen.initialize(LazyMethodGen.java:372)
    at org.aspectj.weaver.bcel.LazyMethodGen.getReturnType(LazyMethodGen.java:920)
    at org.aspectj.weaver.bcel.LazyMethodGen.toShortString(LazyMethodGen.java:562)
    at org.aspectj.weaver.bcel.LazyMethodGen.print(LazyMethodGen.java:603)
    at org.aspectj.weaver.bcel.LazyClassGen.printOne(LazyClassGen.java:860)
    at org.aspectj.weaver.bcel.LazyClassGen.print(LazyClassGen.java:819)
    at org.aspectj.weaver.bcel.LazyClassGen.toLongString(LazyClassGen.java:807)
    at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1711)



Maven

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>${aspectj.maven.plugin.version}</version>

                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.mycomapny</groupId>
                        <artifactId>core</artifactId>
                        <version>1.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aop</artifactId>
                        <version>${org.springframework.version}</version>
                    </dependency>
                </dependencies>

                <configuration>
                    <source>${JAVA_SOURCE_VERSION}</source>
                    <target>${JAVA_TARGET_VERSION}</target>
                    <complianceLevel>${JAVA_TARGET_VERSION}</complianceLevel>
                    <encoding>UTF-8</encoding>
                    <verbose>true</verbose>
                    <Xlint>ignore</Xlint>
                    <weaveDirectories>
                        <weaveDirectory>${project.build.directory}/unwoven-classes</weaveDirectory>
                    </weaveDirectories>
                    <sources>
                        <source/>
                    </sources>
                    <testSources>
                        <source/>
                    </testSources>
                    <forceAjcCompile>true</forceAjcCompile>
                    <excludes>
                        <exclude>**/aspects/**</exclude>
                    </excludes>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                        <aspectLibrary>
                            <groupId>com.mycompany</groupId>
                            <artifactId>common</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                    <showWeaveInfo>true</showWeaveInfo>
                </configuration>

                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
Comment 1 Sagar Gandhi CLA 2020-04-04 11:22:37 EDT
Just to unblock me , Can you please guide me how to debug this error ?.
The exception does not show any line no. It shows opcode.
Comment 2 Sagar Gandhi CLA 2020-04-04 13:17:49 EDT
Issue is strange,

I removed all lamba expressions from the file and compilation succeeded. Then this is surely bug.
Comment 3 Andrew Clement CLA 2020-04-21 00:48:29 EDT
To properly fix this I will need a project that reproduces it. Can you synthesize one from what you've learned about it involving lambdas?