Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314341 - [Compatibility] Closing last view throws exception
Summary: [Compatibility] Closing last view throws exception
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.0 RC0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 15:36 EDT by Paul Webster CLA
Modified: 2010-06-04 16:29 EDT (History)
1 user (show)

See Also:


Attachments
Patch to clean up the cleanup addon (3.45 KB, patch)
2010-05-26 14:47 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 Paul Webster CLA 2010-05-25 15:36:36 EDT
I had moved the Outline view out of its location, and the stack didn't go away.

When I restarted, the Templates view appeared in that location.

When I closed the templates view I get the following error:


bash-3.2$ 2010-05-25 15:36:33.416 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/toBeRendered/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@bd30bd3
java.lang.NullPointerException
        at org.eclipse.e4.ui.workbench.addons.cleanupaddon.CleanupAddon$2.handleEvent(CleanupAddon.java:77)
        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:73)
        at org.eclipse.e4.workbench.ui.internal.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.basic.impl.PartImpl.setToBeRendered(PartImpl.java:532)
        at org.eclipse.e4.workbench.ui.internal.PartServiceImpl.hidePart(PartServiceImpl.java:618)
        at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer$4.close(StackRenderer.java:430)
        at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1590)
        at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:261)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1234)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)
        at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$3.run(PartRenderingEngine.java:499)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:438)
        at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:97)
        at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:534)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:520)
        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:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        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:1407)
Comment 1 Eric Moffatt CLA 2010-05-26 14:47:33 EDT
Created attachment 170071 [details]
Patch to clean up the cleanup addon


We now handle both child removal from a container and changes to the TBR state by hiding the container (set TBR false) if there are no more visible children.
Comment 2 Eric Moffatt CLA 2010-05-26 14:50:08 EDT
Committed in >20100526. Applied the patch.

This fixes a number of other issues as well; for example you can now drag views around and the stack will remove itself from the ui...
Comment 3 Eric Moffatt CLA 2010-05-26 14:50:24 EDT
Marking as FIXED...