JDK-8087388 : [Mac] Process cannot terminate if file chooser is left opened
  • Type: Bug
  • Component: javafx
  • Sub-Component: tools-scenebuilder
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2014-01-22
  • Updated: 2019-06-27
  • Resolved: 2019-06-27
Related Reports
Duplicate :  
Description
Start SceneBuilder.
Take menubar > File > Open
Exit from the tool (via menubar): the main SceneBuilder window goes away but the process remains live.
The SceneBuilder process is hanged. If you kill the file chooser window it triggers the stack below but still the process doesn't die.

On Win and Linux there's no such issue because the lack of system menu bar prevents from taking menu Exit action while file chooser is opened. You can only dismiss the main SceneBuilder window by clicking on the decoration exit button but nothing harms, and eventually you close the file chooser then the process terminates.

Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = JavaFX Application Thread
	at com.sun.glass.ui.Application.checkEventThread(Application.java:427)
	at com.sun.glass.ui.EventLoop.leave(EventLoop.java:159)
	at com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native Method)
	at com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(MacApplication.java:113)
	at com.sun.glass.ui.Application.enterNestedEventLoop(Application.java:495)
	at com.sun.glass.ui.EventLoop.enter(EventLoop.java:107)
	at com.sun.glass.ui.mac.MacCommonDialogs._showFileOpenChooser(Native Method)
	at com.sun.glass.ui.mac.MacCommonDialogs.showFileChooser_impl(MacCommonDialogs.java:59)
	at com.sun.glass.ui.mac.MacApplication.staticCommonDialogs_showFileChooser(MacApplication.java:264)
	at com.sun.glass.ui.CommonDialogs.showFileChooser(CommonDialogs.java:212)
	at com.sun.javafx.tk.quantum.QuantumToolkit.showFileChooser(QuantumToolkit.java:1424)
	at javafx.stage.FileChooser.showDialog(FileChooser.java:416)
	at javafx.stage.FileChooser.showOpenMultipleDialog(FileChooser.java:373)
	at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performOpenFile(SceneBuilderApp.java:394)
	at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.performControlAction(SceneBuilderApp.java:136)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$ApplicationControlActionController.perform(MenuBarController.java:1545)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.handleOnActionMenu(MenuBarController.java:1080)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController.access$800(MenuBarController.java:88)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$20.handle(MenuBarController.java:1073)
	at com.oracle.javafx.scenebuilder.app.menubar.MenuBarController$20.handle(MenuBarController.java:1069)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:204)
	at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
	at com.sun.javafx.scene.control.GlobalMenuAdapter$5.handle(GlobalMenuAdapter.java:158)
	at com.sun.javafx.scene.control.GlobalMenuAdapter$5.handle(GlobalMenuAdapter.java:156)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:204)
	at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
	at com.sun.javafx.tk.quantum.GlassSystemMenu$6.action(GlassSystemMenu.java:234)
Comments
SceneBuilder has been removed from jfx-dev. Closing as "Wont' fix".
27-06-2019

as P3 should be fixed or deferred
15-06-2015

I suggest we do not document this one in the RN since it's only on Mac and I do not think anybody except Sandra ever found the issue. Please let me know if you think otherwise.
12-03-2014

If rel notes needed, please add the label. RM/OK
12-03-2014

SQE / OK
12-03-2014

DEV / OK
10-03-2014

JUSTIFICATION: This issue is caused by a runtime bug (RT-36109), which will not be fixed until 8u20. FileChooser is used in too many different places and different contexts in SB for us to work-around the issue now. The issue is a corner case, and only occurs on the Mac. The impact when it occurs is just that the user has to force quit the application. There is no loss of user data. PROPOSAL: Defer to a Future Release.
10-03-2014

Menu bar controller is laking some logic : it should take into account whether a FileChooser is open or not when enabling/disabling commands.
22-01-2014