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

Intermittent crash when using WebView from JFXPanel application

XMLWordPrintable

    • web
    • generic

        FULL PRODUCT VERSION :
        java version "1.8.0_161"
        Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
        Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

        and

        java version "1.8.0_162"
        Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
        Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 10.0.15063]

        A DESCRIPTION OF THE PROBLEM :
        The JavaFX WebView is very unstable since the latest JRE updates. It's very annoying that the crashes can be reproduced at both java version 8u161 and 8u162.

        I thought the idea behind the different versions was that the odd version gets important security fixes and the even version gets a patch-set update....

        Our Swing application opens a WebView in a separat JFrame by using the JFXPane. We noticed that the applicatoin crashes if a user switches to another application e.g. Outlook and than back to the WebView by clicking e.g. on a HTML TextField.

        The mentioend java frames at the hs_log_pid log files were different at the most crashes:


        We tried to write a test program which reproduces the same JVM crash but the crashes were very random.

        But in the end we found another way to crash the WebView -> just open http://www.wikipedia.org


        REGRESSION. Last worked in version 8u152

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Just open http://www.wikipedia.org


        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        A number of crash files are available at:
        https://drive.google.com/open?id=1c-d8spA2Q9GCll9KX9ErREU4Nck1VB5L

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        package jfxtest;

        import javax.swing.JButton;
        import javax.swing.JFrame;

        import javafx.application.Platform;
        import javafx.embed.swing.JFXPanel;
        import javafx.scene.Scene;
        import javafx.scene.web.WebView;


        public class JFXTest
        {
        public static void main(String[] args)
        {
        Platform.setImplicitExit(false);

        JFrame frame = new JFrame("JFXTest");
        frame.setSize(800, 600);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JButton openNewFrameButton = new JButton("Open a new JFrame");
        openNewFrameButton.addActionListener(l ->
        {
        JFrame newFrame = new JFrame("New Frame");
        JFXPanel jfxPanel = new JFXPanel();

        Platform.runLater(() ->
        {
        WebView webView = new WebView();
        webView.getEngine().load("http://www.wikipedia.org");

        Scene scene = new Scene(webView);
        jfxPanel.setScene(scene);
        });


        newFrame.add(jfxPanel);
        newFrame.setSize(800, 600);
        newFrame.setVisible(true);
        newFrame.toFront();

        });

        frame.add(openNewFrameButton);
        frame.setVisible(true);
        }
        }

        ---------- END SOURCE ----------

          1. JFXTest.java
            1.0 kB
          2. hs_err_pid3140.log
            71 kB
          3. hs_err_pid2788.log
            35 kB
          4. hs_err_pid19872.log
            38 kB
          5. hs_err_pid12760.log
            38 kB
          6. hs_err_pid12576.log
            39 kB
          7. hs_err_pid11292.log
            39 kB

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

                Created:
                Updated:
                Resolved: