Modify

Opened 11 years ago

Closed 11 years ago

Last modified 5 months ago

#8888 closed defect (fixed)

IAE "Comparison method violates its general contract" in Java7 webstart

Reported by: niki.guldbrand@… Owned by: team
Priority: normal Milestone:
Component: Core Webstart Version:
Keywords: webstart java7 icedtea Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. load the wkipedia plugin (just a guess, as other plugins my be involved too)
  2. try to undock it

What is the expected result?

  • That the undocked window for wikipedia appears

What happens instead?

  • java.lang.IllegalArgumentException:
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-07-10 01:34:22
Last Changed Author: stoecker
Revision: 6060
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-07-08 22:13:24 +0200 (Mon, 08 Jul 2013)
Last Changed Rev: 6060

Identification: JOSM/1.5 (6060 en) Linux Fedora 19 (Schrödinger’s Cat)
Memory Usage: 225 MB / 1680 MB (63 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Xbootclasspath/a:/usr/share/icedtea-web/netx.jar:/usr/share/java/js.jar, -Xms8m, -Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
Dataset consistency test: No problems found

Plugin: AddrInterpolation (29435)
Plugin: Create_grid_of_ways (29435)
Plugin: DirectDownload (29435)
Plugin: DirectUpload (29719)
Plugin: ElevationProfile (29611)
Plugin: FixAddresses (29661)
Plugin: HouseNumberTaggingTool (29487)
Plugin: ImportImagePlugin (29531)
Plugin: InfoMode (29435)
Plugin: OpeningHoursEditor (29435)
Plugin: PicLayer (29601)
Plugin: SeaMapEditor
Plugin: SimplifyArea (29435)
Plugin: alignways (29435)
Plugin: continuosDownload (28565)
Plugin: contourmerge (1005)
Plugin: dataimport (29435)
Plugin: download_along (29746)
Plugin: editgpx (29596)
Plugin: ext_tools (29435)
Plugin: geochat (29592)
Plugin: geotools (29435)
Plugin: gpsblam (29435)
Plugin: gpxfilter (29435)
Plugin: graphview (29525)
Plugin: imagery-xml-bounds (29710)
Plugin: imagery_offset_db (29467)
Plugin: imageryadjust (29609)
Plugin: importvec (29435)
Plugin: jts (29613)
Plugin: junctionchecking (29596)
Plugin: log4j (29435)
Plugin: mapdust (29525)
Plugin: measurement (29750)
Plugin: merge-overlap (29645)
Plugin: mirrored_download (29643)
Plugin: namemanager (29435)
Plugin: notes
Plugin: openstreetbugs (29435)
Plugin: openvisible (29435)
Plugin: osmarender (29639)
Plugin: pbf (29708)
Plugin: photo_geotagging (29435)
Plugin: poly (29711)
Plugin: print (29529)
Plugin: proj4j (29435)
Plugin: reltoolbox (29535)
Plugin: reverter (29663)
Plugin: routes (29435)
Plugin: routing (29633)
Plugin: scripting
Plugin: tageditor (29435)
Plugin: terracer (29623)
Plugin: todo (29155)
Plugin: turnlanes (29435)
Plugin: turnrestrictions (29435)
Plugin: undelete (29555)
Plugin: utilsplugin2 (29742)
Plugin: waydownloader (29435)
Plugin: waypoint_search (29435)
Plugin: wayselector (29435)
Plugin: wikipedia (29523)

java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeLo(TimSort.java:747)
	at java.util.TimSort.mergeAt(TimSort.java:483)
	at java.util.TimSort.mergeCollapse(TimSort.java:410)
	at java.util.TimSort.sort(TimSort.java:214)
	at java.util.TimSort.sort(TimSort.java:173)
	at java.util.Arrays.sort(Arrays.java:659)
	at java.util.Collections.sort(Collections.java:217)
	at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(SortingFocusTraversalPolicy.java:136)
	at javax.swing.SortingFocusTraversalPolicy.getFocusTraversalCycle(SortingFocusTraversalPolicy.java:110)
	at javax.swing.SortingFocusTraversalPolicy.getComponentAfter(SortingFocusTraversalPolicy.java:280)
	at javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(LayoutFocusTraversalPolicy.java:106)
	at java.awt.Component.getNextFocusCandidate(Component.java:7860)
	at java.awt.Component.transferFocus(Component.java:7828)
	at java.awt.Component.hide(Component.java:1684)
	at java.awt.Component.show(Component.java:1653)
	at java.awt.Component.setVisible(Component.java:1603)
	at javax.swing.JComponent.setVisible(JComponent.java:2631)
	at org.openstreetmap.josm.gui.dialogs.ToggleDialog.detach(ToggleDialog.java:345)
	at org.openstreetmap.josm.gui.dialogs.ToggleDialog$TitleBar$4.actionPerformed(ToggleDialog.java:525)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6505)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
	at java.awt.Component.processEvent(Component.java:6270)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:708)
	at java.awt.EventQueue$4.run(EventQueue.java:706)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
...<snip>...

Attachments (0)

Change History (22)

comment:1 by Don-vip, 11 years ago

This exception should not happen anymore since r5977 and the closure of #8712. What's your value of property jdk.Arrays.useLegacyMergeSort in advanced preferences ?

