You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crashes at Startup after having completely scanned the library.
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:439)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1492)
at java.util.ArrayList.sort(ArrayList.java:1470)
at java.util.Collections.sort(Collections.java:206)
at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(Unknown Source:7)
at org.oxycblt.auxio.list.sort.Sort.songs(SourceFile:21)
at org.oxycblt.auxio.home.HomeViewModel.onMusicChanges(SourceFile:30)
at org.oxycblt.auxio.music.MusicRepositoryImpl.dispatchLibraryChange(Unknown Source:27)
at org.oxycblt.auxio.music.MusicRepositoryImpl$indexImpl$5.invokeSuspend(SourceFile:16)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:107)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
Have you tried disabling "Intelligent Sorting" in Settings -> Content? You should be able to do this before it crashes on a fresh install that's still taking awhile to load music @fungs. This would allow me to confirm what I think it is, that apparently the name comparison code that I do have really does require me to ensure that the comparison and equality results are 100% consistent.
@OxygenCobalt, I can confirm that the intelligent sorting (excluding articles etc.) option seems to cause this issue. I disabled it on a fresh install, not running into that issue and enabled it again, which caused the same error.
Alright, this implies something I feared would happen. The issue is that intelligent name comparison plays a tad loose with the sorting contract. If you have a name like "FooBar" and "Foo Bar", the comparator will consider those equal, but the actual equality check won't. I thought this was okay after reading the comparator contract documentation, but apparently not. Thanks for reporting this @fungs.
Describe the Bug/Crash
Start app, see bug report.
Describe the intended behavior
Not crash.
What android version do you use?
Android 10
What device model do you use?
Gigaset GS290 eOS
Bug report
Crashes at Startup after having completely scanned the library.
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
at java.util.TimSort.mergeAt(TimSort.java:514)
at java.util.TimSort.mergeCollapse(TimSort.java:439)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1492)
at java.util.ArrayList.sort(ArrayList.java:1470)
at java.util.Collections.sort(Collections.java:206)
at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(Unknown Source:7)
at org.oxycblt.auxio.list.sort.Sort.songs(SourceFile:21)
at org.oxycblt.auxio.home.HomeViewModel.onMusicChanges(SourceFile:30)
at org.oxycblt.auxio.music.MusicRepositoryImpl.dispatchLibraryChange(Unknown Source:27)
at org.oxycblt.auxio.music.MusicRepositoryImpl$indexImpl$5.invokeSuspend(SourceFile:16)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:107)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
Duplicates
The text was updated successfully, but these errors were encountered: