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

Error with LineChart.getData().clear() method

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_8

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.3.9600]


      A DESCRIPTION OF THE PROBLEM :
      The method LineChart.getData().clear(); produces error.
      At first it is ArrayIndexOutOfBounds Exception. But since it is an internal method which gets the data length internally, one cannot solve the exception.

      REGRESSION. Last worked in version 8u31

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      call LineChart.getData().clear(); method

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Clears n plots, plotted on the Chart.
      ACTUAL -
      Clears n-1 points plotted on the Chart, with the last plot sticking to the chart each time.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
      at java.util.ArrayList.rangeCheck(Unknown Source)
      at java.util.ArrayList.get(Unknown Source)
      at javafx.scene.chart.XYChart$Series.getItem(Unknown Source)
      at javafx.scene.chart.LineChart.dataItemRemoved(Unknown Source)
      at javafx.scene.chart.XYChart.dataItemsChanged(Unknown Source)
      at javafx.scene.chart.XYChart.access$2300(Unknown Source)
      at javafx.scene.chart.XYChart$Series$1.onChanged(Unknown Source)
      at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source)
      at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
      at javafx.collections.ObservableListBase.fireChange(Unknown Source)
      at javafx.collections.ListChangeBuilder.commit(Unknown Source)
      at javafx.collections.ListChangeBuilder.endChange(Unknown Source)
      at javafx.collections.ObservableListBase.endChange(Unknown Source)
      at com.sun.javafx.collections.ObservableListWrapper.clear(Unknown Source)
      at com.application.Controller.clearChart(Controller.java:707)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at sun.reflect.misc.Trampoline.invoke(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
      at javafx.fxml.FXMLLoader$MethodHandler.invoke(Unknown Source)
      at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
      at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
      at javafx.event.Event.fireEvent(Unknown Source)
      at javafx.scene.Node.fireEvent(Unknown Source)
      at javafx.scene.control.Button.fire(Unknown Source)
      at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
      at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
      at javafx.event.Event.fireEvent(Unknown Source)
      at javafx.scene.Scene$MouseHandler.process(Unknown Source)
      at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
      at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$350(Unknown Source)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$283/265967017.get(Unknown Source)
      at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
      at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
      at com.sun.glass.ui.View.notifyMouse(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$$Lambda$36/2117255219.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Declare a Line chart;
      Add sample data to the Line Chart;
      call LineChart.getData().clear() method.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      no workarounds

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vadim Vadim Pakhnushev
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: