JDK-7124326 : [macosx] An issue similar to autoshutdown one in two AppContexts situation.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2014-10-13
  • Resolved: 2012-07-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.
JDK 7 JDK 8
7u6Fixed 8 b47Fixed
Description
http://java.net/jira/browse/MACOSX_PORT-572 submitted 2011/10/17 by Yuri Nesterenko
Compile and run the attached test (just javac/java, without any extra machinery). It don't paint anything but creates and dismisses AppContext and runs a child application (which may be irreleant).
It never ends.
However if you explicitly add "else{ System.exit(0); }" to the end of the first main() routine, it ends gracefully.

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/6d37b95f0555
14-08-2012

SUGGESTED FIX --- old/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-06-26 16:03:54.000000000 +0400 +++ new/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-06-26 16:03:53.000000000 +0400 @@ -216,7 +216,6 @@ @Override public SystemTrayPeer createSystemTray(SystemTray target) { SystemTrayPeer peer = new CSystemTray(); - targetCreatedPeer(target, peer); return peer; }
26-06-2012

EVALUATION SystemTrayPeer should not be added to the peers map. This is what we do on other platforms, and everything works fine there.
26-06-2012

EVALUATION Author: Yuri Nesterenko Date: 17/Oct/11 01:25 PM Build: b212 AWT_DnD/Clipboard/Automated/JTextComponent/bug_4668508 AWT_DnD/Clipboard/Automated/LostOwnershipChainTest/bug_4692059
23-12-2011