Community
Participate
Working Groups
I installed the item on http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigor and then tried to install Eclipse Java Development Tools 3.7.0.v20110520-0800-7z8gFchFMTdFYKuLqBLqRja9B15B. I used the internal server http://download.eclipse.org/releases/indigo. I got this error: An internal error occurred during: "Install download0". Comparison method violates its general contract! -- Configuration Details -- Product: Eclipse 1.4.0.20110609-1120 (org.eclipse.epp.package.cpp.product) Installed Features: org.eclipse.platform 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f
In addition, when I try to install C/C++ Development Tools 8.0.0.201106081058 on the current version of the download at http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigor, I get this error: An error occurred while collecting items to be installed session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Comparison method violates its general contract! Comparison method violates its general contract!
This is probably not a CDT error. It happens for me when I try to update from Eclipse 3.7.0 to 3.7.1. Here's the stack trace from the error log: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:835) at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:453) at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376) at java.util.ComparableTimSort.sort(ComparableTimSort.java:182) at java.util.ComparableTimSort.sort(ComparableTimSort.java:146) at java.util.Arrays.sort(Arrays.java:472) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:319) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:577) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:680) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:260) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:235) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:191) at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:122) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:664) at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:63) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The error went away, when I ran Eclipse with JDK 1.6.0_27 instead of JDK 1.7. Now the question is: is there a bug in JDK 1.7's sort algorithm, or did it detect a bug in a comparator implementation inside Eclipse?
(In reply to comment #2) > This is probably not a CDT error. It happens for me when I try to update from > Eclipse 3.7.0 to 3.7.1. Here's the stack trace from the error log: > java.lang.IllegalArgumentException: Comparison method violates its general > contract! ... > org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:319) That's coming from p2 component
Java 7 revealed a pb in the p2 code. This has been fixed in 3.7.1. There is a dupe but I can't find it.