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

Crash in prism SW pipeline when layoutY set to infinity

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8u60, openjfx11, openjfx13
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Seen on Java 1.8u152 on Redhat 6.8
      Seen on OpenJDK 11.0.2 on Centos 7.4

      A DESCRIPTION OF THE PROBLEM :
      JVM crashes with SIGSEGV when Double.POSITIVE_INFINITY was accidentally passed into layoutY attribute of a label. Crash does not occur immediately but appears to be related to repainting. A reliable way to reproduce this is by resizing the window. See test case.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached application
      Press the button 10 times

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Application does nothing
      ACTUAL -
      JVM crashes with SIGSEGV every time.

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007f6dccecafba, pid=3739, tid=3757
      #
      # JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
      # Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # C [libprism_sw.so+0xbfba] blitSrcOverLCDMask8888_pre+0x18a
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h" (or dumping to /home/adam/test/core.3739)
      #
      # An error report file with more information is saved as:
      # /home/adam/test/hs_err_pid3739.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #


      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.Label;
      import javafx.scene.layout.Pane;
      import javafx.stage.Stage;

      public class InfinityCrash {

          public static void main(String[] args) {
              Application.launch(BadApp.class);
          }

          public static class BadApp extends Application {

              @Override
              public void start(Stage primaryStage) throws Exception {
                  Label label = new Label("foo");
                  label.setLayoutY(Double.POSITIVE_INFINITY);
                  Button button = new Button("Do not press this button");
                  button.setOnAction(event -> primaryStage.setWidth(primaryStage.getWidth() + 1));
                  primaryStage.setScene(new Scene(new Pane(label, button)));
                  primaryStage.setWidth(640);
                  primaryStage.setHeight(480);
                  primaryStage.show();
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Ensure Double.POSITIVE_INFINITY not used as layoutX attribute

        Attachments

          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: