Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329924 - Exception when disposing a menu
Summary: Exception when disposing a menu
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5.2   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 330589
  Show dependency tree
 
Reported: 2010-11-10 12:07 EST by Aristide Martin CLA
Modified: 2011-05-17 10:37 EDT (History)
4 users (show)

See Also:


Attachments
patch for HEAD (1.91 KB, patch)
2010-11-10 12:46 EST, Aristide Martin CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aristide Martin CLA 2010-11-10 12:07:40 EST
Build Identifier: M20100211-1343

Here is the stacktrace:
Daemon Thread [Thread-0] (Suspended (exception SWTException))	
	SWT.error(int, Throwable, String) line: 3886	
	SWT.error(int, Throwable) line: 3799	
	SWT.error(int) line: 3770	
	Menu(Widget).error(int) line: 619	
	Menu(Widget).checkWidget() line: 462	
	Menu(Widget).getStyle() line: 805	
	MenuItem.updateText() line: 775	
	MenuItem.setMenu(Menu) line: 683	
	Menu.releaseParent() line: 725	
	Menu(Widget).release(boolean) line: 1116	
	Menu(Widget).dispose() line: 544	
	ActionMenuManager$MenuCreatorAction.dispose() line: 122	
	ActionContributionItem.handleWidgetDispose(Event) line: 474	
	ActionContributionItem.access$1(ActionContributionItem, Event) line: 466	
	ActionContributionItem$5.handleEvent(Event) line: 406	
	EventTable.sendEvent(Event) line: 84	
	Display.sendEvent(EventTable, Event) line: 3543	
	MenuItem(Widget).sendEvent(Event) line: 1250	
	MenuItem(Widget).sendEvent(int, Event, boolean) line: 1273	
	MenuItem(Widget).sendEvent(int) line: 1254	
	MenuItem(Widget).release(boolean) line: 1108	
	MenuItem(Widget).dispose() line: 544	
	ActionContributionItem.dispose() line: 1191	
	ArrowTypeTargetMenuManager(ActionMenuManager).dispose() line: 317	
	AbstractContributionItemProvider$PluginMenuManager.dispose() line: 1106	
	SubContributionItem.dispose() line: 51	
	ArrowTypeMenuManager(MenuManager).dispose() line: 234	
	ArrowTypeMenuManager(ActionMenuManager).dispose() line: 318	
	ActionMenuManager$MenuCreatorAction.dispose() line: 126	
	ActionContributionItem.handleWidgetDispose(Event) line: 474	
	ActionContributionItem.access$1(ActionContributionItem, Event) line: 466	
	ActionContributionItem$5.handleEvent(Event) line: 406	
	EventTable.sendEvent(Event) line: 84	
	Display.sendEvent(EventTable, Event) line: 3543	
	MenuItem(Widget).sendEvent(Event) line: 1250	
	MenuItem(Widget).sendEvent(int, Event, boolean) line: 1273	
	MenuItem(Widget).sendEvent(int) line: 1254	
	MenuItem(Widget).release(boolean) line: 1108	
	Menu.releaseChildren(boolean) line: 709	
	Menu(Widget).release(boolean) line: 1111	
	MenuItem.releaseChildren(boolean) line: 417	
	MenuItem(Widget).release(boolean) line: 1111	
	MenuItem(Widget).dispose() line: 544	
	MenuManager.update(boolean, boolean) line: 784	
	MenuManager.update(boolean) line: 678	
	WorkbenchWindow.updateActionBars() line: 3155	
	WorkbenchPage.updateActionBars() line: 3994	
	WorkbenchPage$ActionSwitcher.updateTopEditor(IEditorPart) line: 428	
	WorkbenchPage.makeActiveEditor(IEditorReference) line: 1271	
	WorkbenchPage.updateActivePart() line: 1222	
	WorkbenchPage.handleDeferredEvents() line: 1417	
	WorkbenchPage.deferUpdates(boolean) line: 1406	
	WorkbenchPage.closeEditors(IEditorReference[], boolean) line: 1380	
	WorkbenchPage.closeEditor(IEditorPart, boolean) line: 1444	
	DiagramDocumentEditor$4.run() line: 498	
	RunnableLock.run() line: 35	
	UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 134	
	Display.runAsyncMessages(boolean) line: 3405	
	Display.readAndDispatch() line: 3102	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2405	
	Workbench.runUI() line: 2369	
	Workbench.access$4(Workbench) line: 2221	
	Workbench$5.run() line: 500	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 493	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 113	
	UITestApplication.start(IApplicationContext) line: 54	
	EclipseAppHandle.run(Object) line: 194	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 368	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	Main.invokeFramework(String[], URL[]) line: 559	
	Main.basicRun(String[]) line: 514	
	Main.run(String[]) line: 1311	
	Main.main(String[]) line: 1287	

Reproducible: Sometimes

Steps to Reproduce:
We have got this problem on an gmf editor, while a functional testing which close and open the editor.
Comment 1 Remy Suen CLA 2010-11-10 12:33:04 EST
Please provide a sample plug-in project that will reproduce the problem.

Does the problem occur on Eclipse 3.6.x?
Comment 2 Aristide Martin CLA 2010-11-10 12:46:36 EST
Created attachment 182838 [details]
patch for HEAD

a patch to review
Comment 3 Remy Suen CLA 2010-11-10 12:48:24 EST
My mistake. Looks like the code is actually in SWT.
Comment 4 Scott Kovatch CLA 2010-11-16 12:58:17 EST
I modified it a bit so we just check for disposal at the beginning of updateText. Otherwise we end up doing an unnecessary string scan before leaving the method. It was the right idea, though.

Fixed > 20101116.
Comment 5 Scott Kovatch CLA 2010-11-16 12:58:31 EST
.
Comment 6 Aristide Martin CLA 2010-11-18 05:13:02 EST
Thanks !

Is it possible to commit the fix on the 3.6.2 branch too?
Comment 7 Scott Kovatch CLA 2010-11-18 11:57:04 EST
I think that can be arranged. It's a pretty small fix.

I'll clone this for 3.6.2 so we can track it.
Comment 8 Aristide Martin CLA 2010-11-18 11:59:39 EST
Thanks !