Community
Participate
Working Groups
It seems that our reference count for editor action bars get incremented twice if an error occurs when calling the part's createPartControl(*) method. This means we have a leak. Thread [main] (Suspended (breakpoint at line 131 in EditorActionBars)) EditorActionBars.addRef() line: 131 EditorReference.createEditorActionBars(WorkbenchPage, EditorDescriptor, IEditorSite) line: 377 EditorReference.initialize(IWorkbenchPart) line: 320 CompatibilityEditor(CompatibilityPart).createPartControl(IWorkbenchPart, Composite) line: 144 CompatibilityEditor.createPartControl(IWorkbenchPart, Composite) line: 45 CompatibilityEditor(CompatibilityPart).create() line: 260 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: 838 InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 818 InjectorImpl.inject(Object, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 110 InjectorImpl.internalMake(Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 317 InjectorImpl.make(Class<T>, PrimaryObjectSupplier) line: 239 ContextInjectionFactory.make(Class<T>, IEclipseContext) line: 153 ReflectionContributionFactory.createFromBundle(Bundle, IEclipseContext, IEclipseContext, URI) line: 90 ReflectionContributionFactory.doCreate(String, IEclipseContext, IEclipseContext) line: 64 ReflectionContributionFactory.create(String, IEclipseContext) line: 53 ContributedPartRenderer.createWidget(MUIElement, Object) line: 141 PartRenderingEngine.createWidget(MUIElement, Object) line: 858 PartRenderingEngine.safeCreateGui(MUIElement, Object, IEclipseContext) line: 612 PartRenderingEngine.safeCreateGui(MUIElement) line: 714 PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 685 PartRenderingEngine$7.run() line: 679 SafeRunner.run(ISafeRunnable) line: 42 PartRenderingEngine.createGui(MUIElement) line: 664 StackRenderer.showTab(MUIElement) line: 721 LazyStackRenderer$1.handleEvent(Event) line: 66 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 PartStackImpl(BasicNotifierImpl).eNotify(Notification) line: 380 PartStackImpl(ElementContainerImpl<T>).setSelectedElement(T) line: 171 ModelServiceImpl.showElementInWindow(MWindow, MUIElement) line: 357 ModelServiceImpl.bringToTop(MUIElement) line: 311 PartServiceImpl.bringToTop(MPart) line: 315 PartServiceImpl.showPart(MPart, EPartService$PartState) line: 954 WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento, boolean) line: 2739
I've identified one fix but the editor's tool bar contributions are still showing up. This doesn't happen in 3.x. Will have to poke around some more.
(In reply to comment #1) > I've identified one fix but the editor's tool bar contributions are still > showing up. This doesn't happen in 3.x. Actually, it does show them. I guess I didn't actually test this properly.
Fix pushed to R4_development. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=9d894590c3cd4cab00f0bd1692201552d0fe2f43
Verified by source inspection on I20110913-0200.