JDK-8128710 : Quitting Mac Glass application throws exceptions (ES2, J2D) and crashes Java (J2D)
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-08-26
  • Updated: 2015-06-17
  • Resolved: 2011-09-13
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.
Other
fx2.0.2Resolved
Related Reports
Duplicate :  
Description
When running a Glass application on Mac, if one selects the menu item

java -> Quit Glass Application

or uses the Command-Q keyboard shortcut, the exceptions are thrown for both the ES2 and J2D pipelines and Java crashes for the J2D pipeline. This was observed for both apps/internal/MediaPlayer and apps/internal/WebMap so it is not a Media issue.

1. MediaPlayer
1.1 ES2

$ java -Djava.library.path=$JAVAFX_HOME/bin -classpath dist/diaPlayer.jar:/Users/bpb/Work/presidio-scrum-media/artifacts/sdk/rt/lib/jfxrt.jar com.javafx.experiments.mediaplayer.MediaPlayer
onPlaying
Java has been detached already, but someone is still trying to use it at -[GlassRunnable run]:/HUDSON/workspace/presidio/label/macosx-universal-14/glass/glass-mat-lib-macosx/src/com/sun/mat/ui/GlassApplication.m:151
Java has been detached already, but someone is still trying to use it at -[GlassRunnable dealloc]:/HUDSON/workspace/presidio/label/macosx-universal-14/glass/glass-mat-lib-macosx/src/com/sun/mat/ui/GlassApplication.m:163
Java has been detached already, but someone is still trying to use it at -[GlassRunnable run]:/HUDSON/workspace/presidio/label/macosx-universal-14/glass/glass-mat-lib-macosx/src/com/sun/mat/ui/GlassApplication.m:151
Java has been detached already, but someone is still trying to use it at -[GlassRunnable dealloc]:/HUDSON/workspace/presidio/label/macosx-universal-14/glass/glass-mat-lib-macosx/src/com/sun/mat/ui/GlassApplication.m:163
Exception in thread "Timer-0" java.lang.RuntimeException: Main Java thread is detached.
	at com.sun.glass.ui.mac.MacApplication._invokeLater(Native Method)
	at com.sun.glass.ui.Application.invokeLater(Application.java:171)
	at com.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:546)
	at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:105)
	at javafx.application.Platform.runLater(Platform.java:31)
	at com.javafx.experiments.mediaplayer.MediaControl.updateValues(MediaControl.java:194)
	at com.javafx.experiments.mediaplayer.MediaControl$2.invalidated(MediaControl.java:93)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:61)
	at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:151)
	at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:117)
	at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:86)
	at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:119)
	at javafx.scene.media.MediaPlayer.setCurrentTime(MediaPlayer.java:1048)
	at javafx.scene.media.MediaPlayer.updateTime(MediaPlayer.java:1456)
	at javafx.scene.media.MediaPlayer$_MediaTimerTask.run(MediaPlayer.java:2269)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

1.2 J2D

$ java -Dprism.order=j2d -Djava.library.path=$JAVAFX_HOME/bin -classpath dist/MediaPlayer.jar:/Users/bpb/Work/presidio-scrum-media/artifacts/sdk/rt/lib/jfxrt.jar com.javafx.experiments.mediaplayer.MediaPlayer
2011-08-26 06:57:04.688 java[310:a07] Process manager already initialized -- can't fully enable headless mode.
onPlaying
Segmentation fault

(see attached screen shot and stack trace)

2. WebMap
2.1 ES2

bpb:{WebMap} $ java -Djava.library.path=$JAVAFX_HOME/bin -classpath /Users/bpb/Work/presidio-scrum-media/artifacts/sdk/rt/lib/jfxrt.jar:dist/WebMap.jar com.javafx.experiments.map.Main
WARNING: com.sun.javafx.css.StyleManager loadStylesheet Resource "null" not found.
WARNING: com.sun.javafx.css.StyleManager loadStylesheet Resource "null" not found.
Glass detected outstanding Java exception at _GlassTimerTask:/HUDSON/workspace/presidio/label/macosx-universal-14/glass/glass-mat-lib-macosx/src/com/sun/mat/ui/GlassTimer.m:48
Exception in thread "Glass Timer Thread" java.lang.RuntimeException: Main Java thread is detached.
	at com.sun.glass.ui.mac.MacApplication._postOnEventQueue(Native Method)
	at com.sun.glass.ui.Application.postOnEventQueue(Application.java:186)
	at com.sun.javafx.tk.quantum.QuantumToolkit$11.run(QuantumToolkit.java:345)
^C

2.2 J2D

bpb:{WebMap} java -Dprism.order=j2d -Djava.library.path=$JAVAFX_HOME/bin -classpath /Users/bpb/Work/presidio-scrum-media/artifacts/sdk/rt/lib/jfxrt.jar:dist/WebMap.jar com.javafx.experiments.map.Main
WARNING: com.sun.javafx.css.StyleManager loadStylesheet Resource "null" not found.
WARNING: com.sun.javafx.css.StyleManager loadStylesheet Resource "null" not found.
2011-08-26 07:17:12.240 java[465:a07] Process manager already initialized -- can't fully enable headless mode.
Segmentation fault

(same crash as attached for MediaPlayer)
Comments
This may be a duplicate of RT-15599. Assign to Morris to verify.
13-09-2011

Verified that this has been fixed along with RT-15599
13-09-2011

If the Mac version is going to the public I hope then that there is a disclaimer about it's being not ready for prime time.
26-08-2011

We have a number of Mac exit errors, so this is probably a duplicate. Lowering it to Major to match the priority of the other issues. This will need to be addressed in a Presidio Update release.
26-08-2011

Raising priority to Critical as this is rather an embarrassing way to exit an application.
26-08-2011