Modify

Opened 4 weeks ago

Last modified 3 weeks ago

#15361 new defect

IAE: Comparison method violates its general contract! (SelectionListDialog.sort)

Reported by: maxerickson@… Owned by: team
Priority: normal Milestone: 17.10
Component: Core Version:
Keywords: template_report upload sort selection Cc:

Description

What steps will reproduce the problem?

  1. Tried to upload a large selection (~5000 objects) to split an import into coherent changesets.

What is the expected result?

What happens instead?

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

Obviously the workaround of "Don't do that" is easy. It would be nice if there were some support for dividing large numbers of changes by area instead of what seems to happen sometimes, where nodes are uploaded before ways.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-09-02 14:47:18 +0200 (Sat, 02 Sep 2017)
Build-Date:2017-09-02 20:53:16
Revision:12712
Relative:URL: ^/trunk

Identification: JOSM/1.5 (12712 en) Linux Arch Linux
Memory Usage: 502 MB / 502 MB (204 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, OpenJDK Server VM
Screen: :0.0 1280x800
Maximum Screen Size: 1280x800
VM arguments: [-Djosm.home=~/.josm-bulk]
Dataset consistency test: No problems found

Plugins:
+ apache-commons (33517)
+ buildings_tools (33004)
+ ejml (32680)
+ geojson (55)
+ geotools (33380)
+ jts (32699)
+ measurement (33088)
+ opendata (33553)
+ reverter (33572)
+ todo (30302)
+ undelete (33480)
+ utilsplugin2 (33579)
+ wikipedia (33626)

Tagging presets:
+ ${HOME}/josm/my.presets.xml

Map paint styles:
+ ${HOME}/josm/Style.BuildingYes.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1

Last errors/warnings:
- W: Invalid jar file ''<josm.pref>/plugins/geojson.jar.new'' (exists: false, canRead: false)
- E: Failed to locate image 'tiger.png'
- W: Mappaint style "standard" (My warning style) icon "tiger.png" not found.
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.io.UploadSelectionDialog$ContinueAction@2a6b87
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.io.UploadSelectionDialog$CancelAction@18c4bf6
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction@17644e
- E: Handled by bug report queue: java.lang.IllegalArgumentException: Comparison method violates its general contract!
- E: Handled by bug report queue: java.lang.IllegalArgumentException: Comparison method violates its general contract!


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (16) of main
java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeLo(TimSort.java:777)
	at java.util.TimSort.mergeAt(TimSort.java:514)
	at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
	at java.util.TimSort.sort(TimSort.java:254)
	at java.util.Arrays.sort(Arrays.java:1512)
	at java.util.ArrayList.sort(ArrayList.java:1454)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.sort(SelectionListDialog.java:669)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.setJOSMSelection(SelectionListDialog.java:611)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.selectionChanged(SelectionListDialog.java:695)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager$OldListenerInfo.fire(SelectionEventManager.java:57)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager.fireEvent(SelectionEventManager.java:203)
	at org.openstreetmap.josm.data.osm.event.SelectionEventManager.lambda$selectionChanged$0(SelectionEventManager.java:198)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1671)
	at java.awt.Component.setVisible(Component.java:1623)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doBeginTask$3(PleaseWaitProgressMonitor.java:256)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doInEDT$0(PleaseWaitProgressMonitor.java:114)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (0)

Change History (12)

comment:1 Changed 4 weeks ago by Don-vip

Summary: Error during "Upload Selection"IAE: Comparison method violates its general contract!

comment:2 Changed 4 weeks ago by maxerickson@…

I didn't carefully read the exceptions, but I had more errors later, doing similar editing, without using upload selection.

It may be related to the geojson plugin.

comment:3 Changed 4 weeks ago by Don-vip

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

comment:4 in reply to:  2 Changed 4 weeks ago by Don-vip

Replying to maxerickson@…:

It may be related to the geojson plugin.

No, this is a pure core problem. Can you please tell me the values you have for the following advanced preferences:
selection.fast_sort_above
selection.sort_relations_before_ways

comment:5 Changed 4 weeks ago by Don-vip

Also, if you're sure about the number of selected objects? Especially, was it lower or higher than the value of selection.fast_sort_above (default to 10.000)

comment:6 Changed 4 weeks ago by Don-vip

Keywords: upload added
Milestone: 17.09

comment:7 Changed 4 weeks ago by Don-vip

Keywords: sort added

comment:8 Changed 4 weeks ago by Don-vip

Keywords: selection added
Summary: IAE: Comparison method violates its general contract!IAE: Comparison method violates its general contract! (SelectionListDialog.sort)

comment:9 Changed 4 weeks ago by maxerickson@…

selection.fast_sort_above=10000
selection.sort_relations_before_ways=true

I setup a second profile for bulk edits, using a .desktop file to switch the dir:

[Desktop Entry]
Version=1.0
Type=Application
Comment=A second JOSM profile.
Terminal=false
Categories=Applications;Graphics
Name=JOSM Large Edits
Exec=java -Djosm.home=~/.josm-bulk -jar /usr/share/java/josm/josm.jar
Encoding=UTF-8

I didn't think real hard about whether it was correct, it worked so I moved on. I'm pretty sure the selection was roughly 5000, I think it was this changeset: http://www.openstreetmap.org/changeset/52363106 (based both on the report time and what I recall).

comment:10 Changed 4 weeks ago by maxerickson@…

I'm sure I selected more than 10,000 elements during the session though.

comment:11 Changed 3 weeks ago by Don-vip

In 12909/josm:

see #15361 - add more debug info + update licence information

comment:12 Changed 3 weeks ago by Don-vip

Milestone: 17.0917.10

It's quite difficult to analyze. If you manage to reproduce it with r12909+, can you please:

  • post your new bug report information
  • attach a session export
  • link to the changeset

Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to maxerickson@gmail.com
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.