JDK-4265501 : Windows regression: Deadlock between printing code and graphics disposal
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-08-25
  • Updated: 1999-09-10
  • Resolved: 1999-09-10
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
1.3.0 kestrelFixed
Related Reports
Relates :  
Description
Recent changes to the AwtGraphics code now cause a portion of Graphics disposal
to be synchronized on the Toolkit thread. The SendMessage call is made while
holding the extern "imageLock" locking object. The imageLock is also required
for construction of an AwtGraphics.

The printing code (specifically, AwtMasterPrinterGraphics::CreateAndStart) is 
already synchronized on the Toolkit thread. This function creates a new
AwtGraphics instance. Since the lock acquisition of these two operations is
in a different order, there is the potential for deadlock.

To reproduce the bug, launch the Clock applet. From the Applet menu, repeatedly
select "Print" and then cancel the printing operation. Eventually, the Applet
will deadlock.

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

EVALUATION Commit to fix in Kestrel (regression). eric.hawkes@eng 1999-08-25 Fixed by synchronizing AwtGraphics::Create(JNIEnv *, jobject, AwtComponent *), AwtGraphics::CreateCopy(JNIEnv *, jobject, AwtGraphics *), AwtGraphics::Create(JNIEnv *, jobject, HDC), and ~AwtGraphics() on Toolkit thread. david.mendenhall@eng 1999-08-26
26-08-1999