JDK-7124265 : [macosx] (Native?) deadlock in DnD over Modal dialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,7u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic,x86
  • Submitted: 2011-12-23
  • Updated: 2014-10-09
  • Resolved: 2013-05-23
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.
JDK 7 JDK 8
7u6Resolved 8Fixed
Description
http://java.net/jira/browse/MACOSX_PORT-684 submitted 2011/11/10 by Yuri Nesterenko
Run the attached code adapted from a regression test. This program should open a modal dialog from a dragOver() listener method and not hang but it does hang and not show a dialog. You will see a rainbow disk forever.
Build: b216
closed/java/awt/dnd/ModalDialogOnDragDeadlockTest/ModalDialogOnDragDeadlockTest

Comments
The issue was already fixed in JDK8 by the fix for JDK-8006634. It was also backported to JDK7
23-05-2013

I think it was fixed in jdk8 already
08-05-2013

EVALUATION The main reason of this bug is that while system is in the "Drag mode" the ative AppKit thread is blocked and any attempt to call native methods on AppKit thread from the Drag event listener will cause a native deadlock. And definitely creation of the new native window will require the native calls on AppKit thread to initialize its native peer. The workaround might be creation of the peered resources ahead of Drag mode start and making sure its peer is initialized by, for example, calling window.pack() method.
29-03-2012