Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Find Display in SWTUtils
Find Display in SWTUtils [message #1765874] Wed, 14 June 2017 06:54 Go to next message
Michael Seeger is currently offline Michael SeegerFriend
Messages: 1
Registered: June 2017
Junior Member
Hello,

we have some problems finding the SWT display via method "waitForDisplayToAppear" of the SWTUtils class in our application. After some debugging we have seen that all primary threads are gathered to find the display with the right thread. But in method "allThreads()" can only be found a maximum of 64 threads while apparently we could have more than 80 threads in our final application. So sometimes it could be that the proper thread for the SWT display is not in the thread array which causes a "display not found" exception after the chosen waiting time.

public static Thread[] allThreads() {
  ThreadGroup threadGroup = primaryThreadGroup();

  Thread[] threads = new Thread[64];
  int enumerate = threadGroup.enumerate(threads, true);

  Thread[] result = new Thread[enumerate];
  System.arraycopy(threads, 0, result, 0, enumerate);

  return result;
}


Here are some information about the environment on which the application is tested:
OS: MS Windows Server 2008
System type: x64
Processor: Intel Xeon, 4 cores

Is it possible to enhance the maximum number of elements for the thread array? Maybe there is also another option to solve this problem that we have not seen yet.

Thanks in advance for your support.

Best regards,
Michael
Re: Find Display in SWTUtils [message #1765993 is a reply to message #1765874] Wed, 14 June 2017 17:37 Go to previous message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 53
Registered: July 2009
Member
Hi Michael,

Thanks for reporting this. I created a bug and will try to get this fixed in today's final RC4 release for Oxygen.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=518266

Patrick
Previous Topic:SWTBot & acceptance tests tools
Next Topic:SWTBOT Spy View
Goto Forum:
  


Current Time: Tue Sep 18 19:02:23 GMT 2018

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

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

Back to the top