ADDITIONAL SYSTEM INFORMATION : Its crashes on Win7 64bit, and Linux 64bit (manjaro). Tested on Jdk 10.0.2 and 11.0.1 A DESCRIPTION OF THE PROBLEM : JVM crashes wen we load 2 times following HTML to JavaFX WebView component: <blockquote class=\"twitter-tweet\"><a href=\"https://twitter.com/stu_bot3000/status/793389598227529728?ref_src=twsrc%5Etfw\"></a></blockquote>\n" + "<script src=\"https://platform.twitter.com/widgets.js\"></script> STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Load given HTML to WebView, wait for a while to load content completely, and set this html content again. ---------- BEGIN SOURCE ---------- import javafx.application.Application; import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.web.WebView; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) { try { WebView webView = new WebView(); Scene scene = new Scene(webView, 800, 600); primaryStage.setScene(scene); primaryStage.show(); String crashHtml = "<blockquote class=\"twitter-tweet\"><a href=\"https://twitter.com/stu_bot3000/status/793389598227529728?ref_src=twsrc%5Etfw\"></a></blockquote>\n" + "<script src=\"https://platform.twitter.com/widgets.js\"></script>"; webView.getEngine().loadContent(crashHtml); new Thread(() -> { try { System.out.println("Wait 5 sec to full load, then set this content again..."); Thread.sleep(5000); Platform.runLater(() -> { System.out.println("Reloading... and crash..."); webView.getEngine().loadContent(crashHtml); }); } catch (Exception e) { } }).start(); } catch (Exception e) { e.printStackTrace(); } } } ---------- END SOURCE ---------- FREQUENCY : always
|