java.lang.IllegalArgumentException: Comparison method violates its general contract!

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by user3576455
, 1 year ago
Comparison method violates its general contract!
via askubuntu.com by Unknown author, 2 years ago
Comparison method violates its general contract!
via Stack Overflow by Thomas Baer
, 2 years ago
Comparison method violates its general contract!
via Stack Overflow by Thorsten
, 1 year ago
Comparison method violates its general contract!
via Stack Overflow by user1007068
, 1 year ago
Comparison method violates its general contract!
via GitHub by jesperpedersen
, 1 year ago
Comparison method violates its general contract!
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:710)
at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:447)
at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:372)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:178)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:142)
at java.util.Arrays.sort(Arrays.java:1970)
at java.util.Collections.sort(Collections.java:1864)
at android.view.ViewGroup$ChildListForAccessibility.init(ViewGroup.java:6635)
at android.view.ViewGroup$ChildListForAccessibility.obtain(ViewGroup.java:6600)
at android.view.ViewGroup.addChildrenForAccessibility(ViewGroup.java:1703)
at android.view.ViewGroup.onInitializeAccessibilityNodeInfoInternal(ViewGroup.java:2529)
at android.view.View.onInitializeAccessibilityNodeInfo(View.java:5225)
at android.widget.AdapterView.onInitializeAccessibilityNodeInfo(AdapterView.java:937)
at android.widget.AbsListView.onInitializeAccessibilityNodeInfo(AbsListView.java:1494)
at android.widget.GridView.onInitializeAccessibilityNodeInfo(GridView.java:2263)
at android.view.View.createAccessibilityNodeInfoInternal(View.java:5186)
at android.view.View.createAccessibilityNodeInfo(View.java:5173)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:811)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:834)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:720)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:147)
at android.view.AccessibilityInteractionController.access$300(AccessibilityInteractionController.java:49)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:971)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.