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

Webview leaks resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9
    • 8u60, 9
    • javafx
    • web
    • x86
    • windows_8

      FULL PRODUCT VERSION :
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.3.9600]

      A DESCRIPTION OF THE PROBLEM :
      When refreshing webview, memory usage reported by Windows climbs.
      The more complex the webpage is, the faster is grows
      Possibly related to https://bugs.openjdk.java.net/browse/JDK-8087417

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the program and watch the memory usage in task manager

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No extra memory use after a few minues
      ACTUAL -
      Memory grows.
      If you use a complex webpage (like oracle.com) it grows to 1gb after 3 hours even if -Xmx512M is used

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class OpenTest extends Application{
      public static void main(String[] args) {
      launch(args);
      }

      @Override public void start(Stage primaryStage) {
      primaryStage.setTitle("Webview refresh");
      final WebView webView = new WebView();
      primaryStage.setScene(new Scene(webView, 800, 500));
      primaryStage.show();
      new Timer().scheduleAtFixedRate(new TimerTask() {
      @Override public void run() {
      Platform.runLater(()->webView.getEngine().load("http://oracle.com"));
      }
      }, 1000, 1000);
      }
      }
      ---------- END SOURCE ----------

            ghb Guru Hb (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: