Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Widget disposed too early exception
Widget disposed too early exception [message #661019] Tue, 22 March 2011 17:41 Go to next message
Elvis Dominguez is currently offline Elvis Dominguez
Messages: 52
Registered: July 2009
Location: Switzerland
Member
Hi all,

I have such exception when shutting down my RCP.
How can i know which widget?
I think that I forgot to dispose some listener but don't find which one...

Kindly



--
kindly Elvis Dominguez
Re: Widget disposed too early exception [message #661052 is a reply to message #661019] Tue, 22 March 2011 22:21 Go to previous messageGo to next message
Elvis Dominguez is currently offline Elvis Dominguez
Messages: 52
Registered: July 2009
Location: Switzerland
Member
Detailed exception

!ENTRY org.eclipse.ui.workbench 4 0 2011-03-22 23:24:08.798
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDispo sed
(WorkbenchPartReference.java:172)
at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent
(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1080)
at org.eclipse.swt.widgets.Control.release(Control.java:3304)
at org.eclipse.swt.widgets.Composite.releaseChildren
(Composite.java:1293)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1083)
at org.eclipse.swt.widgets.Control.release(Control.java:3304)
at org.eclipse.swt.widgets.Composite.releaseChildren
(Composite.java:1293)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1083)
at org.eclipse.swt.widgets.Control.release(Control.java:3304)
at org.eclipse.swt.widgets.Composite.releaseChildren
(Composite.java:1293)
at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:2 08)
at org.eclipse.swt.widgets.Decorations.releaseChildren
(Decorations.java:469)
at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:230 5)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1083)
at org.eclipse.swt.widgets.Control.release(Control.java:3304)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:462)
at org.eclipse.swt.widgets.Shell.dispose(Shell.java:2241)
at org.eclipse.jface.window.Window.close(Window.java:335)
at org.eclipse.jface.window.ApplicationWindow.close
(ApplicationWindow.java:307)
at org.eclipse.ui.internal.WorkbenchWindow.hardClose
(WorkbenchWindow.java:1741)
at org.eclipse.ui.internal.WorkbenchWindow.busyClose
(WorkbenchWindow.java:734)
at org.eclipse.ui.internal.WorkbenchWindow.access$0
(WorkbenchWindow.java:710)
at org.eclipse.ui.internal.WorkbenchWindow$5.run
(WorkbenchWindow.java:832)
at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.close
(WorkbenchWindow.java:830)
at org.eclipse.jface.window.WindowManager.close
(WindowManager.java:109)
at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1106 )
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench.busyClose
(Workbench.java:1103)
at org.eclipse.ui.internal.Workbench.access$15
(Workbench.java:1032)
at org.eclipse.ui.internal.Workbench$25.run(Workbench.java:1276 )
at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:70)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1274)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1246)
at org.eclipse.ui.internal.WorkbenchWindow.busyClose
(WorkbenchWindow.java:731)
at org.eclipse.ui.internal.WorkbenchWindow.access$0
(WorkbenchWindow.java:710)
at org.eclipse.ui.internal.WorkbenchWindow$5.run
(WorkbenchWindow.java:832)
at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.close
(WorkbenchWindow.java:830)
at org.eclipse.jface.window.Window.handleShellCloseEvent
(Window.java:741)
at org.eclipse.jface.window.Window$3.shellClosed(Window.java:68 7)
at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:98)
at org.eclipse.swt.widgets.EventTable.sendEvent
(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:616)
at org.eclipse.swt.widgets.Shell.gtk_delete_event(Shell.java:11 66)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1735)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4796 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4360 )
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native
Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:81 89)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration
(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration
(OS.java:2237)
at org.eclipse.swt.widgets.Display.readAndDispatch
(Display.java:3159)
at org.eclipse.ui.internal.Workbench.runEventLoop
(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault
(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench
(PlatformUI.java:149)
at ch.oasi.client.workbench.Application.start(Application.java: 20)
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:369)
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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)


On Tue, 22 Mar 2011 17:41:18 +0000, Elvis Dominguez wrote:

> Hi all,
>
> I have such exception when shutting down my RCP. How can i know which
> widget?
> I think that I forgot to dispose some listener but don't find which
> one...
>
> Kindly





--
kindly Elvis Dominguez
Re: Widget disposed too early exception [message #661104 is a reply to message #661052] Wed, 23 March 2011 08:21 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
On 23/03/11 3:51 AM, Elvis Dominguez wrote:
> Detailed exception
>
> !ENTRY org.eclipse.ui.workbench 4 0 2011-03-22 23:24:08.798
> !MESSAGE Widget disposed too early!
> !STACK 0
> java.lang.RuntimeException: Widget disposed too early!
> at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDispo sed
> (WorkbenchPartReference.java:172)

Sounds like you hit
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267424 Does this occurs on
the recent builds on 3.7?


--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: Widget disposed too early exception [message #893389 is a reply to message #661104] Tue, 03 July 2012 19:41 Go to previous messageGo to next message
Achim E. is currently offline Achim E.
Messages: 8
Registered: July 2009
Location: Germany
Junior Member
Hi all,

same problem here with a RCP application based on Eclipse 3.7.2, GEF Editor and a TabbedPropertiesView with sections based on org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection.

Not sure why, but this only occurs when the platform is closed and the focus (Cursor) is on a CCombo Widget inside the TabbedPropertiesView. For testing purpose, I've changed the widget to a SWT Combo and the error is gone.

But I need this CCombo Widget and this also occurs for CCombo Widgets on generated classes like ShapeColorsAndFontsPropertySection.

Any help and hints are really welcome.

Thank you very much
Achim
Re: Widget disposed too early exception [message #1073377 is a reply to message #893389] Wed, 24 July 2013 16:19 Go to previous messageGo to next message
Markus Wittig is currently offline Markus Wittig
Messages: 3
Registered: July 2013
Junior Member
Hi Achim,

did you have found a solution for your problem? Smile

Sincerely yours
Re: Widget disposed too early exception [message #1073909 is a reply to message #1073377] Thu, 25 July 2013 18:33 Go to previous messageGo to next message
Achim E. is currently offline Achim E.
Messages: 8
Registered: July 2009
Location: Germany
Junior Member
Hi Markus,

sorry I did not found a solution for this one.

Meanwhile, we have replaced the CCombo elements by a combination of non-editable Text elements in conjunction with ToolItems and Dialogs, because we also need opportunities to filter our selection lists.

The error appeared at that time with Eclipse 3.7. In the meantime, we have migrated to Eclipse 4.2. I can not say, if this problem still exists with CCombo elements under Eclipse 4.2.

index.php/fa/15715/0/
Re: Widget disposed too early exception [message #1077888 is a reply to message #1073909] Fri, 02 August 2013 09:19 Go to previous messageGo to next message
Markus Wittig is currently offline Markus Wittig
Messages: 3
Registered: July 2013
Junior Member
Thank You Achim for this fast answer!

I am actually do not use the CCombo but a control with a similar architecture.
Maybe i get a work around for this one or take an other control.

kindly Smile
Re: Widget disposed too early exception [message #1080675 is a reply to message #1077888] Tue, 06 August 2013 08:41 Go to previous message
Markus Wittig is currently offline Markus Wittig
Messages: 3
Registered: July 2013
Junior Member
For anybody who cares about, i've found a workaround for the problem with the CCombo.
The dispose too early error occurs only if the focus is on the text field of the CCombo.
So add a disposing listener to the CCombo and if the event is handled check whether the text has the focus, if true set it to another control
for example the current active shell.
No beautiful solution but it works.

greetings
Previous Topic:WorkbenchWindowControlContribution resize problem in trim area
Next Topic:Error 404 in custom help browser tab
Goto Forum:
  


Current Time: Mon Sep 22 08:21:24 GMT 2014

Powered by FUDForum. Page generated in 0.02184 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software