I got a crash with the following stack trace:

E/AndroidRuntime( 6709): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 6709): java.lang.IllegalArgumentException:
Comparison method violates its general contract!
E/AndroidRuntime( 6709): at java.util.TimSort.mergeHi(TimSort.java:
864)
E/AndroidRuntime( 6709): at java.util.TimSort.mergeAt(TimSort.java:
481)
E/AndroidRuntime( 6709): at
java.util.TimSort.mergeCollapse(TimSort.java:406)
E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:210)
E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:169)
E/AndroidRuntime( 6709): at java.util.Arrays.sort(Arrays.java:2500)
E/AndroidRuntime( 6709): at
java.util.Collections.sort(Collections.java:1952)
E/AndroidRuntime( 6709): at
android.gesture.InstanceLearner.classify(InstanceLearner.java:84)
E/AndroidRuntime( 6709): at
android.gesture.GestureStore.recognize(GestureStore.java:134)
E/AndroidRuntime( 6709): at
android.gesture.GestureLibrary.recognize(GestureLibrary.java:64)
E/AndroidRuntime( 6709): at
com.contapps.android.search.SearchResults.onGesturePerformed(SearchResults.java:
130)

Line 130 in my code is:
ArrayList<Prediction> predictions = mLibrary.recognize(gesture);
and it is the first line in onGesturePerformed(GestureOverlayView
overlay, Gesture gesture).

Any idea what's wrong and what checks can I perform on gesture before
sending it to recognize to avoid this crash?

Thanks,
Mor
@ Contapps.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to