JDK-7144542 : [macosx] Crash in liblwawt.dylib setBusy() when exiting an FX app run with j2d pipeline
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2012-02-10
  • Updated: 2012-05-21
  • Resolved: 2012-05-04
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.
7u6Fixed 8Resolved
Related Reports
Relates :  
Run an FX app (e.g. HelloRectangle toy) with J2D:

java -Dprism.order=j2d -cp /jfx/artifacts/sdk/rt/lib/jfxrt.jar:dist/HelloWorld.jar helloworld.HelloRectangle

Java will crash after closing the application.


1. This happens with both latest Oracle JDK Mac Port build, as well as the latest Java update for Apple JDK.

2. This isn't happening with older builds of Oracle Mac Port (e.g. I've tried a build from early Dec 2011 and it won't crash; I assume that older Apple JDKs didn't crash either since the problem manifested itself only now).

More details: http://javafx-jira.kenai.com/browse/RT-19541

The crash log:

Stack: [7fff65055000,7fff65855000],  sp=7fff658523e0,  free space=8180k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x27f3ae]  ThreadStateTransition::trans_from_native(JavaThreadState)+0xa
V  [libjvm.dylib+0x277a19]  jni_CallStaticVoidMethodV+0x3d
C  [JavaNativeFoundation+0x3c20]  JNFCallStaticVoidMethod+0xae
C  [liblwawt.dylib+0xde46]  setBusy+0x79
C  [CoreFoundation+0x63b36]  __CFRunLoopDoObservers+0x176
C  [CoreFoundation+0x38dd6]  __CFRunLoopRun+0x426
C  [CoreFoundation+0x38676]  CFRunLoopRunSpecific+0xe6
C  [java+0x5cb4]  CreateExecutionEnvironment+0x349
C  [java+0x37b8]  JLI_Launch+0x78d
C  [java+0x7a30]  main+0x6c
C  [java+0x13f4]  start+0x34

EVALUATION I've copied the JVM from JDK8 to my build of JDK 7u6 and that didn't help. Further investigation revealed that the actual problem was that we were loading the headfull lwawt dynamic library even though the headless mode was explicitly requested. If we load the headless version of the library (which corresponds to what JDK 8 does on the Mac), the crash is no longer reproducible. Note that this Evaluation entry relates to the the 7u6 SubCR of the bug. On JDK 8 the issue isn't reproducible, so I'm closing this SubCR.

EVALUATION There was some synchronization performed, and the current state of 7u6 seems to be very close to what we have in 7u4 now. However, the HotSpot version is stil 23b21 in 7u6, and the crash is still reproducible. I believe that this is a HotSpot bug and not a JDK/AWT issues.

EVALUATION It is still failing with the latest 7u4 build. Interesting, that according to the log the actual crash happens in HotSpot code, and -version says: JDK8: HotSpot 24.0-b07 7u4: HotSpot 23.0-b21 So I suspect this is actually a HotSpot bug which is fixed in the recent JVM code. We need to wait till all fixes from 7u4 reach 7u6, and then re-test the issue (because currently the j2d pipleing is unuabale with 7u6). After that we may want to discuss this issue with HotSpot team.

EVALUATION I've reverted the workaround introduced with RT-19600, and this issue is not reproducible with the latest JDK 8 build anymore.