Modify

Opened 8 years ago

Closed 7 years ago

#12870 closed defect (fixed)

Undo while extrude causes exception / unpredictable behaviour

Reported by: malenki Owned by: team
Priority: normal Milestone: 17.07
Component: Core Version: latest
Keywords: template_report undo extrude Cc:

Description

What steps will reproduce the problem?

  1. Create a way with two nodes
  2. Switch to extrude tool (press X)
  3. Extrude from way
  4. While extruding, press ctrl-z

What is the expected result?

Not too sure, most likely: Extruded ways disappear.
Quite sure no exception should show up. :)

What happens instead?

  1. When releasing the left mouse button an error message pops up (about this exception).
  2. When clicking the error message away and clicking somewhere in the data layer, a node remains. Obviously the "undo" command from before was also mapped to the just created way thus letting remain its first node.

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

Tested with
blank ~/.josm
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-2-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

Reproducing this issue with polygones drawn by hand or with tools (buildings_tools, "create circle"), it also seems that ctrl-z gets mapped to the last action before extruding.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-05-23 13:57:26 +0200 (Mon, 23 May 2016)
Build-Date:2016-05-24 01:33:07
Revision:10268
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10268 de) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 511 MB / 2222 MB (169 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-2-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dsun.java2d.opengl=false]
Dataset consistency test: No problems found


Last errors/warnings:
- E: java.lang.ArrayIndexOutOfBoundsException: 2
- E: java.lang.ArrayIndexOutOfBoundsException: 2

java.lang.ArrayIndexOutOfBoundsException: 2
	at org.openstreetmap.josm.data.osm.Way.getNode(Way.java:130)
	at org.openstreetmap.josm.data.osm.WaySegment.getFirstNode(WaySegment.java:38)
	at org.openstreetmap.josm.actions.mapmode.ExtrudeAction.performExtrusion(ExtrudeAction.java:635)
	at org.openstreetmap.josm.actions.mapmode.ExtrudeAction.mouseReleased(ExtrudeAction.java:541)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.Component.processMouseEvent(Component.java:6535)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6300)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	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:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	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 (3)

comment:1 by Don-vip, 7 years ago

Milestone: 17.07

comment:2 by Don-vip, 7 years ago

Keywords: extrude added

comment:3 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 12512/josm:

fix #12870 - Undo while extrude causes exception

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.