Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10272 closed defect (duplicate)

IAE "Comparison method violates its general contract" in bug report handler

Reported by: map-dude Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc: stoecker

Description

What steps will reproduce the problem?

  1. elongate an already marked highway
  2. delete attribute "surface:unpaved"
  3. bang

What is the expected result?
no crash

What happens instead?
crash

Please provide any additional information below. Attach a screenshot if
possible.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-07-03 22:03:52
Last Changed Author: Don-vip
Revision: 7287
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-07-04 00:00:19 +0200 (Fri, 04 Jul 2014)
Last Changed Rev: 7287

Identification: JOSM/1.5 (7287 en) Linux openSUSE 12.3 (x86_64)
Memory Usage: 363 MB / 1778 MB (209 MB allocated, but free)
Java version: 1.7.0_51, 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]
Dataset consistency test: No problems found

Plugin: buildings_tools (30485)
Plugin: geochat (30416)

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.getFirstComponent(SortingFocusTraversalPolicy.java:435)
	at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusTraversalPolicy.java:166)
	at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(SortingFocusTraversalPolicy.java:515)
	at java.awt.FocusTraversalPolicy.getInitialComponent(FocusTraversalPolicy.java:169)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:380)
	at java.awt.Component.dispatchEventImpl(Component.java:4731)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	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.SequencedEvent.dispatch(SequencedEvent.java:128)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	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)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
	at java.awt.Dialog.show(Dialog.java:1082)
	at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:870)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)
	at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)
	at org.openstreetmap.josm.tools.BugReportExceptionHandler.askForBugReport(BugReportExceptionHandler.java:193)
	at org.openstreetmap.josm.tools.BugReportExceptionHandler.access$200(BugReportExceptionHandler.java:39)
	at org.openstreetmap.josm.tools.BugReportExceptionHandler$BugReporterThread$1.run(BugReportExceptionHandler.java:85)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Attachments (0)

Change History (14)

comment:1 by Don-vip, 10 years ago

Summary: crash during normal workIAE "Comparison method violates its general contract" in bug report handler

comment:2 by Don-vip, 10 years ago

Cc: stoecker added

We currently don't detect icedtea-web package version on other systems than Debian/Ubuntu.

Dirk, could you please tell me if the current method:
https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java#L180

works also for OpenSUSE or if we need to make some changes? I'd like to have the exact version in the status report for this system as well, as I suspect an IcedTea bug here.

Last edited 10 years ago by Don-vip (previous) (diff)

comment:3 by Don-vip, 10 years ago

Resolution: duplicate
Status: newclosed

Closed as duplicate of #8888.
Yes it's the same problem as in #8888.

It looks like OpenSUSE still uses version 1.4.2 of IcedTea-Web, while the bug I have reported has only been fixed in version 1.5, released in April.

You have the following options:

  • wait for a software update of IcedTea-Web in OpenSUSE distribution
  • use java -jar instead of webstart
  • use Oracle VM instead of IcedTea

Still, I'd like to display package version in our status report, but I'm not familiar with this distrib.

Last edited 10 years ago by Don-vip (previous) (diff)

comment:4 by stoecker, 10 years ago

Using dpkg wont work. You need to use rpm.

rpm -q -a |grep "^java-"

results in

java-1_7_0-openjdk-devel-1.7.0.6-24.13.5.x86_64
java-1_7_0-openjdk-1.7.0.6-24.13.5.x86_64
java-1_7_0-openjdk-headless-1.7.0.6-24.13.5.x86_64

(the grep can be done in Java directly I think :-) and the info request for the middle one

rpm -q -i java-1_7_0-openjdk

in

Name        : java-1_7_0-openjdk
Version     : 1.7.0.6
Release     : 24.13.5
Architecture: x86_64
Install Date: Mi 18 Jun 2014 12:19:51 CEST
Group       : Development/Languages/Java
Size        : 517312
License     : GPL-2.0-with-classpath-exception
Signature   : RSA/SHA256, Fr 31 Jan 2014 21:08:24 CET, Key ID b88b2fd43dbdc284
Source RPM  : java-1_7_0-openjdk-1.7.0.6-24.13.5.src.rpm
Build Date  : Mi 22 Jan 2014 18:15:30 CET
Build Host  : cloud106
Relocations : (not relocatable)
Packager    : http://bugs.opensuse.org
Vendor      : openSUSE
URL         : http://icedtea.classpath.org
Summary     : Java runtime environment based on OpenJDK 7 and IcedTea 7
Description :
This Java 7 compatible Java Runtime Environment is based on OpenJDK 7
and IcedTea 7.

