Question

I built an editor part in eclipse to visualize a Zest graph. My problem: if I try to close an editor part which contains a big graph (~6000 nodes, 9000 edges), eclipse can't handle the closing operation and hangs up.

Any ideas to solve the problem or debug it?

I think the problem is to dispose the graph object, but I have not idea to solve it.

Thanks in advance!

Was it helpful?

Solution 2

The problem was the method "org.eclipse.gef4.zest.layouts.algorithms.TreeLayoutObserver.TreeNode.isAncestorO‌​f(TreeNode descendant)". I fixed it for me and I will report a bug (for bug id show in the comments). If someone needs a quick bug fix:

old version:

    public boolean isAncestorOf(TreeNode descendant) {
        while (descendant.depth > this.depth) {
            descendant = descendant.parent;
        }
        return descendant == this;
    }

new version:

    public boolean isAncestorOf(TreeNode descendant) {
        while (descendant.depth > this.depth) {
            if (descendant == descendant.parent) {
                return false;
            } else {
                descendant = descendant.parent;
            }
        }
        return descendant == this;
    }

OTHER TIPS

To debug it, I'd try to look into the Eclipse log file (workspace/.metadata/.log) for clues on what happened. It might be some memory issue. If it sounds like that form the log file, you could try to alter your eclipse.ini config, in particular the -XX:MaxPermSize, -Xms, and -Xmx values (see http://wiki.eclipse.org/Eclipse.ini).

If the problem persists with reasonable memory values, it would be great if you could file a bug: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GEF&component=Zest

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top