Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347471 - Shared area disappears and then Eclipse becomes unusable
Summary: Shared area disappears and then Eclipse becomes unusable
Status: VERIFIED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows All
: P3 critical (vote)
Target Milestone: 4.1 RC4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 344621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-27 11:19 EDT by Remy Suen CLA
Modified: 2011-06-06 10:34 EDT (History)
1 user (show)

See Also:
remy.suen: review+


Attachments
Image update patch v1 (7.62 KB, patch)
2011-05-28 20:14 EDT, Remy Suen CLA
no flags Details | Diff
Alternative patch...forces the image back to the 'original' before disposing a shared part (2.79 KB, patch)
2011-05-30 15:50 EDT, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-05-27 11:19:36 EDT
I tried switching perspectives at some point and then realized my shared area disappeared. Trying to use Tom's editor to salvage the situation didn't help. These were the first four exceptions that happened before the whole system decided not to paint properly and I was forced to shutdown Eclipse.

org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.graphics.Image.getBounds(Image.java:1164)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:246)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:148)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:224)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:152)
	at org.eclipse.e4.ui.widgets.CTabFolder.updateTabHeight(CTabFolder.java:3620)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3388)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.adjustTR(StackRenderer.java:405)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:203)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:137)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:109)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$10.widgetSelected(PerspectiveSwitcher.java:348)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:944)

org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.graphics.Image.getBounds(Image.java:1164)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:246)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:148)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:224)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:152)
	at org.eclipse.e4.ui.widgets.CTabFolder.updateTabHeight(CTabFolder.java:3620)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3388)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3348)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.clearTR(StackRenderer.java:382)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:150)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.access$0(LazyStackRenderer.java:141)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:62)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$10.widgetSelected(PerspectiveSwitcher.java:348)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:944)

!ENTRY org.eclipse.equinox.event 4 0 2011-05-27 11:11:07.437
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1f6d00c
!STACK 0
org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.graphics.Image.getBounds(Image.java:1164)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:246)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:148)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:224)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:152)
	at org.eclipse.e4.ui.widgets.CTabFolder.updateTabHeight(CTabFolder.java:3620)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3388)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.adjustTR(StackRenderer.java:405)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:203)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:137)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:109)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$10.widgetSelected(PerspectiveSwitcher.java:348)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:944)

!ENTRY org.eclipse.equinox.event 4 0 2011-05-27 11:11:08.421
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1f6d00c
!STACK 0
org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.graphics.Image.getBounds(Image.java:1164)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:246)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:148)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:224)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:152)
	at org.eclipse.e4.ui.widgets.CTabFolder.updateTabHeight(CTabFolder.java:3620)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3388)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3348)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.clearTR(StackRenderer.java:382)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:150)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.hideElementRecursive(LazyStackRenderer.java:173)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.access$0(LazyStackRenderer.java:141)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:62)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$10.widgetSelected(PerspectiveSwitcher.java:348)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:944)
Comment 1 Remy Suen CLA 2011-05-27 13:02:21 EDT
*** Bug 344621 has been marked as a duplicate of this bug. ***
Comment 2 Remy Suen CLA 2011-05-28 17:23:25 EDT
Got hit by this again after reproducing bug 347561.
Comment 3 Remy Suen CLA 2011-05-28 17:36:20 EDT
1. Open the 'Debug' perspective.
2. Open the 'Team Synchronizing' perspective.
3. Open the 'Java' perspective.
4. Open the 'Team Synchronizing' perspective.
5. Open the 'Debug' perspective.
6. Open the 'History' view.
7. Detach the 'History' view.
8. Window > Reset Perspective > OK
9. Open the 'Java' perspective.
10. Open the 'Team Synchronizing' perspective. The shared area will now disappear.

org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.graphics.Image.getBounds(Image.java:1164)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:246)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:148)
	at org.eclipse.e4.ui.widgets.CTabFolderRenderer.computeSize(CTabFolderRenderer.java:224)
	at org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering.computeSize(CTabRendering.java:152)
	at org.eclipse.e4.ui.widgets.CTabFolder.updateTabHeight(CTabFolder.java:3627)
	at org.eclipse.e4.ui.widgets.CTabFolder.setTopRight(CTabFolder.java:3395)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.adjustTR(StackRenderer.java:405)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:203)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showElementRecursive(LazyStackRenderer.java:258)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.showTab(LazyStackRenderer.java:137)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:109)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4681)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:182)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:135)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher$10.widgetSelected(PerspectiveSwitcher.java:348)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
Comment 4 Remy Suen CLA 2011-05-28 17:51:07 EDT
Less mundane steps as follows.

1. Open the 'Debug' perspective.
2. Open the 'Team Synchronizing' perspective.
3. Open the 'Debug' perspective.
4. Activate the 'Tasks' view.
5. Window > Reset Perspective > OK
6. Open the 'Team Synchronizing' perspective. The shared area will now
disappear.
Comment 5 Remy Suen CLA 2011-05-28 18:07:21 EDT
Introduced by the implementation of bug 318866.

