JDK-8096824 : Mac: 8.0-graphics-scrum-h595: JavaFX crashes on MacOS
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-28
  • Updated: 2015-06-12
  • Resolved: 2013-01-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
8Fixed
Related Reports
Relates :  
Description
starting from build 8.0-graphics-scrum-h595 all FX performance benchmarks crash on MacOS.
The error looks like:

<Running testFXBenchmark (5s)>
2013-01-28 11:21:41.675 java[25975:903] -[NSScreen backingScaleFactor]: unrecognized selector sent to instance 0x10028d000
2013-01-28 11:21:41.680 java[25975:903] An uncaught exception was raised
2013-01-28 11:21:41.680 java[25975:903] -[NSScreen backingScaleFactor]: unrecognized selector sent to instance 0x10028d000
2013-01-28 11:21:41.682 java[25975:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSScreen backingScaleFactor]: unrecognized selector sent to instance 0x10028d000'
*** Call stack at first throw:
(
0   CoreFoundation                      0x00007fff878477b4 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x00007fff83e96f03 objc_exception_throw + 45
2   CoreFoundation                      0x00007fff878a1110 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0
3   CoreFoundation                      0x00007fff8781991f ___forwarding___ + 751
4   CoreFoundation                      0x00007fff87815a68 _CF_forwarding_prep_0 + 232
5   libglass.dylib                      0x000000011bc13470 -[GlassLayer3D initWithSharedContext:withHiDPIAware:] + 304
6   libglass.dylib                      0x000000011bc2211b -[GlassView3D _initialize3dWithJproperties:] + 747
7   libglass.dylib                      0x000000011bc2220a -[GlassView3D initWithFrame:withJview:withJproperties:] + 154
8   libglass.dylib                      0x000000011bc1e775 Do_com_sun_glass_ui_mac_MacView__1create + 309
9   libglass.dylib                      0x000000011bc1f390 Java_com_sun_glass_ui_mac_MacView__1create + 384
10  ???                                 0x0000000102811f90 0x0 + 4336983952
11  ???                                 0x0000000102806275 0x0 + 4336935541
)
terminate called after throwing an instance of 'NSException'
2013-01-28 11:21:42 AG[24195] [ERROR: harness failed with exit code 134]

See full log for example here:
 http://aurora-ds.ru.oracle.com:9500/runs/161793.FX2-graphics-scrum-1/20130128112145.161793.FX2-graphics-scrum.7u4b21.mac-mid.Charts.Bubble-series25.app-adhoc.prism-hw.runBenchmark/.workload.log

According to Hudson 8.0-graphics-scrum-h595 contains one fix:
 Fix RT-24009: Support for HiDPI displays

The crash still exists in latest build 8.0-graphics-scrum-h604.

Comments
We had a lot of FX perfromance testruncs on Mac after May 2013 so it can be considered as verified
22-01-2014

We don't support OS X 10.6 at all, but yes, we should fail gracefully. For this specific case, we could do as Felipe suggests. More generally, we should add a runtime version check and exit in that case (we already do something similar for 10.5). Here is a patch that just extends the version check: --- a/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/QuantumToolkit.java +++ b/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/QuantumToolkit.java @@ -262,8 +262,11 @@ return System.getProperty("os.version"); } }); - if (version.startsWith("10.4") || version.startsWith("10.5")) { - throw new RuntimeException("JavaFX requires Mac OSX 10.6 or higher to run"); + if (version.startsWith("10.4") + || version.startsWith("10.5") + || version.startsWith("10.6")) + { + throw new RuntimeException("JavaFX requires Mac OSX 10.7 or higher to run"); } AccessController.doPrivileged(new PrivilegedAction<Void>() {
29-01-2013

since in Object-C message send are already dynamic we only need a version check before the call is made, no ? I suspect we don't care much for OSX 10.6, but no need to crash...
29-01-2013

see doc for NSScreen#backingScaleFactor http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/Reference/Reference.html Availability Available in OS X v10.7 and later.
29-01-2013

It fails on MacOS with 10.6.8 but looks like it does not fail on 10.7.5 So, perhaps the problem is 10.6.8 specific.
28-01-2013

What OS are you running on?
28-01-2013