JDK-7182660 : Can't save file using FileSaveService when running FX applet
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7u6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-07-09
  • Updated: 2013-09-12
  • Resolved: 2012-07-11
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.
7u6Fixed 8 b47Fixed
Initially filed in JIRA - http://javafx-jira.kenai.com/browse/RT-23205

but the fix requires changes on JRE side.

Thread dump attached.

EVALUATION Problem caused by attempt to offload work from main FX thread to system thread that then tries get it back on the same FX thread but it is blocked. In AWT case we will use another EDT and this will avoid this type of deadlock but JavaFX has single JavaFX application thread. The fix starts using Waiter interface. In JavaFX case this will enter the nested event loop before blocking current event loop. In AWT case this will just execute requested operation in place. The hang is always reproducible when FileSaveService is called from the FX app thread. AWT case - Waiter calls task.run (com.sun.deploy.util.Waiter.default_waiter) and the change has no impact on AWT FX case - Waiter starts nested event loop and starts new worker thread to call task.run (com.sun.deploy.uitoolkit.impl.fx.FxWaiter) and unblocks file chooser