Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 518232

Summary: Quickly close a lot of CTabItem times wrong
Product: [RT] RAP Reporter: uncle ant <250752493>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: 3.3 M1   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/#/c/99387/
Whiteboard:

Description uncle ant CLA 2017-06-14 08:05:33 EDT
When I use a slow PC to open a lot of CTabItem, quickly click the close buttons to close, will quote exception: "Widget is disposed".I think the same way to operate other controls may also quote the same exeption.We use RAP build system applied to the bank and the user action very quickly,when rap quote an exception the UISession will shutdown,then must to login system again,this caused bad experience to the user,so what should i do,hope to have a good way to solve this problem.
Thank you very much.
Exception printStackTrace:
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3708) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.SWT.error(SWT.java:3631) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.SWT.error(SWT.java:3602) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Widget.error(Widget.java:1018) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Widget.getDisplay(Widget.java:397) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:972) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:955) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.custom.CTabItem.getParent(CTabItem.java:168) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.internal.custom.ctabfolderkit.CTabFolderOperationHandler.sendCloseEvent(CTabFolderOperationHandler.java:186) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.internal.custom.ctabfolderkit.CTabFolderOperationHandler.access$2(CTabFolderOperationHandler.java:182) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.internal.custom.ctabfolderkit.CTabFolderOperationHandler$2.run(CTabFolderOperationHandler.java:174) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.ProcessActionRunner.executeNext(ProcessActionRunner.java:50) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1196) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Display.safeReadAndDispatch(Display.java:1181) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1173) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:29) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:38) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:46) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.RWTMessageHandler.executeLifeCycle(RWTMessageHandler.java:57) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.RWTMessageHandler.handleMessage(RWTMessageHandler.java:41) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.remote.MessageChainElement.handleMessage(MessageChainElement.java:29) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.processMessage(LifeCycleServiceHandler.java:128) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.processUIRequest(LifeCycleServiceHandler.java:100) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:75) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:66) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:135) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:117) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:107) ~[org.eclipse.rap.rwt-3.2.0.20170504-0810.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
Comment 1 Ivan Furnadjiev CLA 2017-06-15 05:53:05 EDT
I can't reproduce it with my "fast" click in the Controls Demo -> CTabFolder tab. Nevertheless, by looking into the code I agree that such exception is possible.