shdqcdsn / counterclockwise

Automatically exported from code.google.com/p/counterclockwise
0 stars 0 forks source link

IllegalArgumentException in CCW outline tree without REPL #639

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I often get the following exception in CCW 0.25.2.STABLE001 when I have a 
Clojure document open in CCW, without an active REPL:

java.lang.IllegalArgumentException: Comparison method violates its general 
contract!
    at java.util.TimSort.mergeLo(TimSort.java:773)
    at java.util.TimSort.mergeAt(TimSort.java:510)
    at java.util.TimSort.mergeForceCollapse(TimSort.java:453)
    at java.util.TimSort.sort(TimSort.java:250)
    at java.util.Arrays.sort(Arrays.java:1435)
    at java.util.Collections.sort(Collections.java:230)
    at ccw.editors.outline.ClojureOutlinePage.setInputInUiThread(ClojureOutlinePage.java:331)
    at ccw.editors.outline.ClojureOutlinePage$2.run(ClojureOutlinePage.java:314)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

eclipse.buildId=4.3.2.M20140221-1700
java.version=1.8.0
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product -keyring 
/Users/cderoove/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product 
org.eclipse.epp.package.rcp.product -keyring /Users/cderoove/.eclipse_keyring 
-showlocation

Error
Thu May 29 12:23:02 JST 2014
An internal error occurred during: "Outline browser tree refresh".

Original issue reported on code.google.com by oni...@gmail.com on 29 May 2014 at 3:28

GoogleCodeExporter commented 9 years ago
Thanks for the report. Since Java 7, Comparators violating their contract are 
not silently ignored anymore, this is the cause of the problem.

I will fix the issue.

Is it possible for you to provide the code that triggers the exception?

Original comment by laurent....@gmail.com on 29 May 2014 at 9:04

GoogleCodeExporter commented 9 years ago
Thanks for looking into this. 
Unfortunately, I can't provide a small standalone project that triggers the 
exception.

Perhaps the following information is helpful: 

I encounter the exception from time till time while working on an Eclipse 
plugin implemented in Clojure.
The corresponding project is configured as an Eclipse plugin project, with the 
Clojure nature enabled.
The project, however, does not use Leiningen nor maven for its dependencies. 

I use two instances of Eclipse: a development instance to edit the plugin's 
Clojure files, and a test instance to debug the running instance of the plugin 
itself. I usually attach a CCW REPL in the development instance to an nREPL 
server hosted in the test instance. 

Original comment by oni...@gmail.com on 29 May 2014 at 9:14

GoogleCodeExporter commented 9 years ago
I forgot to mention that I know from the Stack Traces  where the problem 
occurs: it's in code contributed years ago and providing the Outline View. 
There's a comparator there, and it is provoking the issue.

So the problem can probably be reproduced depending on the content of a clojure 
editor being displayed in the Outline View. Maybe related to when one tries to 
sort alphabetically. Maybe not.

I will examine the Comparator and try to guess / fix the issue, but it would be 
great to be able to reproduce it before the fix, and see it disappear after the 
fix. Would give me some confidence that I at least fixed one case :-)

Original comment by laurent....@gmail.com on 29 May 2014 at 9:23

GoogleCodeExporter commented 9 years ago
Ok, fixed the problem.

Original comment by laurent....@gmail.com on 29 May 2014 at 10:02

GoogleCodeExporter commented 9 years ago
Great! Thanks a lot for your efforts on CCW! I'll give it a spin as soon as it 
is available.

Original comment by oni...@gmail.com on 30 May 2014 at 2:20

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 26 Jun 2014 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 10 Jul 2014 at 8:14