SWT error kills UIThread [message #490367] |
Thu, 08 October 2009 13:17 |
No real name Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Dear RAP developers!
We stress tested our application and run into an IllegalArgumentException thrown
by TableItem#getItem, since the index is out of bounds. This is quite easy to
reproduce, if some people work together on the same table data.
The methods calling getItem we run into the problem are
TableLCA#readWidgetDefaultSelected and TableItemLCA#isFocused.
We further found some TODOs, that this problem should be handled, e.g. in
TableLCA#readWidgetDefaultSelected, TableLCA#readWidgetSelected or
TableLCA#getFocusedItem.
The real problem is, that this exception leads to a PhaseExecutionError that
kills the UIThread. And we need the UIThread for a clean shutdown on the session
destroy event. Otherwise there will be problems with the next logon, since we
run in a deadlock.
Is there another way to trigger the shutdown besides the session destroy event?
Or is there a way to register a listener to UIThread kills?
Is it possible to trigger our shutdown with the PhaseExecutionError?
Are we missing something?
We think, that some others might have this problems also, so maybe someone could
give us a little hint.
Greetings,
Marco
|
|
|
Re: SWT error kills UIThread [message #490577 is a reply to message #490367] |
Fri, 09 October 2009 09:13 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Marco,
please see my comments below.
HTH
Rüdiger
Marco Waimer wrote:
> Dear RAP developers!
>
> We stress tested our application and run into an
> IllegalArgumentException thrown by TableItem#getItem, since the index is
> out of bounds. This is quite easy to reproduce, if some people work
> together on the same table data.
> The methods calling getItem we run into the problem are
> TableLCA#readWidgetDefaultSelected and TableItemLCA#isFocused.
>
> We further found some TODOs, that this problem should be handled, e.g.
> in TableLCA#readWidgetDefaultSelected, TableLCA#readWidgetSelected or
> TableLCA#getFocusedItem.
If you can provide a standalone code snippets to reproduce the
problem, please file a bugzilla and attach it.
>
> The real problem is, that this exception leads to a PhaseExecutionError
> that kills the UIThread. And we need the UIThread for a clean shutdown
> on the session destroy event. Otherwise there will be problems with the
> next logon, since we run in a deadlock.
Foremost such a case should not happen at all. However, if it
happens, the system is very likely in an inconsistent state (e.g.
readData() was called for half the widgets). This is why the
exception is propagated and terminates the UI thread.
No sweat, session clean up takes place in any case, read on below.
>
> Is there another way to trigger the shutdown besides the session destroy
> event? Or is there a way to register a listener to UIThread kills?
> Is it possible to trigger our shutdown with the PhaseExecutionError?
All listeners that were added via
RWT.getSessionStore().addSessionStoreListener()
are executed on session timeout, regardless of the state of the UI
thread.
In CVS HEAD > 2009-10-07 Display-dispose-listeners are also notified
(Display.addListener( SWT.Dispose, ... )) in the same manner as the
SessionStore listeners.
>
> Are we missing something?
>
> We think, that some others might have this problems also, so maybe
> someone could give us a little hint.
>
> Greetings,
> Marco
|
|
|
Powered by
FUDForum. Page generated in 0.02806 seconds