Project: Eclipse_Platform_UI
Bug 348215 Reattaching a detached stack with multiple views will cause part disposal
Reported: 2011-06-03 10:35:21 | Status: verified fixed

1. Detach a view. 2. Drag another view to that new stack. 3. Use stack dragging to drag the whole thing back inside the workbench window. 4. Disposals happen. Thread [main] (Suspended (breakpoint at line 322 in CompatibilityPart)) CompatibilityView(CompatibilityPart).destroy() line: 322 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 48 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 37 Method.invoke(Object, Object...) line: 600 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.disposed(PrimaryObjectSupplier) line: 355 FieldRequestor(Requestor).disposed(PrimaryObjectSupplier) line: 112 ContextObjectSupplier$ContextInjectionListener.update(IEclipseContext, int, Object[]) line: 63 TrackableComputationExt.update(ContextChangeEvent) line: 88 TrackableComputationExt.doHandleInvalid(ContextChangeEvent, List<Scheduled>) line: 53 TrackableComputationExt(Computation).handleInvalid(ContextChangeEvent, List<Scheduled>) line: 53 EclipseContext.dispose() line: 177 EclipseContext.dispose() line: 165 PartRenderingEngine.clearContext(MContext) line: 824 PartRenderingEngine.safeRemoveGui(MUIElement) line: 805 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: 4683 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<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: 81 UIEventPublisher.notifyChanged(Notification) line: 58 TrimmedWindowImpl(BasicNotifierImpl).eNotify(Notification) line: 380 TrimmedWindowImpl(UIElementImpl).setToBeRendered(boolean) line: 290 CleanupAddon$3$1.run() line: 273 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 135 Display.runAsyncMessages(boolean) line: 4140 Display.readAndDispatch() line: 3757 DnDManager.update() line: 243 DnDManager$3.handleEvent(Event) line: 111 EventTable.sendEvent(Event) line: 84 Display.filterEvent(Event) line: 1262 CTabFolder(Widget).sendEvent(Event) line: 1052 Display.runDeferredEvents() line: 4165 Display.readAndDispatch() line: 3754 PartRenderingEngine$9.run() line: 944 Realm.runWithDefault(Realm, Runnable) line: 332 PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 860 E4Workbench.createAndRunUI(MApplicationElement) line: 87 Workbench$3.run() line: 542 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 522 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java