jajuk-team / jajuk

Advanded jukebox for users with large or scattered music collections
48 stars 19 forks source link

Random "Comparison method violates its general contract!" errors #1921

Closed bflorat closed 9 years ago

bflorat commented 9 years ago

Reported by bflorat on 5 May 2013 19:14 UTC From java 7, we can get random "Comparison method violates its general contract!" errors that keep some views void at startup or after some events.

bflorat commented 9 years ago

Commented by bflorat on 5 May 2013 19:18 UTC This is due to probable transitivity issue in our compareTo() methods. We fixed few of them but the exception still occur randomly (about 1 time /10). It may also be linked with the way Swingx table sort the columns. We still reproduce the issue with swingx 1.6.5.

To fix this issue definitively, we use the -Djava.util.Arrays.useLegacyMergeSort=true JVM option to keep the legacy behavior. Note that the legacy behavior was not slower that the new (tim) sort algorithm for jajuk.