Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Removing messages from MessageManager may throw Exception
Removing messages from MessageManager may throw Exception [message #1791757] Wed, 04 July 2018 21:08 Go to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 206
Registered: February 2011
Senior Member
I've just seen an exception in my test environment
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3708) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.SWT.error(SWT.java:3631) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.SWT.error(SWT.java:3602) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.widgets.Widget.error(Widget.java:1018) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:397) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:972) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:955) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.swt.internal.widgets.ControlDecorator.setText(ControlDecorator.java:71) ~[org.eclipse.rap.rwt_3.2.0.20161006-0240.jar:?]
	at org.eclipse.jface.fieldassist.ControlDecoration.setDescriptionText(ControlDecoration.java:922) ~[org.eclipse.rap.jface_3.2.0.20160811-0840.jar:?]
	at org.eclipse.ui.internal.forms.MessageManager$ControlDecorator.update(MessageManager.java:275) ~[org.eclipse.rap.ui.forms_3.2.0.20160811-0840.jar:?]
	at org.eclipse.ui.internal.forms.MessageManager$ControlDecorator.removeMessages(MessageManager.java:269) ~[org.eclipse.rap.ui.forms_3.2.0.20160811-0840.jar:?]
	at org.eclipse.ui.internal.forms.MessageManager.removeAllMessages(MessageManager.java:429) ~[org.eclipse.rap.ui.forms_3.2.0.20160811-0840.jar:?]


How exactly this happened, I don't know. That exception was thrown on the UIThread.
I looked at the code in ControlDecorator and the commented out original code has a check for disposed controls in the commented up #update method.

  public void setDescriptionText(String text) {
//		this.descriptionText = text;
//		update();
	    // RAP [if]
	    decorator.setText( text );
	}

//
//	/**
//	 * Something has changed, requiring redraw. Redraw the decoration and update
//	 * the hover text if appropriate.
//	 */
//	protected void update() {
//		if (control == null || control.isDisposed()) {
//			return;
//		}
...

decorator.setText does a disposed check and throws an SWTException.
The commented out method from the original JFace code does a disposed check and silently returns, no exceptions.

Any reason RAP throws an exception in a case where RCP wouldn't?

I don't know how the tester caused this issue and I don't know how to reliably reproduce it.
Re: Removing messages from MessageManager may throw Exception [message #1791846 is a reply to message #1791757] Fri, 06 July 2018 08:00 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2285
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
please open a bugzilla and RAP implementation will be adjusted accordingly.
Regards,
Ivan
Re: Removing messages from MessageManager may throw Exception [message #1791948 is a reply to message #1791846] Sun, 08 July 2018 20:41 Go to previous message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 206
Registered: February 2011
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=536807
Previous Topic:Application-defined themes
Next Topic:Is it possible to override ClientResources by Theming?
Goto Forum:
  


Current Time: Mon Sep 24 07:09:15 GMT 2018

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

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

Back to the top