Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » fix for tree expand flakiness
fix for tree expand flakiness [message #481179] Wed, 19 August 2009 20:47 Go to next message
Jay Norwood is currently offline Jay Norwood
Messages: 112
Registered: July 2009
Senior Member
I was still having failures after trying to implement a
contextMenu(Refresh) in a SWTBotTreeItem.getTreeItemWithRefresh(String),
when I discovered that all the remaining problems go away if the asyncExec
in SWTBotTreeItem.expand() is changed to syncExec.

In general I think we should go through the code and see if there is any
code after asyncExec executions which are counting on the data set in the
asyncExec. I think that is the case in this expand().
Re: fix for tree expand flakiness [message #481200 is a reply to message #481179] Thu, 20 August 2009 02:43 Go to previous messageGo to next message
Kay-Uwe Graw is currently offline Kay-Uwe Graw
Messages: 24
Registered: July 2009
Junior Member
In some cases uing synchExec for throwing SWT events might cause deadlocks
if some eventlistener opens a modal dialog for this event.

Kay
Re: fix for tree expand flakiness [message #481630 is a reply to message #481200] Fri, 21 August 2009 20:32 Go to previous messageGo to next message
Jay Norwood is currently offline Jay Norwood
Messages: 112
Registered: July 2009
Senior Member
I'm trying to find out why the syncExec did anything to help, and I'm not
able to consistently create any tree expansion lock-up by adding long
delays inside the original asyncExec, so I guess the asyncExec must not
have been the source of the problem.
Re: fix for tree expand flakiness [message #481636 is a reply to message #481630] Sat, 22 August 2009 00:51 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 22/8/09 06:02, Jay Norwood wrote:
> I'm trying to find out why the syncExec did anything to help, and I'm
> not able to consistently create any tree expansion lock-up by adding
> long delays inside the original asyncExec, so I guess the asyncExec must
> not have been the source of the problem.

It could sometimes be because the UI is completely overloaded because of
the speed at with SWTBot is working.

We've noticed that putting explicit sync points in some places helps a
lot. Increasing the JVM memory on the launched eclipse to 768MB is also
helpful because it reduces the times when the app freezes to recover
memory. The defaults are just too low.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
Previous Topic:Couldn't pressShortcut() be supported for all widgets?
Next Topic:Widget not found exception
Goto Forum:
  


Current Time: Thu Jul 31 05:39:02 EDT 2014

Powered by FUDForum. Page generated in 0.05625 seconds