Project: Eclipse_Platform_UI
Bug 305715 Opening multiple views causes SWTException in renderer
Reported: 2010-03-12 13:19:30 | Status: resolved fixed

1. Open the compatibility layer with a fresh target workspace. 2. Window > Show View 3. Select 'Error Log', 'Expressions', 'Help', 'History' and 'Javadoc'. Click 'OK'. 4. The views will start to render and then two SWTExceptions will be thrown. !ENTRY org.eclipse.ui 4 4 2010-03-12 13:03:55.218 !MESSAGE unsupported: addPostSelectionListener (delegating to addSelectionListener for now) 2010-03-12 13:03:55.640 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/application/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@7e067e06 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Widget.error(Widget.java:467) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340) at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1029) at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1037) at org.eclipse.swt.widgets.Control.fixFocus(Control.java:936) at org.eclipse.swt.widgets.Control.setVisible(Control.java:3386) at org.eclipse.swt.custom.CTabItem.setControl(CTabItem.java:301) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.createTab(StackRenderer.java:277) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.childRendered(StackRenderer.java:322) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:354) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.createGui(PartRenderingEngine.java:392) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.showTab(StackRenderer.java:455) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:188) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:198) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:139) 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:74) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:59) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:280) at org.eclipse.e4.ui.model.application.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:135) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.activate(PartServiceImpl.java:309) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.showNewPart(PartServiceImpl.java:492) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.showPart(PartServiceImpl.java:517) at org.eclipse.e4.internal.ide.application.ShowViewHandler.execute(ShowViewHandler.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:97) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:61) at org.eclipse.e4.core.services.internal.context.ContextInjector.invokeUsingClass(ContextInjector.java:262) at org.eclipse.e4.core.services.internal.context.ContextInjector.invoke(ContextInjector.java:249) at org.eclipse.e4.core.services.injector.Injector.invoke(Injector.java:45) at org.eclipse.e4.core.services.context.spi.ContextInjectionFactory.invoke(ContextInjectionFactory.java:137) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:132) at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:55) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:97) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:61) at org.eclipse.e4.core.services.internal.context.ContextInjector.invokeUsingClass(ContextInjector.java:262) at org.eclipse.e4.core.services.internal.context.ContextInjector.invoke(ContextInjector.java:249) at org.eclipse.e4.core.services.injector.Injector.invoke(Injector.java:45) at org.eclipse.e4.core.services.context.spi.ContextInjectionFactory.invoke(ContextInjectionFactory.java:137) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:132) at org.eclipse.e4.workbench.ui.renderers.swt.MenuItemRenderer$3.widgetSelected(MenuItemRenderer.java:221) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4037) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3628) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$5.run(PartRenderingEngine.java:552) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:472) at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:107) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:526) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:512) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1406) at org.eclipse.equinox.launcher.Main.main(Main.java:1382) !ENTRY org.eclipse.ui 4 4 2010-03-12 13:03:56.265 !MESSAGE unsupported: removePostSelectionListener (delegating to removeSelectionListener for now) !ENTRY org.eclipse.ui 4 4 2010-03-12 13:03:56.640 !MESSAGE unsupported: addPostSelectionListener (delegating to addSelectionListener for now) !ENTRY org.eclipse.ui 4 4 2010-03-12 13:03:56.796 !MESSAGE unsupported: removePostSelectionListener (delegating to removeSelectionListener for now) 2010-03-12 13:03:56.984 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/application/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@7e067e06 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Widget.error(Widget.java:467) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340) at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1029) at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1037) at org.eclipse.swt.widgets.Control.fixFocus(Control.java:936) at org.eclipse.swt.widgets.Control.setVisible(Control.java:3386) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2700) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2659) at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.showTab(StackRenderer.java:462) at org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:188) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:198) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:139) 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:74) at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:59) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:280) at org.eclipse.e4.ui.model.application.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:135) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.activate(PartServiceImpl.java:309) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.showExistingPart(PartServiceImpl.java:458) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.showPart(PartServiceImpl.java:526) at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.showPart(PartServiceImpl.java:508) at org.eclipse.e4.internal.ide.application.ShowViewHandler.execute(ShowViewHandler.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:97) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:61) at org.eclipse.e4.core.services.internal.context.ContextInjector.invokeUsingClass(ContextInjector.java:262) at org.eclipse.e4.core.services.internal.context.ContextInjector.invoke(ContextInjector.java:249) at org.eclipse.e4.core.services.injector.Injector.invoke(Injector.java:45) at org.eclipse.e4.core.services.context.spi.ContextInjectionFactory.invoke(ContextInjectionFactory.java:137) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:132) at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:55) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.e4.core.services.internal.context.InjectionMethod.callMethod(InjectionMethod.java:97) at org.eclipse.e4.core.services.internal.context.InjectionMethod.invoke(InjectionMethod.java:61) at org.eclipse.e4.core.services.internal.context.ContextInjector.invokeUsingClass(ContextInjector.java:262) at org.eclipse.e4.core.services.internal.context.ContextInjector.invoke(ContextInjector.java:249) at org.eclipse.e4.core.services.injector.Injector.invoke(Injector.java:45) at org.eclipse.e4.core.services.context.spi.ContextInjectionFactory.invoke(ContextInjectionFactory.java:137) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:132) at org.eclipse.e4.workbench.ui.renderers.swt.MenuItemRenderer$3.widgetSelected(MenuItemRenderer.java:221) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4037) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3628) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$5.run(PartRenderingEngine.java:552) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:472) at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:107) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:526) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:512) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1406) at org.eclipse.equinox.launcher.Main.main(Main.java:1382)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/SelectionService.java