Using a WebView to display a website that contains some (poorly designed) scripts that take too long to complete, can block and freeze completely the JavaFX Application Thread.
The attached test loads a simple local web page and after one second executes a simple script that takes 5 seconds to complete.
The animation timer is added for the purpose of measuring the lapse between pulses, and when running the test it will show a value of 5 seconds (like 5002 ms), which is the lapse of time with the application totally unresponsive (the spinning wait cursor can be seen too).
It can be reproduced with any JavaFX version.
The attached test loads a simple local web page and after one second executes a simple script that takes 5 seconds to complete.
The animation timer is added for the purpose of measuring the lapse between pulses, and when running the test it will show a value of 5 seconds (like 5002 ms), which is the lapse of time with the application totally unresponsive (the spinning wait cursor can be seen too).
It can be reproduced with any JavaFX version.
- relates to
-
JDK-8297500 JavaFX application freezes completely after some time when using the WebView
-
- Open
-