JDK-8127483 : Mac crashes on exit when run with j2d pipe
Type:Bug
Component:javafx
Sub-Component:graphics
Affected Version:fx2.0.3
Priority:P2
Status:Resolved
Resolution:Not an Issue
Submitted:2012-02-09
Updated:2015-06-17
Resolved:2012-02-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.
Run any simple program, such as HelloRectangle, using -Dprism.order=j2d. The program will crash with seg. fault on exit. This problem is easily reproducible on any Mac tested.
Comments
Bug Court review on Mar 26, 2012 determined this bug should not be included in 2.1 Release Notes.
29-03-2012
210-rn: A few systems on Mac with some old video cards may fallback to using the Java2D software rendering engine. There's a known issue in Java which prevents an FX app from normal termination when using the J2D graphics pipeline. JavaFX workarounds this by calling System.exit() explicitly upon closing the last open stage. This workaround is only active on the Mac when using the J2D rendering engine. For more details regarding the JDK bug please refer to http://bugs.sun.com/view_bug.do?bug_id=7144542
07-03-2012
Yes, I just verified that it does workaround the crash. I filed RT-19600 to add the System.exit workaround back in for the J2D software pipeline on Mac OS X only.
10-02-2012
Could you verify if restoring it eliminates the crash? If so, then I agree, this could be a fine workaround for the time being.
10-02-2012
Note that we might want to consider restoring the "exit on last window closed" workaround as originally implemented in RT-15601, applied only if we are running the J2D pipeline.
10-02-2012
This isn't a Java FX issue. A bug against JDK has been filed.
10-02-2012
Note: I've just filed 7144542 against Oracle JDK.
10-02-2012
Sounds like a good idea. Can you file the CR against the JDK (or are we still using JIRA for the Mac port)? Also, we will need to add this to the JavaFX 2.1 release notes.
10-02-2012
This bug is caused by some recent changes to Java that happened to both the Oracle JDK Mac Port, and some latest update of Apple JDK.
I've tried running with older build of Oracle Mac Port (built in the beginning of Dec 2011), and it won't crash.
Note that it's still unclear to me what's causing it.
In any case, I think we should close this issue and file a bug against Java.
10-02-2012
Anthony: can you take a look?
10-02-2012
And the following is from a run with JRE 7u4 from a recent macosx-port build:
$ java -Dprism.order=j2d -cp /Users/kcr/javafx/2.1-kcr-gfx/jfx/artifacts/sdk/rt/lib/jfxrt.jar:dist/HelloWorld.jar helloworld.HelloRectangle
2012-02-09 19:43:20.949 java[21074:1203] [JRSAppKitAWT markAppIsDaemon]: Process manager already initialized: can't fully enable headless mode.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=107b2d3ae, pid=21074, tid=140735307299168
#
# JRE version: 7.0-b224
# Java VM: OpenJDK 64-Bit Server VM (21.0-b17 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x27f3ae] ThreadStateTransition::trans_from_native(JavaThreadState)+0xa
#
# 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/kcr/javafx/2.1-kcr-gfx/jfx/rt-closed/toys/HelloWorld/hs_err_pid21074.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
Abort trap: 6
10-02-2012
Attached a crash dump from the following run:
$ java -Dprism.order=j2d -cp /Users/kcr/javafx/2.1-kcr-gfx/jfx/artifacts/sdk/rt/lib/jfxrt.jar:dist/HelloWorld.jar helloworld.HelloRectangle
2012-02-09 19:37:31.434 java[21029:b03] Process manager already initialized -- can't fully enable headless mode.
../jfxrun: line 46: 21029 Segmentation fault: 11 $JAVA $OPTS -cp "$classpath" $PROG
10-02-2012
Do you have a crash log you can attach?
09-02-2012
This is a critical bug required for 2.1 release. Without it we have no fallback on Mac with blacklisted GPUs.