akshattandon / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

Eclipse Crash - Stackoverflow - EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609) #788

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Solution found:
Remove all cyclic project references, clear /target/.

What steps will reproduce the problem?

Unknown. 

1. The project in question uses Maven, and de-lomboked code is used by AspectJ 
in a different project.
2. A Cyclic reference existed between projects.
3. Closing other projects had no influence over the project causing the crash.

Most likely this was caused by a cyclic references introduced in the pom.xml 
file.
The issue didn't disappear though until /target/ was cleared, even when the pom 
file issue was fixed.
The cyclic reference was between a 1.6 & 1.8 compiled project.

What is the expected output? What do you see instead?

I expect Eclipse to not to crash.
I saw:

!ENTRY org.eclipse.core.jobs 4 2 2015-02-16 15:49:22.030
!MESSAGE An internal error occurred during: "Building workspace".
!STACK 0
java.lang.StackOverflowError
    at java.util.AbstractCollection.toArray(AbstractCollection.java:183)
    at java.lang.String.split(String.java:2365)
    at java.lang.String.split(String.java:2409)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:627)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)
    at lombok.eclipse.handlers.EclipseHandlerUtil.makeType(EclipseHandlerUtil.java:609)

What version of the product are you using? On what operating system?

SESSION 2015-02-16 15:48:54.354 -----------------------------------------------
eclipse.buildId=4.4.1.M20140925-0400
java.version=1.8.0_31
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.standard.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product 
org.eclipse.epp.package.standard.product

Original issue reported on code.google.com by Lume...@gmail.com on 16 Feb 2015 at 4:06

GoogleCodeExporter commented 9 years ago
Edit: Not solved.
No cyclic references exist, still causes crashes.

Original comment by Lume...@gmail.com on 16 Feb 2015 at 4:09

GoogleCodeExporter commented 9 years ago
The problem now occurs in the following code:

SearchContext context = null;

// Actually test that the AI finds the correct solution
Object state = context.source();

while (!context.goal()
                .done(context, context.source())) {

    // Search, then apply the move found, finally reset & setup
    context.execute();

    ApplicationStrategy application = context.application();
    Object solution = context.solution();

    if (solution instanceof Node) {
        Node node = (Node) solution;
        //  Object payload = node.getPayload();

        state = context.application()
                .apply(context, state, node.getPayload());              
    } 

    context.reset()
            .source(state);
}

With Eclipse crashing whenever the line with "Object payload = 
node.getPayload();" is uncommented.

This crashes in a project that depends on a project which holds Node.
All classes (SearchContext, Node, etc) heavily use Lombok.

Node:

@Data
@Accessors(chain = true)
@ToString(exclude = { "parent", "children" })
public abstract class Node<A, B extends Node> {

    protected A payload;
    protected B parent;
    protected Array<B> children;

}

Original comment by Lume...@gmail.com on 16 Feb 2015 at 4:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There seems to be a link between "val" and the Node class.
Removing everything but @ToString still causes the crash, but only if "val" is 
used somewhere else in the class that contains the above sample code.

Original comment by Lume...@gmail.com on 16 Feb 2015 at 10:43