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

PieChart throws IAE when its elements are sorted

    XMLWordPrintable

Details

    Description

      Run the attached sample. Click on sort button. See the following exception in the output:

      java.lang.IllegalArgumentException: Children: duplicate children added: parent = Chart$1@6a97e765[styleClass=chart-content]
      at javafx.scene.Parent$2.onProposedChange(Parent.java:437)
      at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:180)
      at javafx.scene.chart.PieChart.dataItemAdded(PieChart.java:372)
      at javafx.scene.chart.PieChart.access$400(PieChart.java:83)
      at javafx.scene.chart.PieChart$1.onChanged(PieChart.java:127)
      at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:158)
      at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:72)
      at com.sun.javafx.collections.BaseObservableList.callObservers(BaseObservableList.java:98)
      at com.sun.javafx.collections.ObservableListWrapper.sort(ObservableListWrapper.java:187)
      at javafx.collections.FXCollections.sort(FXCollections.java:551)
      at PieChartApp$1.handle(PieChartApp.java:82)
      at PieChartApp$1.handle(PieChartApp.java:78)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
      at javafx.event.Event.fireEvent(Event.java:202)
      at javafx.scene.Node.fireEvent(Node.java:7411)
      at javafx.scene.control.Button.fire(Button.java:182)
      at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:190)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:90)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:83)
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:202)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3351)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3190)
      at javafx.scene.Scene$MouseHandler.access$2000(Scene.java:3142)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1543)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2288)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:287)
      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.access$300(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$3$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:722)
      Exception in thread "JavaFX Application Thread"

      Attachments

        Issue Links

          Activity

            People

              psomashe Parvathi Somashekar (Inactive)
              mrkam Alexander Kuznetcov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: