0 Replies Latest reply: Nov 7, 2012 6:47 PM by 893630 RSS

    frequent change of fxml pages through menuItems trigger exception

    893630
      Hi,
      I have set of set of menuItems in a menuBar. If I constantly click the menuItems and hence change the fxml pages one after another, then after a few trials the following exception is thrown.
      java.lang.IllegalArgumentException: Comparison method violates its general contract!
           at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
           at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
           at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:374)
           at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
           at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
           at java.util.Arrays.sort(Arrays.java:472)
           at java.util.Collections.sort(Collections.java:155)
           at com.sun.javafx.css.StyleManager$Cache.getStyles(StyleManager.java:1571)
           at com.sun.javafx.css.StyleManager$Cache.getStyleMap(StyleManager.java:1503)
           at com.sun.javafx.css.StyleManager$Cache.access$2200(StyleManager.java:1437)
           at com.sun.javafx.css.StyleManager$StylesheetContainer.getStyleHelper(StyleManager.java:1379)
           at com.sun.javafx.css.StyleManager$StylesheetContainer.access$1300(StyleManager.java:1031)
           at com.sun.javafx.css.StyleManager.getStyleHelper(StyleManager.java:974)
           at javafx.scene.Node.impl_createStyleHelper(Node.java:7433)
           at javafx.scene.Node.impl_processCSS(Node.java:7403)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
           at javafx.scene.control.Control.impl_processCSS(Control.java:1102)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.control.Control.impl_processCSS(Control.java:1102)
           at javafx.scene.Parent.impl_processCSS(Parent.java:1153)
           at javafx.scene.Node.processCSS(Node.java:7383)
           at javafx.scene.Scene.doCSSPass(Scene.java:443)
           at javafx.scene.Scene.preferredSize(Scene.java:1445)
           at javafx.scene.Scene.impl_preferredSize(Scene.java:1512)
           at javafx.stage.Window.sizeToScene(Window.java:178)
           at controllers.Client.replaceSceneContent(Client.java:622)
      Client.java line 622 is nothing but
      stage.sizeToScene();
      Not sure, what/where the issue lies as there is no new explicit comparator being used in my code.

      Thanks

      Edited by: 890627 on Nov 7, 2012 4:37 PM