(In reply to comment #4)
> 2. Open the 'Team Synchronizing' perspective.

Note that this perspective has the 'Tasks' view there.

> 4. Activate the 'Tasks' view.

This creates the view and also causes updateImages(MPart) to be called, making all tab items with placeholders representing this view use the image returned by the workbench part's getTitleImage() image.

> 5. Window > Reset Perspective > OK

During the reset, it is determined that the 'Tasks' part is no longer needed (it is obscured in both the 'Debug' and 'Team Synchronizing' perspectives). As a result, it is destroyed and its representing image is also destroyed. Remember though that this image was used _all_ placeholders when step 4 happened above.

> 6. Open the 'Team Synchronizing' perspective. The shared area will now
> disappear.

Now we try to switch to this other perspective but the 'Tasks' view that's in this perspective's tab folder is now using a destroyed image for its tab item (as explained above) and the whole thing blows up.

Disposal trace from step 5 below:

Thread [main] (Suspended (breakpoint at line 1042 in Image))	
	Image.destroy() line: 1042	
	Image(Resource).dispose() line: 66	
	URLImageDescriptor(ImageDescriptor).destroyResource(Object) line: 176	
	DeviceResourceManager.deallocate(Object, DeviceResourceDescriptor) line: 63	
	DeviceResourceManager(AbstractResourceManager).destroy(DeviceResourceDescriptor) line: 112	
	DeviceResourceManager(ResourceManager).destroyImage(ImageDescriptor) line: 227	
	TasksView(WorkbenchPart).dispose() line: 109	
	TasksView(ExtendedMarkersView).dispose() line: 617	
	CompatibilityView(CompatibilityPart).invalidate() line: 170	
	CompatibilityView(CompatibilityPart).destroy() line: 323	
	GeneratedMethodAccessor25.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	MethodRequestor.execute() line: 56	
	InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 828	
	InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 808	
	InjectorImpl.uninject(Object, PrimaryObjectSupplier) line: 167	
	FieldRequestor(Requestor).uninject(Object, PrimaryObjectSupplier) line: 122	
	ContextObjectSupplier$ContextInjectionListener.update(IEclipseContext, int, Object[]) line: 69	
	TrackableComputationExt.update(ContextChangeEvent) line: 88	
	EclipseContext.removeListenersTo(Object) line: 439	
	ContextInjectionFactory.uninject(Object, IEclipseContext) line: 135	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 793	
	PartRenderingEngine.access$3(PartRenderingEngine, MUIElement) line: 728	
	PartRenderingEngine$8.run() line: 723	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 708	
	ElementReferenceRenderer.disposeWidget(MUIElement) line: 108	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 784	
	PartRenderingEngine.access$3(PartRenderingEngine, MUIElement) line: 728	
	PartRenderingEngine$8.run() line: 723	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 708	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 761	
	PartRenderingEngine.access$3(PartRenderingEngine, MUIElement) line: 728	
	PartRenderingEngine$8.run() line: 723	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 708	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 761	
	PartRenderingEngine.access$3(PartRenderingEngine, MUIElement) line: 728	
	PartRenderingEngine$8.run() line: 723	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 708	
	PartRenderingEngine$1.handleEvent(Event) line: 137	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4681	
	E4Application$1.syncExec(Runnable) line: 182	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 58	
	PartSashContainerImpl(BasicNotifierImpl).eNotify(Notification) line: 380	
	PartSashContainerImpl(UIElementImpl).setToBeRendered(boolean) line: 290	
	WorkbenchPage.resetPerspective() line: 2937
Comment 6 Remy Suen CLA 2011-05-28 18:14:09 EDT
Now that the cause has been identified, the steps can be shortened even further by taking the 'Team Synchronizing' perspective out of the equation.

1. Open the 'Debug' perspective.
2. Open the 'Java' perspective.
3. Open the 'Tasks' view.
4. Window > Reset Perspective > OK
5. Open the 'Debug' perspective. The shared area will now
disappear.
Comment 7 Remy Suen CLA 2011-05-28 20:14:22 EDT
Created attachment 196837 [details]
Image update patch v1

The suggested patch records the original image that was used to represent the part prior to its construction, then during deconstruction we restore the original image to all representing elements so that any disposal of the previously set images by the workbench part will not affect the UI.
Comment 8 Eric Moffatt CLA 2011-05-30 15:50:28 EDT
Created attachment 196923 [details]
Alternative patch...forces the image back to the 'original' before disposing a shared part


This is more e4-centric in that it will work even if it's an e4 RCP app that has been messing with the image.

It also has a fix for a defect in the StackRenderer that would only update the tabs for perspectives where the view has be rendered at least once. Before this fix and given the proposed scenario if you were to change the label of the part from 'Tasks' to 'Foo' only the label in the Java perspective would have changed, the tab for the Tasks view in the Debug perspective would still read 'Tasks'.
Comment 9 Eric Moffatt CLA 2011-05-30 15:51:16 EDT
Remy, take a look...
Comment 10 Remy Suen CLA 2011-05-30 16:19:24 EDT
(In reply to comment #8)
> Created attachment 196923 [details]
> Alternative patch...forces the image back to the 'original' before disposing a
> shared part

This looks safe to me and the bug itself is critical enough to warrant a fix this late in the cycle given that the user has to restart Eclipse, +1.
Comment 11 Eric Moffatt CLA 2011-06-01 11:24:56 EDT
Committed in >20110601. Applied the patch.
Comment 12 Eric Moffatt CLA 2011-06-01 11:29:00 EDT
Updating milestone...
Comment 13 Eric Moffatt CLA 2011-06-06 10:34:44 EDT
Verified in I20110604-2201