comment:2 by Niki Guldbrand <niki.guldbrand@…>, 11 years ago

It's set to "True"

comment:3 by Don-vip, 11 years ago

Keywords: webstart java7 added; template_report removed
Summary: Undocking Wikipedia plugin results in: java.lang.IllegalArgumentException: Comparison method violates its general contractUndocking Wikipedia dialog in Java7 webstart results in: java.lang.IllegalArgumentException: Comparison method violates its general contract

ok got it, updating system property does not work with Java webstart :(

comment:4 by Don-vip, 11 years ago

Description: modified (diff)

comment:5 by Don-vip, 11 years ago

The property appears to have been added to secure JNLP properties in Java 8:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7160619

Good news, looks like there's a backport for 7u6:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2226471

comment:6 by Don-vip, 11 years ago

Resolution: fixed
Status: newclosed

In 6079/josm:

fix #8888 - set java.util.Arrays.useLegacyMergeSort`to true in JNLP files to avoid "Comparison method violates its general contract" errors in Java 7

comment:7 by Don-vip, 11 years ago

Ticket #9719 has been marked as a duplicate of this ticket.

comment:8 by Don-vip, 11 years ago

Keywords: icedtea added
Resolution: fixed
Status: closedreopened
Summary: Undocking Wikipedia dialog in Java7 webstart results in: java.lang.IllegalArgumentException: Comparison method violates its general contractIAE "Comparison method violates its general contract" in Java7 webstart

Looks like the fix does not work with IcedTea-web

comment:9 by Don-vip, 11 years ago

In 6850/josm:

see #8888 - Add icedtea-web package version in status report for Debian/Ubuntu

comment:10 by anonymous, 11 years ago

Sorry, not fixed for me:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-02-18 02:34:55
Last Changed Author: Don-vip
Revision: 6867
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-02-18 00:35:15 +0100 (Tue, 18 Feb 2014)
Last Changed Rev: 6867

Identification: JOSM/1.5 (6867 de) Linux Debian GNU/Linux 7.4 (wheezy)
Memory Usage: 122 MB / 910 MB (48 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK Server VM
Java package: openjdk-7-jre:i386-7u25-2.3.10-1~deb7u1
WebStart package: icedtea-netx:i386-1.4-3~deb7u2
VM arguments: [-Xbootclasspath/a:/usr/share/icedtea-web/netx.jar, -Xms8m, -Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/bin/javaws, -Djava.security.manager, -Djava.security.policy=/etc/icedtea-web/javaws.policy]
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (30235)
Plugin: buildings_tools (30277)
Plugin: imagery_offset_db (30277)
Plugin: mirrored_download (30197)
Plugin: reverter (30277)
Plugin: utilsplugin2 (30277)
Plugin: wikipedia (30277)

java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeLo(TimSort.java:747)
	at java.util.TimSort.mergeAt(TimSort.java:483)
	at java.util.TimSort.mergeCollapse(TimSort.java:410)
	at java.util.TimSort.sort(TimSort.java:214)
	...
Last edited 11 years ago by Don-vip (previous) (diff)

comment:11 by Don-vip, 11 years ago

We need a software change from IcedTea I think, I have requested it here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1676

comment:12 by anonymous, 11 years ago

So i have (on debian stable, would get a icedtea patch in a few month at the best) no real choice other than ignoring all crashes. 8-/

comment:13 by Don-vip, 11 years ago

If it's too frequent just don't use webstart, or install Oracle's VM instead of icedtea and you're fine :)

comment:14 by anonymous, 11 years ago

I think a try/catch around this call would guarantee that the data is not corrupted by this (and the user is not interrupted with an exception) :-)
sorry for being annoying... :-D

comment:15 by Don-vip, 11 years ago

The property has been added to icedtea in a recent commit. On josm side the proper way is to fix the comparator that's what we'll do.

in reply to:  15 comment:16 by Don-vip, 11 years ago

Resolution: fixed
Status: reopenedclosed

Replying to Don-vip:

the proper way is to fix the comparator that's what we'll do.

Spoke too fast: this one is a pure Java bug that is absolutely not JOSM's fault. As it can happen almost everywhere, we won't add try/catch blocks each time we do something, so the issue is fixed on our side.

You have the following options:

  • wait for an update of IcedTea
  • use java -jar instead of webstart
  • use Oracle VM instead of IcedTea

comment:17 by Don-vip, 10 years ago

Ticket #10272 has been marked as a duplicate of this ticket.

comment:18 by Don-vip, 10 years ago

Ticket #10273 has been marked as a duplicate of this ticket.

comment:19 by Don-vip, 10 years ago

Ticket #10274 has been marked as a duplicate of this ticket.

comment:20 by Don-vip, 10 years ago

Ticket #10308 has been marked as a duplicate of this ticket.

comment:21 by Don-vip, 5 years ago

Component: CoreCore Webstart

comment:22 by taylor.smock, 5 months ago

In 19110/josm:

See #17858, see #8888: Remove useLegacyMergeSort from josm-latest.jnlp

Setting java.util.Arrays.useLegacyMergeSort to true is probably no longer
necessary.

This does not update josm.jnlp just in case; the JNLP files may be automatically
updated (I'm not certain).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.