Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354890 - [Compatibility] Editor action bars get referenced twice if an error occurs
Summary: [Compatibility] Editor action bars get referenced twice if an error occurs
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.2 M2   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 17:04 EDT by Remy Suen CLA
Modified: 2011-09-13 12:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-08-16 17:04:20 EDT
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
Comment 1 Remy Suen CLA 2011-08-17 10:29:05 EDT
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.
Comment 2 Remy Suen CLA 2011-08-17 11:07:26 EDT
(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.
Comment 4 Remy Suen CLA 2011-09-13 12:25:50 EDT
Verified by source inspection on I20110913-0200.