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

[Charts] Series: NPE when adding data items multiple times

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u40
    • 8u20
    • javafx
    • Windows 8 x64 using Java 8u20 b21

    Description

      I am getting NullPointerException after executing this code http://pastebin.com/6gU0Euu3
      It seems that adding multiple times the same data inside the AnimationTimer causes this issue because NPE is thrown the second time the data is added. You can read more at SO: http://stackoverflow.com/questions/24592796/observablelist-throwing-nullpointerexception

      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at javafx.scene.chart.XYChart$Series$1.onChanged(XYChart.java:1516)
      at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
      at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
      at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
      at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
      at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
      at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
      at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:155)
      at java.util.AbstractList.add(AbstractList.java:108)
      at ExceptionTest$1.handle(ExceptionTest.java:32)
      at javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$428(AnimationTimer.java:57)
      at javafx.animation.AnimationTimer$AnimationTimerReceiver$$Lambda$66/2028116750.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)
      at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)
      at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:447)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:431)
      at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$363(QuantumToolkit.java:298)
      at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$41/1083608826.run(Unknown Source)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/335471116.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)

      Attachments

        Issue Links

          Activity

            People

              msladecek Martin Sládeček
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: