Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8286633

Loading a website with long script tasks freezes the UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx19
    • javafx
    • None
    • web

      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.
        
       

        1. testjs.html
          0.5 kB
          Jose Pereda
        2. WebViewJSTest.java
          1 kB
          Jose Pereda

            jbhaskar Jay Bhaskar
            jpereda Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: