Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Widget is disposed exception on table when double click
Widget is disposed exception on table when double click [message #1075401] Mon, 29 July 2013 11:08 Go to next message
Marco Feldmann is currently offline Marco Feldmann
Messages: 21
Registered: March 2013
Junior Member
Hello,
I've got a "org.eclipse.swt.SWTException: Widget is disposed" when handle a double on swt table. When I use a button there no problem. There is an example as attachment.

Can anybody help.

Thanks Marco.
Re: Widget is disposed exception on table when double click [message #1075417 is a reply to message #1075401] Mon, 29 July 2013 11:35 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi Marco,
your snipper works fine for me with RAP from git (master). Which RAP
version are you using? Please post the stack trace.

P.S. One small remark - never catch Throwable in RAP especially when you
run your application in |SWT_COMPATIBILITY| operational mode
<http://help.eclipse.org/juno/topic/org.eclipse.rap.help/help/html/reference/api/org/eclipse/rwt/application/Application.OperationMode.html#SWT_COMPATIBILITY>.
See this blog post:
http://eclipsesource.com/blogs/2012/08/08/to-catch-or-not-to-catch-throwable/
Best,
Ivan

On 7/29/2013 2:08 PM, Marco Feldmann wrote:
> Hello,
> I've got a "org.eclipse.swt.SWTException: Widget is disposed" when handle a double on swt table. When I use a button there no problem. There is an example as attachment.
>
> Can anybody help.
>
> Thanks Marco.

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Widget is disposed exception on table when double click [message #1075429 is a reply to message #1075417] Mon, 29 July 2013 12:16 Go to previous messageGo to next message
Marco Feldmann is currently offline Marco Feldmann
Messages: 21
Registered: March 2013
Junior Member
Hi Ivan,
thanks for your fast answer and your blog post. I use RAP 2.0. Here is the complete stack trace:
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:3546)
at org.eclipse.swt.SWT.error(SWT.java:3469)
at org.eclipse.swt.SWT.error(SWT.java:3440)
at org.eclipse.swt.widgets.Widget.error(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:969)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:225)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:1109)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1228)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:242)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:239)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:304)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:696)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:598)
at org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1172)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1153)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1143)
at org.eclipse.rap.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:27)
at org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
at org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:120)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:106)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:71)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:62)
at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:107)
at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:94)
at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Re: Widget is disposed exception on table when double click [message #1075444 is a reply to message #1075429] Mon, 29 July 2013 12:46 Go to previous messageGo to next message
Marco Feldmann is currently offline Marco Feldmann
Messages: 21
Registered: March 2013
Junior Member
Hello Ivan,
I have the same problem with rap 2.1.
Re: Widget is disposed exception on table when double click [message #1075446 is a reply to message #1075429] Mon, 29 July 2013 12:46 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi Marco,
the key point in your snippet is to double click on the last item (which
will be removed). Now I can reproduce it with RAP from git master too.
I've tested your snippet in RCP and it's working fine there. Please open
a bugzilla and we will investigate the issue.
Thanks,
Ivan

On 7/29/2013 3:17 PM, Marco Feldmann wrote:
> Hi Ivan,
> thanks for your fast answer and your blog post. I use RAP 2.0. Here is
> the complete stack trace:
> org.eclipse.swt.SWTException: Widget is disposed
> at org.eclipse.swt.SWT.error(SWT.java:3546)
> at org.eclipse.swt.SWT.error(SWT.java:3469)
> at org.eclipse.swt.SWT.error(SWT.java:3440)
> at org.eclipse.swt.widgets.Widget.error(Widget.java:1027)
> at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:969)
> at org.eclipse.swt.widgets.Widget.getData(Widget.java:225)
> at
> org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:1109)
> at
> org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1228)
> at
> org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:242)
> at
> org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:239)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:304)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:696)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:598)
> at
> org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1172)
> at
> org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1153)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1143)
> at
> org.eclipse.rap.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:27)
> at
> org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
> at
> org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:120)
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:106)
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:71)
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:62)
> at
> org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:107)
> at
> org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:94)
> at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:87)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:368)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
> at
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:722)

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Widget is disposed exception on table when double click [message #1075454 is a reply to message #1075446] Mon, 29 July 2013 13:03 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
OK... here are my findings after short investigation. When you doble
click on the last item (which will be removed), two events are sent from
the client - widgetDefaultSelected and mouseDoubleClick. Mouse double
click listener is executed on the server first and item is disposed. As
a result, (default) selection listener is executed with already disposed
item. Probably we need a dispose check in
StructuredViewer.handleDoubleSelect:
....
if (event.item != null && !event.item.isDisposed() &&
event.item.getData() != null) {
....
Best,
Ivan

On 7/29/2013 3:46 PM, Ivan Furnadjiev wrote:
> Hi Marco,
> the key point in your snippet is to double click on the last item
> (which will be removed). Now I can reproduce it with RAP from git
> master too. I've tested your snippet in RCP and it's working fine
> there. Please open a bugzilla and we will investigate the issue.
> Thanks,
> Ivan
>
> On 7/29/2013 3:17 PM, Marco Feldmann wrote:
>> Hi Ivan,
>> thanks for your fast answer and your blog post. I use RAP 2.0. Here
>> is the complete stack trace:
>> org.eclipse.swt.SWTException: Widget is disposed
>> at org.eclipse.swt.SWT.error(SWT.java:3546)
>> at org.eclipse.swt.SWT.error(SWT.java:3469)
>> at org.eclipse.swt.SWT.error(SWT.java:3440)
>> at org.eclipse.swt.widgets.Widget.error(Widget.java:1027)
>> at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:969)
>> at org.eclipse.swt.widgets.Widget.getData(Widget.java:225)
>> at
>> org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:1109)
>> at
>> org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1228)
>> at
>> org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:242)
>> at
>> org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:239)
>> at
>> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:304)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:696)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:598)
>> at
>> org.eclipse.swt.widgets.Display.executeNextEvent(Display.java:1172)
>> at
>> org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1153)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1143)
>> at
>> org.eclipse.rap.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:27)
>> at
>> org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
>> at
>> org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
>> at
>> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:120)
>> at
>> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:106)
>> at
>> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:71)
>> at
>> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:62)
>> at
>> org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:107)
>> at
>> org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:94)
>> at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:87)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>> at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>> at
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>> at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> at org.eclipse.jetty.server.Server.handle(Server.java:368)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>> at
>> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
>> at
>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
>> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
>> at
>> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>> at
>> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>> at
>> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>> at java.lang.Thread.run(Thread.java:722)
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Widget is disposed exception on table when double click [message #1075463 is a reply to message #1075454] Mon, 29 July 2013 13:19 Go to previous messageGo to next message
Marco Feldmann is currently offline Marco Feldmann
Messages: 21
Registered: March 2013
Junior Member
Hello Ivan,
thats fine. When will you fix it?
Re: Widget is disposed exception on table when double click [message #1075467 is a reply to message #1075463] Mon, 29 July 2013 13:28 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi Marco,
please file a bugzilla to track the progress.
Thanks,
Ivan

On 7/29/2013 4:19 PM, Marco Feldmann wrote:
> Hello Ivan,
> thats fine. When will you fix it?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Widget is disposed exception on table when double click [message #1075482 is a reply to message #1075467] Mon, 29 July 2013 13:59 Go to previous message
Marco Feldmann is currently offline Marco Feldmann
Messages: 21
Registered: March 2013
Junior Member
Ivan Furnadjiev wrote on Mon, 29 July 2013 09:28
Hi Marco,
please file a bugzilla to track the progress.
Thanks,
Ivan

Done. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=413920
Previous Topic:Stupid question regarding multiple plugins within a single RAP application
Next Topic:BrowserWidget, JQuery document.ready and BrowserFunctions
Goto Forum:
  


Current Time: Thu Oct 23 21:24:21 GMT 2014

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

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