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

JavaFX can crash due to loading the wrong native libraries if system libraries are installed

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 19.04 (Disco Dingo)

      openjdk version "11.0.3" 2019-04-16
      OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu1)
      OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu1, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      When the HTML code, that the webengine is tasked to render contains japanese/sundanese punctuation code points, the code is not correctly rendered, but crashes the WebEngine.

      Sample characters: \uA9C1\u1CC0\uA9C2


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I used netbeans to execute the souce code attached.

      1. The project is created by placing the pom.xml into a new subdirectory.
      2. Under that directory the secondfile needs to be created as: src/main/java/eu/doppel_helix/dev/jdk/reproducecrash/TestBrowser.java.
      3. Open the project with netbeans
      4. Run clean and build on it (to initialize dependencies from maven central)
      5. Open TestBrowser and run it by invoking "Run file" from the context menu

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Page showing the rendered unicode symbols or "missing character" symbols.
      ACTUAL -
      Segfault from the JVM. In the source code are two variants. I ran both variants, the hs_err log can be found here (as I could not upload it here):
      https://www.doppel-helix.eu/hs_err_unicode_characters.log
      https://www.doppel-helix.eu/hs_err_unicode_entity.log

      ---------- BEGIN SOURCE ----------
      ============ pom.xml ===========
      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <groupId>eu.doppel_helix.dev.jdk</groupId>
          <artifactId>reproducecrash</artifactId>
          <version>1.0-SNAPSHOT</version>
          <packaging>jar</packaging>
          <properties>
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
              <maven.compiler.source>11</maven.compiler.source>
              <maven.compiler.target>11</maven.compiler.target>
          </properties>
          <dependencies>
              <dependency>
                  <groupId>org.openjfx</groupId>
                  <artifactId>javafx-controls</artifactId>
                  <version>13-ea+6</version>
              </dependency>
              <dependency>
                  <groupId>org.openjfx</groupId>
                  <artifactId>javafx-web</artifactId>
                  <version>13-ea+6</version>
              </dependency>
          </dependencies>
      </project>

      ============ TestBrowser ===========
      public class TestBrowser implements Runnable {

          public static void main(String[] args) {
              Platform.startup(new TestBrowser());
          }

          public void run() {
              Stage primaryStage = new Stage();

      primaryStage.setTitle("Hello World!");
      WebView view = new WebView();
      BorderPane bp = new BorderPane();
      bp.setCenter(view);
      primaryStage.setScene(new Scene(bp, 800, 600));
      primaryStage.show();

              StringBuilder sb = new StringBuilder();
              sb.append("<!DOCTYPE html>\n");
              sb.append("<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"de\">\n");
              sb.append("<head>\n");
              sb.append("<title>Demo Site</title>\n");
              sb.append("</head>\n");
              sb.append("<body>\n");
              sb.append("<h1>Test</h1>");
      // Variant 1: Unicode characters
              sb.append("\uA9C1\u1CC0\uA9C2");
      // Variant 2: Unicode entities
      // sb.append("&#xA9C1;&#x1CC0;&#xA9C2;");
              sb.append("</body>");
              sb.append("</html>");

              view.getEngine().loadContent(sb.toString());
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcr Kevin Rushforth
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: