Community
Participate
Working Groups
1. Open a file. 2. Make it dirty. 3. Drag the editor outside the shared area into another stack. 4. Window > Open Perspective > Debug 5. Right-click on the 'Java' perspective > Close 6. When promped, click 'No'. 7. Open the same file. Caused by: java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.getParentWithContext(PartServiceImpl.java:227) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.internalFixContext(PartServiceImpl.java:275) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:251) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:774) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:827) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2210) at org.eclipse.ui.internal.WorkbenchPage.access$14(WorkbenchPage.java:2177) at org.eclipse.ui.internal.WorkbenchPage$6.run(WorkbenchPage.java:2159) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2155) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2139) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2130) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
When the DND operation was performed in step 3, the part stack in the editor area does not appear to have set its selected element to null.
Created attachment 181142 [details] EPartService patch v1 Shortened steps as follows: 1. Open a file. 2. Drag the editor outside the shared area into another stack. 3. Window > Open Perspective > Debug 4. Right-click on the 'Java' perspective > Close 5. Open the same file. The patch resolves the problem in the EPartService implementation to handle a container's selected element not being one of its children. However, there is of course still the problem in the DND code in that it leaves the model in an inconsistent state.
Created attachment 181175 [details] EPartService patch v2 Added some comments to the code.
Shortened steps as follows: 1. Open a file. 2. Drag the editor outside the shared area into another stack. 3. Close it. 4. Open another file. (In reply to comment #3) > Created an attachment (id=181175) [details] > EPartService patch v2 Patch released to HEAD. The DND code still needs to be changed though. However, since the fix in the EPS has been delivered, the problem will no longer be reproducible.
(In reply to comment #4) > The DND code still needs to be changed though. The code auto-corrects itself now due to the changes from bug 328499 though it still kind of feels to me as though the DND code should be compensating for this itself instead of letting the rendering engine handle it. Thread [main] (Suspended (breakpoint at line 157 in ElementContainerImpl)) PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 157 PartRenderingEngine$4.handleEvent(Event) line: 263 UIEventHandler.handleEvent(Event) line: 41 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<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230 ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148 EventAdminImpl.dispatchEvent(Event, boolean) line: 135 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 73 UIEventPublisher.notifyChanged(Notification) line: 58 PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 ENotificationImpl(NotificationImpl).dispatch() line: 1033 ENotificationImpl(NotificationImpl).dispatch() line: 1038 ElementContainerImpl$1(NotifyingListImpl<E>).remove(int) line: 724 ElementContainerImpl$1(AbstractEList<E>).remove(Object) line: 466 StackDropAgent.drop(MUIElement, CursorInfo) line: 119 DnDManager.startDrag(CursorInfo) line: 201 DnDManager$3.handleEvent(Event) line: 112
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This bug was marked as stalebug a while ago. Marking as worksforme. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.