JDK-8154148 : [Mac] JavaFX crashes on startup when run on Mac in VMWare
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-04-13
  • Updated: 2019-12-10
  • Resolved: 2016-07-29
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 8 JDK 9
8u152Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
I'm unable to run javafx applications on OSX 10.8 (which is supported platform for java 8)

java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

java -jar javafx-samples-2.2.80/BrickBreaker.jar 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fff8c20839f, pid=2046, tid=25859
#
# JRE version: Java(TM) SE Runtime Environment (8.0_77-b03) (build 1.8.0_77-b03)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.77-b03 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libobjc.A.dylib+0x639f]  objc_msgSend_fixup+0x5f
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/avu/Downloads/hs_err_pid2046.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6

Comments
Here is the approved webrev by kcr: http://cr.openjdk.java.net/~ckyang/JDK-8154148/backport.00/
11-08-2016

As this causes a crash, I am raising the priority to P3. Approved to backport to 8u-dev for 8u122.
10-08-2016

This fix looks safe for 8u-dev backport. I have requested for 8-bp approval.
10-08-2016

Could you please integrate this change into 8 release
10-08-2016

Changeset: ff2e48156643 Author: ckyang Date: 2016-07-29 14:36 -0700 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/ff2e48156643
29-07-2016

OK. Looks fine then. And I verified that it runs OK on a Mac physical machine. +1
29-07-2016

Not really actually, an error happens is when something bad or invalid has occurred. An unsatisfied pixel format request is indicated by npix is 0 and pix is NULL. Hence I feel it is a cleaner and clearer logic to request a different format when npix is 0 and err is kCGLNoError. https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGL_OpenGL/#//apple_ref/c/func/CGLChoosePixelFormat
29-07-2016

One question on the following in GlassView3D.m: + if ((err == kCGLNoError) && (npix == 0)) If an error happens, wouldn't you also want to create a different format? I might have expected something like the following instead: if ((err != kCGLNoError) || (npix == 0)) but maybe I'm missing something?
29-07-2016

+1
28-07-2016

This fix involves fixing both glass and prism-es2 (Mac) in order for JavaFX to fall back to prism-sw pipe gracefully without crashing. It also addresses the issue reported in JDK-8154852 where is prism-sw pipe resulted in CGLCreateContext error. webrev: http://cr.openjdk.java.net/~ckyang/JDK-8154148/webrev.00/
28-07-2016

We have had other reports of OS X crashes when running in VMWare. Even though we don't support it, it would be good to address the crash.
16-04-2016

Yes, looks like you're right I've rechecked with a real hardware (Mac mini 2009 10.8.5) and everything works as expected.
13-04-2016

That's what I thought. Thanks for confirming. The JDK does not support Mac OS X when running in a hypervisor (Apple does not support anything other than Parallels and JDK does not list Parallels as a supported hypervisor). We already have at least one other bug filed for us to detect and fail gracefully. I will look up the bug and close this as a duplicate.
13-04-2016

I run FX samples on VMWare 7.1.3
13-04-2016

What is your environment? Is this running directly or via some sort of hypervisor (Parallels, VMWare, VirtualBox)?
13-04-2016