| Summary: | Closing Viewpart containing a Zest GraphViewer showing Scrollbars throws SWTException: Widget is disposed | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | <h1055071> |
| Component: | GEF-Legacy Zest | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | steeg |
| Version: | 3.7.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
The widget that is complaining of being disposed is the Graph control. The strange thing is that if I do not use a Content Provider and instead add GraphNodes and Connections manually (like the Zest snippet examples) the exception does not occur. Additionally, if I dispose of the Graph control explicitly in the dispose() method of my ViewPart the exception does not occur. Interestingly, setting a breakpoint for when the "Widget is disposed" error occurs shows that the Graph control has not really been disposed but its display field is null causing checkWidget() to throw the error. I guess you could boil it down to org.eclipse.zest.core.widgets.Graph#dispose() is not being invoked when the Viewpart is closed. This gives rise to the problem. Thanks for the bug. I can't reproduce this in master on Mac. Could you try it with the latest nightly build (from the update site below), and attach another stack trace if you get the same error? https://hudson.eclipse.org/hudson/job/gef-zest-nightly/lastSuccessfulBuild/artifact/targetPlatform/ I've tried this on the latest nightly build and so far I've not seen this crash. However, org.eclipse.zest.core.widgets.Graph#dispose() never gets called by any code. Is this correct? I have a GraphViewer in an Eclipse ViewPart, but when I close the Viewpart containing the GraphViewer I would expect the Graph Control to be disposed by its parent? Yes, that doesn't seem right. We have tests that check if the graph control is disposed when the parent is disposed, but indeed Graph#dispose was not actually called. I added a DisposeListener to the Graph constructor in Zest 1.x and 2.x (which is described in the Javadoc of Widget#dispose), and added another test: http://git.eclipse.org/c/gef/org.eclipse.zest.git/commit/?id=f4efb390782df744ba |