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

JavaFX ComboBox freezes applications on Windows 10 with touchscreen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • 9
    • 8u60
    • javafx

      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 10.0.10240]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Plugged in planar and/or 3M touchscreen

      A DESCRIPTION OF THE PROBLEM :
      This is related to bug: JDK-8132897

      On Windows 10, opening a ComboBox through a click or touch will cause any JavaFX application to freeze.

      We have found that the hang only happens when a touch screen is plugged in. (Surface Pro is always affected, while a PC with a USB touch screen will only have the freeze while the USB cable is plugged in)


      REGRESSION. Last worked in version 8u40

      ADDITIONAL REGRESSION INFORMATION:
      Works in

      java version "1.8.0_25"
      Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Case 1:
      Using a touch screen, touch a JavaFX ComboBox to make the popup appear
      Touch outside of the popup to make it disappear

      Case 2:
      While a touch screen is plugged in
      Click on a JavaFX ComboBox to make the popup appear
      Click outside of the popup to make it disappear

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      ComboBox popup shows and hides
      ACTUAL -
      Application freezes

      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      public class TestCMB extends Application {



      public static void main(String[] args) {
              launch(args);
          }
          @Override
          public void start(Stage primaryStage) {
          
           HBox root = new HBox(10);
           Scene scene = new Scene(root);
           Button b = new Button("Click");
           ComboBox<String> cmb = new ComboBox<String>();
           cmb.getItems().addAll("item 1","item 2", "item 3");
           root.getChildren().addAll(b,cmb);

              primaryStage.setScene(scene);
              primaryStage.show();
          }

      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Works _ONLY_ when using the mouse, as soon as a touch input is used, the appliaction will freeze:

      cmb.requestFocus();

      If the ComboBox has the focus prior to being clicked, the application will not freeze unless a touch input is used.

            ckyang Chien Yang (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: