| Summary: | Critical code in Graph.dispose() may lead to deadlock and frozen eclipse | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Jan Mauersberger <mauersberger> |
| Component: | GEF-Legacy Zest | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | nyssen, steeg |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Thanks, that's a nasty freeze indeed - fixed in 1.x head and 2.x master, see GraphTests#testDisposeGraphWithDisposedNode and ...WithDisposedConnection. http://git.eclipse.org/c/gef/org.eclipse.zest.git/commit/?id=e071b4d85594311 |
Build Identifier: The code in Graph.dispose() starts with: while (nodes.size() > 0) { GraphNode node = (GraphNode) nodes.get(0); if (node != null && !node.isDisposed()) { node.dispose(); } } Disposed nodes are not removed in the code but only implicitly by a call to node.dispose(). Hence in case a node is in the graph that is already disposed for some reason an infinite loop is entered. Don't ask me how I managed to get a disposed node in there but I did and the whole eclipse did freeze. It might be that the disposed node crept in due to another bug (with exception) and essential code did not get executed. Anyway, I think we could make this code more robust since there is no reason why we should check for disposed nodes because any disposed one causes an inifite loop Reproducible: Always