JDK-4327067 : Potential hang in multithreaded calls to UIDefaults.get()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.3.0,1.3.0_02
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_7,windows_nt
  • CPU: generic,x86
  • Submitted: 2000-04-01
  • Updated: 2000-10-23
  • Resolved: 2000-10-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.3.1 ladybirdFixed 1.4.0Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
UIDefaults.get() calls wait() on itself in a synchronized block and later calls
notify(). In a multithreaded situation it is possible for more than one thread
to be waiting for a result, so notifyAll() should be used instead.

See comments section for test case which can provoke a hang.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: ladybird merlin-beta FIXED IN: ladybird merlin-beta INTEGRATED IN: ladybird merlin-beta
14-06-2004

SUGGESTED FIX Use notifyAll() instead of notify().
11-06-2004

WORK AROUND While ugly, if you know you are going to get into this situation, you could invoke UIManager.getDefaults().notifyAll() to unwedge the other threads waiting on this. scott.violet@eng 2001-03-12
12-03-2001

EVALUATION The description includes a sensible fix. hans.muller@Eng 2000-04-03 notifyAll is now invoked. scott.violet@eng 2000-10-06
03-04-2000