-
Bug
-
Resolution: Fixed
-
P3
-
8
Performance Control.TableView-Sort benchmark is broken starting from build 8.0-controls-scrum-404.
It fails with:
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Comparable
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:213)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:80)
at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:63)
at com.sun.javafx.collections.ObservableListWrapper.sort(ObservableListWrapper.java:219)
at javafx.collections.FXCollections.sort(FXCollections.java:594)
at javafx.scene.control.TableView$3.call(TableView.java:330)
at javafx.scene.control.TableView$3.call(TableView.java:327)
at javafx.scene.control.TableView.sort(TableView.java:1200)
at javafx.scene.control.TableView.doSort(TableView.java:1230)
at javafx.scene.control.TableView.access$500(TableView.java:251)
at javafx.scene.control.TableView$5.onChanged(TableView.java:423)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:315)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:72)
at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:370)
at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:429)
at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:159)
at controls.TableViewTest.run(TableViewTest.java:411)
at controls.TableViewTest$1.handle(TableViewTest.java:136)
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:388)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:299)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:557)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:540)
at com.sun.javafx.tk.quantum.QuantumToolkit$15.run(QuantumToolkit.java:425)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:94)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
at java.lang.Thread.run(Thread.java:722)
Perhaps this is because of following fix done as part of build 404:
- Improved sorting APIs for TableView and TreeTableView, including:
RT-17550: onSort event for TableColumn
RT-19482: TableView: make sort() (or similar) methods public
Also includes a number of new unit tests for the new API. (detail)
Steps to reproduce the issue:
> cd JFX_WS/tests/performance/Controls/
> ant
> java
-cp "JFX_HOME/rt/lib/ext/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../../import/benchmarks-2.1.1/benchmarks-2.1.1.jar"
jrockit.bm.Main controls.bm.TableViewBenchmark -i 1 -mode sort -usePulse true -cells 150 30
It fails with:
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Comparable
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:213)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:225)
at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:80)
at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:63)
at com.sun.javafx.collections.ObservableListWrapper.sort(ObservableListWrapper.java:219)
at javafx.collections.FXCollections.sort(FXCollections.java:594)
at javafx.scene.control.TableView$3.call(TableView.java:330)
at javafx.scene.control.TableView$3.call(TableView.java:327)
at javafx.scene.control.TableView.sort(TableView.java:1200)
at javafx.scene.control.TableView.doSort(TableView.java:1230)
at javafx.scene.control.TableView.access$500(TableView.java:251)
at javafx.scene.control.TableView$5.onChanged(TableView.java:423)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:315)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:72)
at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:370)
at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:429)
at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:159)
at controls.TableViewTest.run(TableViewTest.java:411)
at controls.TableViewTest$1.handle(TableViewTest.java:136)
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:388)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:299)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:557)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:540)
at com.sun.javafx.tk.quantum.QuantumToolkit$15.run(QuantumToolkit.java:425)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:94)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
at java.lang.Thread.run(Thread.java:722)
Perhaps this is because of following fix done as part of build 404:
- Improved sorting APIs for TableView and TreeTableView, including:
Also includes a number of new unit tests for the new API. (detail)
Steps to reproduce the issue:
> cd JFX_WS/tests/performance/Controls/
> ant
> java
-cp "JFX_HOME/rt/lib/ext/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../../import/benchmarks-2.1.1/benchmarks-2.1.1.jar"
jrockit.bm.Main controls.bm.TableViewBenchmark -i 1 -mode sort -usePulse true -cells 150 30