This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 150781

Summary: Bytecode patch java.awt.Component to test EventQueue.isDispatchThread()
Product: platform Reporter: _ tboudreau <tboudreau>
Component: Window SystemAssignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker CC: saubrecht
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ tboudreau 2008-10-20 22:19:56 UTC
A major source of deadlocks is constructing components on non-AWT threads.  It would be useful if for commit-validation
(or perhaps in dev builds?) we could bytecode-patch java.awt.Component with
{
assert EventQueue.isDispatchThread() : "Component constructed off AWT thread - can lead to deadlocks"
}

I just tried it and found a huge amount of components (mostly from mobility vmd module) which are created on the wrong
thread.
Comment 1 Jesse Glick 2009-03-19 00:03:12 UTC
Feel free to implement it.
Comment 2 Jesse Glick 2009-03-19 00:03:54 UTC
Possibly better component.
Comment 3 Stanislav Aubrecht 2009-03-31 11:10:38 UTC
doesn't seem like a bug to me