Community
Participate
Working Groups
Created attachment 173559 [details] Stack trace - Start up a clean Eclipse instance; create a project with 2 Java files; open them - Open Debug perspective - Close Debug perspective - Close the Java file NPE: java.lang.NullPointerException at org.eclipse.ui.part.PageBookView$4.partHidden(PageBookView.java:1030) at org.eclipse.ui.internal.WorkbenchPage.firePartHidden(WorkbenchPage.java:2825) at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2818) See the trace stack attached. (Need two editors open to be able to reproduce.)
The remaining editor (i.e. the one that wasn't closed) is being destroyed when the perspective is closed. This is a no-no. Thread [main] (Suspended (breakpoint at line 312 in WorkbenchPage$1)) WorkbenchPage$1.remove(int) line: 312 WorkbenchPage$1.remove(int) line: 1 AbstractList$Itr.remove() line: 452 CompatibilityEditor.preDestroy() line: 94 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 79 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 618 MethodRequestor.execute() line: 47 InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 768 InjectorImpl.uninject(Object, PrimaryObjectSupplier) line: 154 InjectorImpl.disposed(PrimaryObjectSupplier) line: 317 MethodRequestor(Requestor).disposed(PrimaryObjectSupplier) line: 112 ContextObjectSupplier$ContextInjectionListener.update(IEclipseContext, int, Object[], IContextRecorder) line: 59 TrackableComputationExt.update(ContextChangeEvent) line: 90 TrackableComputationExt.doHandleInvalid(ContextChangeEvent, List<Scheduled>) line: 53 TrackableComputationExt(Computation).handleInvalid(ContextChangeEvent, List<Scheduled>) line: 59 EclipseContext.dispose() line: 196 EclipseContext.dispose() line: 186 PartRenderingEngine.clearContext(MContext) line: 561 PartRenderingEngine.removeGui(MUIElement) line: 513 PartRenderingEngine$1.handleEvent(Event) line: 124 UIEventHandler.handleEvent(Event) line: 41 EventHandlerWrapper.handleEvent(Event, Permission) line: 188 EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 198 EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 227 ListenerQueue.dispatchEventSynchronous(int, Object) line: 149 EventAdminImpl.dispatchEvent(Event, boolean) line: 139 EventAdminImpl.sendEvent(Event) line: 78 EventComponent.sendEvent(Event) line: 39 EventBroker.send(String, Object) line: 73 UIEventPublisher.notifyChanged(Notification) line: 58 PerspectiveImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PerspectiveImpl(UIElementImpl).setToBeRendered(boolean) line: 267 ModelServiceImpl.removePerspectiveModel(MPerspective, MWindow) line: 591 WorkbenchPage.closePerspective(IPerspectiveDescriptor, boolean, boolean) line: 1077 PerspectiveSwitcher.closePerspective(MPerspective) line: 458 PerspectiveSwitcher.access$6(PerspectiveSwitcher, MPerspective) line: 455 PerspectiveSwitcher$14.widgetSelected(SelectionEvent) line: 450
Created attachment 173593 [details] Reparent all contexts at or under a referenced (shared) element
Committed in >20100706. Applied the patch.
Marking as FIXED. There may still be a defect where the editor's contexts may not be being reparented during a perspective switch. If so I'll open a separate defect to handle that (less severe) case.