title: JavaFX error when ending Swing application
body: <p>I have a Swing application in which I need to display internally generated HTML/CSS. In order to do this, I have adapted <a href="https://stackoverflow.com/questions/13717769/jeditorpane-javascript-and-css-support/13718130#13718130">the code from this StackOverflow question</a>.</p>
  
  <p>The control works fine. However, when the application ends, I receive the error</p>
  
  <pre><code>#
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGSEGV (0xb) at pc=0x00007f9622171ae8, pid=5782, tid=140283095549696
  </code></pre>
  
  <p>For what it's worth, the sample code directly from Oracle (quoted in the StackOverflow post) has the same problem.</p>
  
  <p>I have tried explicitly calling <code>Platform.exit()</code> when the window closes, but the error remains. So, how does one shut down JavaFX correctly, when it is embedded in a Swing application?</p>