Comparison method violates its general contract! -> Java 1.7 bug #451
Comments
|
I couldn't reproduce it and we see it is some bug in Swing (this type of exceptions happens on sorting and HelperPanel doesn't sort anything). Then I found it is a bug in Java 7: What they advise: If player experiencing such exception over and over, he/she may run Mage.Client with -Djava.util.Arrays.useLegacyMergeSort=true Also some advices can be found here: |
|
Suggesting to close the bug as it is not a bug of XMage. |
|
Makes it sense that we set the useLegacyMergeSort parameter in XMage by default? |
|
what is drawback for using it? |
|
Found nothing specific about drawbacks yet. I guess we have to test it. I will set it in the client main class to avoid more options for the start script and commit the change. |
|
That it still happens in client can maybe mean that one of our own sorts has a problem? http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=15076&p=158620#p158646 |
|
Seems to be the same bug source http://stackoverflow.com/questions/16866535/swing-components-mergesort-error |
|
Had it happen on the development version. Here's the error report: FATAL 2014-08-27 18:22:17,044 =>[AWT-EventQueue-0] EDTExceptionHandler.handle |
|
Don't know if this will solve the problem. But the setProperty was performed probably too late, as already swing compnents were used. |
|
In mageclient.log I got this: at java.awt.EventDispatchThread.run(Unknown Source) |
|
No more reports of this problem. Workaround seems to work now. |
http://www.slightlymagic.net/forum/viewtopic.php?f=70&t=14709#p154924

When i played genesis Wave with x= 23 and i put a lot of card in play, an error appears.
at mage.client.game.HelperPanel.setState(HelperPanel.java:146)
at mage.client.game.HelperPanel$2.actionPerformed(HelperPanel.java:113)
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(Unknown Source)
at java.util.TimSort.mergeAt(Unknown Source)
at java.util.TimSort.mergeCollapse(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.Collections.sort(Unknown Source)
at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Unknown Source)
at javax.swing.SortingFocusTraversalPolicy.getFocusTraversalCycle(Unknown Source)
at javax.swing.SortingFocusTraversalPolicy.getComponentAfter(Unknown Source)
at javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(Unknown Source)
at java.awt.Component.getNextFocusCandidate(Unknown Source)
at java.awt.Component.transferFocus(Unknown Source)
at java.awt.Component.hide(Unknown Source)
at javax.swing.JComponent.hide(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at javax.swing.JComponent.setVisible(Unknown Source)
at mage.client.game.HelperPanel.setState(HelperPanel.java:146)
at mage.client.game.HelperPanel$2.actionPerformed(HelperPanel.java:113)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.
The text was updated successfully, but these errors were encountered: