Bug 150919 - [api] SystemRegistry.postEvent() fails from Worker thread
Summary: [api] SystemRegistry.postEvent() fails from Worker thread
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.0   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2006-07-18 06:26 EDT by Martin Oberhuber CLA
Modified: 2008-08-13 13:05 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2006-07-18 06:26:04 EDT
When SystemRegistry.postEvent() is called from a Worker thread, an SWTException:invalid thread access happens. To reproduce the problem, uncomment corresponding code in DaytimeSubSytem.initializeSubSystem().

SystemRegistry.postEvent() should work from any thread, API doc should document this.

I think the bug is either in 
  SystemView.getShell()
where the underlying SWT tree is asked for the shell, or in 
  SystemPostableEventNotifier.SystemPostableEventNotifier()
where the Display is obtained from the Listener, instead of just taking Display.getDefault().
Comment 1 David McKnight CLA 2006-07-31 16:21:57 EDT
I've changed this to use Display.getDefault();
Comment 2 Martin Oberhuber CLA 2008-08-13 13:05:48 EDT
[target cleanup] 1.0 M4 was the original target milestone for this bug