Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319547 - [Cheat sheets] SWException "Widget is disposed" on a LayoutComposite when a cheat sheet calls another one as a command
Summary: [Cheat sheets] SWException "Widget is disposed" on a LayoutComposite when a c...
Status: CLOSED DUPLICATE of bug 291750
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 08:10 EDT by C. Doré CLA
Modified: 2010-07-19 19:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description C. Doré CLA 2010-07-12 08:10:30 EDT
Build Identifier: 3.4.2 M20090211-1700

If you build a cheat sheet, in which an item has a command to call another cheat sheet

my example

<command
        required="false" serialization="org.eclipse.ui.cheatsheets.openCheatSheet(cheatSheetId=com.castsoftware.pmc.intro.createdeliveryunit)"/>


When the user fires that command, he gets a SWTException saying that a widget is disposed. I could see in the debugguer this widget is a LayoutComposite, but I cannot tell where it comes from.

There is no problem if the user switches cheat sheets himself using the menu and the cheat sheet panel (note: removing the parameter in my example, having then the command show the cheat sheets panel, does not remove the bug)



Reproducible: Always

Steps to Reproduce:
1.create 2 cheat sheets
2. in one of them, add a command to call the other
3. run that cheat sheet, then run that command
Comment 1 Paul Webster CLA 2010-07-12 08:18:45 EDT
What's the stack trace of the SWTException?  If it's not in the console, check the logs - <workspace>/.metadata/.log

PW
Comment 2 C. Doré CLA 2010-07-12 08:42:39 EDT
Here is the stack trace:

org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:3777)
at org.eclipse.swt.SWT.error(SWT.java:3695)
at org.eclipse.swt.SWT.error(SWT.java:3666)
at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:336)
at org.eclipse.swt.widgets.Composite.getChildren(Composite.java:410)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem.getStartButton(CoreItem.java:284)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem.setRestartImage(CoreItem.java:557)
at org.eclipse.ui.internal.cheatsheets.views.CheatSheetViewer.runPerformExecutable(CheatSheetViewer.java:1046)
at org.eclipse.ui.internal.cheatsheets.views.CoreItem$1.linkActivated(CoreItem.java:89)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:228)
at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:177)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:322)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:306)
at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:120)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.castsoftware.pmc.workbench.Application$WorkbenchPMCConfiguredApplication.onGUIRun(Application.java:115)
at com.castsoftware.mda.run.ConfiguredApplication.run(ConfiguredApplication.java:70)
at com.castsoftware.pmc.workbench.Application.start(Application.java:36)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Comment 3 Paul Webster CLA 2010-07-12 08:48:02 EDT
Thanx.

Maybe switching to another cheatsheet is causing some of the processing in runPerformExecutable(CheatSheetViewer.java:1046) to run against a disposed composite?  Moving to UA for comments.

PW
Comment 4 Chris Goldthorpe CLA 2010-07-14 13:20:03 EDT
I can take a look at this.
Comment 5 Chris Goldthorpe CLA 2010-07-19 19:24:11 EDT
This was fixed in Eclipse 3.6 - see Bug 291750 for a patch.

*** This bug has been marked as a duplicate of bug 291750 ***