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

[macosx] ListView - text with diacritics corrupts cell display when scrolling

XMLWordPrintable

    • x86
    • os_x

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

      ADDITIONAL OS VERSION INFORMATION :
      Darwin Jaeger 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      MacBook Pro 2016 15"

      A DESCRIPTION OF THE PROBLEM :
      When scrolling (either by mouse or keyboard) String text in a ListView will corrupt when said text uses certain diacritics. I haven't seen the problem manifest with Arabic or CJK text.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a ListView and call setItems() with Strings that contain diacritics and enough to show a scroll bar. When application is ran, scroll through the list to see the corruption.

      In source code below I triple the amount of names to display that shows the corruption on the third set of name instances as you scroll down. Scrolling back up shows the corruption for the other two instances. With just one instance of the names I have to bounce down and back up the list twice to see the corruption.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expected results is to see the correct text that was put into the ListView.
      ACTUAL -
      Text corrupts and instead of the text it shows five horizontal lines that are occasionally broken by a vertical space.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No messages or crash logs

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class ListViewExample extends Application {
      private static final ObservableList<String> names = FXCollections.observableArrayList();

      public static void main(String[] args) {
      launch(args);
      }

      @Override
      public void start(Stage primaryStage) throws Exception {
      primaryStage.setTitle("List View Sample");

      final ListView<String> listView = new ListView<>();
      listView.setPrefSize(200, 200);
      listView.setEditable(true);

      for (int index = 0; index < 3; index++) {
      names.addAll("Mårtenson", "Càglieri",
      "Adam", "Alex", "Alfred", "Albert",
      "Brenda", "Connie", "Derek", "Donny",
      "Lynne", "Myrtle", "Rose", "Rudolph",
      "Tony", "Trudy", "Williams", "Zach");
      }

      listView.setItems(names);

      StackPane root = new StackPane();
      root.getChildren().add(listView);
      primaryStage.setScene(new Scene(root, 200, 200));
      primaryStage.show();
      }
      }

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

      CUSTOMER SUBMITTED WORKAROUND :
      I haven't found one, yet.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: