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 - Bytecode patch java.awt.Component to test EventQueue.isDispatchThread()
Summary: Bytecode patch java.awt.Component to test EventQueue.isDispatchThread()
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 22:19 UTC by _ tboudreau
Modified: 2009-03-31 11:10 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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