Community
Participate
Working Groups
When letting ImageDescriptor dispose images as in original JFace code, the following exception has been observed: ERROR: Exception while disposing shell: Shell {RAP Workbench Demo} org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3199) at org.eclipse.swt.SWT.error(SWT.java:3119) at org.eclipse.swt.SWT.error(SWT.java:3090) at org.eclipse.swt.graphics.Image.getBounds(Image.java:264) at org.eclipse.swt.widgets.TreeItem.getPreferredWidth(TreeItem.java:1231) at org.eclipse.swt.widgets.Tree.needsHScrollBar(Tree.java:1839) at org.eclipse.swt.widgets.Tree.updateScrollBars(Tree.java:1854) at org.eclipse.swt.widgets.TreeItem.releaseParent(TreeItem.java:1625) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:775) at org.eclipse.swt.widgets.TreeItem.releaseChildren(TreeItem.java:1614) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.TreeItem.releaseChildren(TreeItem.java:1614) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Tree.releaseChildren(Tree.java:1564) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:817) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:817) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:817) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:817) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:817) at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1062) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774) at org.eclipse.swt.widgets.Display.disposeShells(Display.java:728) at org.eclipse.swt.widgets.Display.release(Display.java:694) at org.eclipse.swt.graphics.Device.dispose(Device.java:282) at org.eclipse.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:159) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:128) at java.lang.Thread.run(Thread.java:619) at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102) To reproduce, open the default workbench demo, expand the Tree to show a decorated image, and wait for session timeout. Problem is that the image is disposed before the Tree's items. As a workaround, the code in ImageDescriptor#destroyResource() is disabled.
The issue has been fixed with the Tree/TreeItem refactorings (check for Tree isInDispose in TreeItem#releaseParent) in RAP 1.5. Reactivate the code in ImageDescriptor#destroyResource() with commit 80869bc719b3c0b2a3ca2a597b0d7a1e31777b16.
The issue is still valid. Reproducible with Examples Demo when reloading the demo (F5). Revert the commit 80869bc719b3c0b2a3ca2a597b0d7a1e31777b16.
*** Bug 388728 has been marked as a duplicate of this bug. ***