Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » UIForms MessageManager/ControlDecorator throws Widget is disposed exception
UIForms MessageManager/ControlDecorator throws Widget is disposed exception [message #1740170] Wed, 10 August 2016 00:49
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
I wish I had more to go on, all I've got is two stack traces from a test environment and no way to reproduce.

First this one
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3708)
	at org.eclipse.swt.SWT.error(SWT.java:3631)
	at org.eclipse.swt.SWT.error(SWT.java:3602)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:1018)
	at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:397)
	at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:972)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:955)
	at org.eclipse.swt.internal.widgets.ControlDecorator.setText(ControlDecorator.java:71)
	at org.eclipse.jface.fieldassist.ControlDecoration.setDescriptionText(ControlDecoration.java:922)
	at org.eclipse.ui.internal.forms.MessageManager$ControlDecorator.update(MessageManager.java:275)
	at org.eclipse.ui.internal.forms.MessageManager$ControlDecorator.removeMessages(MessageManager.java:269)
	at org.eclipse.ui.internal.forms.MessageManager.removeAllMessages(MessageManager.java:429)
	at *********.rap.editor.pages.AbstractEditorPage.validate(AbstractEditorPage.java:224)

Then this one
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3708)
	at org.eclipse.swt.SWT.error(SWT.java:3631)
	at org.eclipse.swt.SWT.error(SWT.java:3602)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:1018)
	at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:397)
	at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:972)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:955)
	at org.eclipse.swt.internal.widgets.ControlDecorator.getControl(ControlDecorator.java:185)
	at org.eclipse.jface.fieldassist.ControlDecoration.getControl(ControlDecoration.java:592)
	at org.eclipse.ui.internal.forms.MessageManager$ControlDecorator.isDisposed(MessageManager.java:211)
	at org.eclipse.ui.internal.forms.MessageManager.pruneControlDecorators(MessageManager.java:592)
	at org.eclipse.ui.internal.forms.MessageManager.update(MessageManager.java:502)
	at org.eclipse.ui.internal.forms.MessageManager.updateForm(MessageManager.java:498)
	at org.eclipse.ui.internal.forms.MessageManager.addMessage(MessageManager.java:360)
	at *********.rap.editor.pages.AbstractEditorPage.validate(AbstractEditorPage.java:236)



I don't know what's causing the ControlDecorator to get disposed. None of the widgets on the form with the MessageManager get explicitly disposed. The controls passed to MessageManager#addMessage are all found by walking down the widget tree from the form body.

It appears though, the call to check if it's disposed throws a "Widget is disposed" SWTException. Doesn't seem right to me.

The original SWT code in org.eclipse.jface.fieldassist.ControlDecoration.setDescriptionText would never throw such an exception. It sets a field and calls the update method, which then does an isDisposed check on the control it's decorating before calling any of it's methods protected by Widget#checkWidget, like getShell

Same with org.eclipse.jface.fieldassist.ControlDecoration.getControl(), it was a simple getter in SWT, now it can throw SWTExceptions if the ControlDecorator is disposed.

Can anyone offer advice or would be classed as a RAP defect?

I'm running the latest stable build, RAP 3.1.0-R
Previous Topic:javascript (rap-client) error on login page after session time out
Next Topic:e4 RAP - Object are never destroyed when closing UISession
Goto Forum:
  


Current Time: Tue Mar 19 02:07:16 GMT 2024

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

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

Back to the top