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

PieChart: exception initializing in a background thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • jfx23
    • javafx
    • None

      PieChart fails to initialize in a background thread. To reproduce, use the newly developed NodeInitializationStressTest:

      ```
          @Test
          public void pieChart() {
              test(() -> {
                  PieChart c = new PieChart();
                  c.getData().setAll(createPieSeries());
                  return c;
              }, (c) -> {
                  c.getData().setAll(createPieSeries());
                  accessChart(c);
              });
          }
      ```

      Exception:


      java.lang.ArrayIndexOutOfBoundsException: Index 40 out of bounds for length 40
      at javafx.base/com.sun.javafx.binding.ExpressionHelper$Generic.addListener(ExpressionHelper.java:248)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper$Generic.addListener(ExpressionHelper.java:1)
      at javafx.base/com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:65)
      at javafx.base/javafx.beans.property.ReadOnlyBooleanPropertyBase.addListener(ReadOnlyBooleanPropertyBase.java:52)
      at javafx.base/javafx.beans.property.BooleanPropertyBase.bind(BooleanPropertyBase.java:176)
      at javafx.graphics/javafx.css.StyleableBooleanProperty.bind(StyleableBooleanProperty.java:96)
      at javafx.controls/javafx.scene.chart.PieChart$Data.<init>(PieChart.java:1008)
      at test.robot.javafx.scene.NodeInitializationBackgroundThreadTest.createPieSeries(NodeInitializationBackgroundThreadTest.java:553)
      at test.robot.javafx.scene.NodeInitializationBackgroundThreadTest.lambda$37(NodeInitializationBackgroundThreadTest.java:360)
      at test.robot.javafx.scene.NodeInitializationBackgroundThreadTest$1.run(NodeInitializationBackgroundThreadTest.java:465)

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: