Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#19485 closed defect (fixed)

Crash while combining two opposing roads

Reported by: maarten Owned by: team
Priority: critical Milestone: 20.07
Component: Core Version: latest
Keywords: regression Cc: simon04

Description

What steps will reproduce the problem?

  1. make a way segment and add any highway tag and oneway=yes
  2. connect to this a second way segment, also with a highway tag where the direction is opposite of the first way
  3. combine both ways (C shortcut key)

What is the expected result?

Both roads should be combine to one where the oneway direction is leading

What happens instead?

Java exception, see below

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-06-30 19:13:42 +0200 (Tue, 30 Jun 2020)
Build-Date:2020-07-01 01:30:51
Revision:16731
Relative:URL: ^/trunk

Identification: JOSM/1.5 (16731 en_GB) Windows 7 64-Bit
OS Build number: Windows 7 Ultimate (7601)
Memory Usage: 905 MB / 1820 MB (530 MB allocated, but free)
Java version: 1.8.0_251-b08, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1200 (scaling 1.0x1.0), \Display1 1920x1200 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1200
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-16a815c3, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Djnlpx.splashport=63373, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found

Plugins:
+ ImportImagePlugin (35248)
+ apache-commons (35362)
+ ejml (35313)
+ ext_tools (35499)
+ geotools (35169)
+ jaxb (35092)
+ jts (35122)
+ log4j (35092)
+ measurement (35405)
+ opendata (35405)
+ photo_geotagging (35499)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35499)
+ turnlanes (35405)
+ undelete (35499)
+ utilsplugin2 (35487)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1

Last errors/warnings:
- W: Missing plugin main version in plugin annotation-tester
- W: Missing plugin main version in plugin nearclick
- W: Missing plugin main version in plugin osmarender
- W: Missing plugin main version in plugin plastic_laf
- E: Handled by bug report queue: java.lang.UnsupportedOperationException


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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (49) of javawsApplicationThreadGroup
java.lang.UnsupportedOperationException
	at java.util.Collections$UnmodifiableList.set(Unknown Source)
	at java.util.Collections.swap(Unknown Source)
	at java.util.Collections.reverse(Unknown Source)
	at org.openstreetmap.josm.actions.CombineWayAction.combineWaysWorker(CombineWayAction.java:160)
	at org.openstreetmap.josm.actions.CombineWayAction.actionPerformed(CombineWayAction.java:300)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Change History (13)

comment:1 by Klumbumbus, 5 years ago

Keywords: regression added
Priority: majorcritical

To reproduce you need to select the non oneway first and the oneway second.

comment:2 by Klumbumbus, 5 years ago

Cc: simon04 added

regression of r16628 or r16438?

by skyper, 5 years ago

Attachment: josm_19485_example.osm added

example file

comment:3 by skyper, 5 years ago

Does not happen with r16613.

USER@BOX:~$ java -Xmx500m -Djosm.home=/tmp/.josm_test -jar Downloads/JOSM/josm-snapshot-16613.jar Downloads/josm_19485_example.osm 
Unable to set SPI locale provider: null
Unable to set SPI locale provider: null
2020-07-04 13:15:25.573 INFO: Log level is at INFO (INFO, 800)
2020-07-04 13:15:33.648 INFO: Obtained 68 Tag2Link rules from META-INF/resources/webjars/tag2link/2020.5.16/index.json
2020-07-04 13:15:35.354 INFO: GET https://josm.openstreetmap.de/wiki/StartupPage -> HTTP/1.1 200 (2.3 s)
2020-07-04 13:15:44.512 INFO: Changeset updater active (checks every 60 minutes if open changesets have been closed)
2020-07-04 13:15:44.784 INFO: Open file: ~/Downloads/josm_19485_example.osm (4008 bytes)
2020-07-04 13:15:44.894 INFO: Open file: ~/Downloads/josm_19485_example.osm (4008 bytes) completed in 109 ms
2020-07-04 13:15:46.975 INFO: Switching map mode from (none) to SelectAction
2020-07-04 13:16:06.993 INFO: Changeset updater inactive

Can reproduce with r16645. I noticed another problem, see attached example file josm_19485_example.osm.
With the real data example (lowest) the exception does not happen but JOSM offers to change the value of oneway to -1 instead of changing the direction of the way without oneway=*.

USER@BOX:~$ java -Xmx500m -Djosm.home=/tmp/.josm_test -jar Downloads/JOSM/josm-snapshot-16645.jar Downloads/josm_19485_example.osm 
Unable to set SPI locale provider: null
Unable to set SPI locale provider: null
2020-07-04 13:16:47.584 INFO: Log level is at INFO (INFO, 800)
2020-07-04 13:16:56.348 INFO: Obtained 68 Tag2Link rules from META-INF/resources/webjars/tag2link/2020.5.16/index.json
2020-07-04 13:16:58.359 INFO: GET https://josm.openstreetmap.de/wiki/StartupPage -> HTTP/1.1 200 (2.5 s)
2020-07-04 13:17:06.905 INFO: Changeset updater active (checks every 60 minutes if open changesets have been closed)
2020-07-04 13:17:06.967 INFO: Open file: ~/Downloads/josm_19485_example.osm (4008 bytes)
2020-07-04 13:17:07.063 INFO: Open file: ~/Downloads/josm_19485_example.osm (4008 bytes) completed in 96 ms
2020-07-04 13:17:09.290 INFO: Switching map mode from (none) to SelectAction
2020-07-04 13:17:16.193 SEVERE: Handled by bug report queue: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
	at java.base/java.util.Collections$UnmodifiableList.set(Collections.java:1312)
	at java.base/java.util.Collections.swap(Collections.java:501)
	at java.base/java.util.Collections.reverse(Collections.java:382)
	at org.openstreetmap.josm.actions.CombineWayAction.combineWaysWorker(CombineWayAction.java:160)
	at org.openstreetmap.josm.actions.CombineWayAction.actionPerformed(CombineWayAction.java:300)
	at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
	at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2900)
	at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:311)
	at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:266)
	at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2993)
	at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2985)
	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2862)
	at java.desktop/java.awt.Component.processEvent(Component.java:6408)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5007)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:870)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1139)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1009)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:835)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4888)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4839)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Last edited 5 years ago by skyper (previous) (diff)

comment:4 by Klumbumbus, 5 years ago

Milestone: 20.07

in reply to:  3 ; comment:5 by Klumbumbus, 5 years ago

Replying to skyper:

With the real data example (lowest) the exception does not happen but JOSM offers to change the value of oneway to -1 instead of changing the direction of the way without oneway=*.

That happend in earlier versions too in case you selected the left way first.

comment:6 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 16732/josm:

fix #19485 - UnsupportedOperationException in CombineWayAction

in reply to:  5 comment:7 by skyper, 5 years ago

Replying to Klumbumbus:

Replying to skyper:

With the real data example (lowest) the exception does not happen but JOSM offers to change the value of oneway to -1 instead of changing the direction of the way without oneway=*.

That happened in earlier versions too in case you selected the left way first.

I've created #19498.

comment:8 by Klumbumbus, 5 years ago

Milestone: 20.0720.06

comment:9 by stoecker, 5 years ago

Milestone: 20.0620.07

No hotfix.

comment:10 by maarten, 5 years ago

I just had the same error with an incline tag. Is that also fixed with this change?

Interestingly: the incline was 0% but when I reversed the way, it wanted to make the incline -0%. Very little intelligence in that reversal :D

Last edited 5 years ago by maarten (previous) (diff)

in reply to:  10 comment:11 by Klumbumbus, 5 years ago

Replying to maarten:

I just had the same error with an incline tag. Is that also fixed with this change?

Yes.

Interestingly: the incline was 0% but when I reversed the way, it wanted to make the incline -0%.

Separate ticket --> #19508

comment:12 by GerdP, 5 years ago

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

Add Comment


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