Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339940 - Closing a view that exists in another perspective leads to Widget disposed error
Summary: Closing a view that exists in another perspective leads to Widget disposed error
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 15:56 EDT by Olivier Thomann CLA
Modified: 2019-06-05 07:25 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 Olivier Thomann CLA 2011-03-14 15:56:12 EDT
Using eclipse.buildId=I20110312-1300
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_CA
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -console,

I got:
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
at org.eclipse.swt.SWT.error(SWT.java:4277)
at org.eclipse.swt.SWT.error(SWT.java:4192)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3742)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:852)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:768)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:4277)
at org.eclipse.swt.SWT.error(SWT.java:4192)
at org.eclipse.swt.SWT.error(SWT.java:4163)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:554)
at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.isSpacer(TrimBarLayout.java:230)
at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.tileLine(TrimBarLayout.java:202)
at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.layout(TrimBarLayout.java:182)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1263)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1249)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:664)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:622)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:585)
at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarRenderer$LayoutJob.run(TrimBarRenderer.java:52)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
... 24 more


I have the JUnit view open in the java perspective and the debug perspective. Closing the one from the java perspective caused this exception.
Comment 1 Remy Suen CLA 2011-04-05 12:50:13 EDT
1. Window > Open Perspective > Debug
2. Window > Open Perspective > Java
3. Minimize the 'Outline' view.
4. Click its icon in the trim.
5. Hide the view.
6. The NPE will occur.
Comment 2 Remy Suen CLA 2011-04-07 13:02:14 EDT
1. Detach a view.
2. Minimize it.
3. Restore it.
4. The exception will be thrown.
Comment 3 Remy Suen CLA 2011-04-29 13:11:22 EDT
This is a bug in TrimBarLayout. It only ever creates a cache when computeSize(*) is called even though a layout(*) may be requested without a computeSize(*). This leads to disposed controls lying around in the cache and is the cause behind these SWTExceptions.

------

Remy: When a layout is requested (explicitly or the OS), SWT guarantees that layout(*) will be called but not necesasrily computeSize(*), correct?

In fact, is computeSize(*) only ever called if someone requests a computeSize(*) on a control, is this correct?

Bogdan:that is correct
Comment 4 Eclipse Genie CLA 2018-12-04 13:57:27 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2019-06-05 07:25:09 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.