It contains a Java virtual machine, runtime class libraries, and an
Java application launcher that are necessary to run programs written in
the Java progamming language. It is not a development environment and
does not contain development tools such as compilers and debuggers. For
development tools, see the java-1_7_0-openjdk-devel package.
Distribution: openSUSE 13.1

Is it that what you search? Should work for any rpm based system.

in reply to:  4 comment:5 by Don-vip, 10 years ago

Replying to stoecker:

Is it that what you search? Should work for any rpm based system.

Thanks. This is the package for Java iself, but I think there's also a separate package named "icedtea-web" with version 1.4.2, can you check?

comment:6 by stoecker, 10 years ago

Yes, even easier to find, as the name has no version included.

stoecker@mumm:~> rpm -q -a |grep icedt
icedtea-web-1.4.2-4.1.x86_64
stoecker@mumm:~> rpm -q -i icedtea-web
Name        : icedtea-web
Version     : 1.4.2
Release     : 4.1
Architecture: x86_64
Install Date: So 16 Mär 2014 13:32:05 CET
Group       : Development/Languages/Java
Size        : 1198080
License     : GPL-2.0-with-classpath-exception
Signature   : RSA/SHA256, Fr 28 Feb 2014 11:58:22 CET, Key ID b88b2fd43dbdc284
Source RPM  : icedtea-web-1.4.2-4.1.src.rpm
Build Date  : Di 18 Feb 2014 18:00:42 CET
Build Host  : build10
Relocations : (not relocatable)
Packager    : http://bugs.opensuse.org
Vendor      : openSUSE
URL         : http://icedtea.classpath.org
Summary     : Java Web Start and plugin implementation
Description :
The IcedTea-Web project provides a Free Software web browser plugin running
applets written in the Java programming language and an implementation of Java
Web Start, originally based on the NetX project.
Distribution: openSUSE 13.1

Or maybe that's enough:
rpm -q --qf %{VERSION} icedtea-web
leads to
1.4.2

comment:7 by Don-vip, 10 years ago

Great, thanks :)

comment:8 by Don-vip, 10 years ago

Two last things:

  • what's the output of lsb_release -i -s ?
  • from Java, what's the output of:
    public class Test {
        public static void main(String[] args) {
            System.out.println(System.getProperty("java.home"));
        }
    }
    

comment:9 by stoecker, 10 years ago

When package lsb-release is installed:

>lsb_release -i -s
openSUSE project

But you can't assume it is. That's why there is already parsing of /etc/os-release (since openSUSE 12.1) or /etc/SuSE-release (for a long time).

> cat /etc/os-release
NAME=openSUSE
VERSION="13.1 (Bottle)"
VERSION_ID="13.1"
PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"
>cat /etc/SuSE-release
openSUSE 13.1 (x86_64)
VERSION = 13.1
CODENAME = Bottle
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead

Test.java: /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre on my 64 bit system.

comment:10 by stoecker, 10 years ago

Instead of too specific code it would be better to make it more generic. I.e. if there is "/bin/rpm" call it with the package names, otherwise call dpkg with the expected package names. The package names can be guessed from the java version, simply try all possibilities one after another, like we do in buildOsDescription(). There shouldn't be a isDebianOrUbuntu() function.

comment:11 by Don-vip, 10 years ago

Agreed, I'm on it :)

comment:12 by Don-vip, 10 years ago

In 7314/josm:

see #10272 - refactor Linux package info retrieval to work on more distributions than Debian/Ubuntu. Only relies on presence of dpkg-query or rpm instead of distribution name

comment:13 by Don-vip, 10 years ago

Done :) Can you check if it works as expected?

comment:14 by stoecker, 10 years ago

In 7318/josm:

see #10272 - improve version checks for RPM based distros

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.