Modify

Opened 16 years ago

Closed 16 years ago

#1601 closed defect (worksforme)

JOSM crashed

Reported by: anonymous Owned by: framm
Priority: major Milestone:
Component: unspecified Version:
Keywords: Cc:

Description

I have no idea what went wrong. I was just moving a node. Trace follows:

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 928
Node Kind: directory
Last Changed Author: ulfl
Last Changed Rev: 928
Last Changed Date: 2008-09-04 23:34:51 +0200 (Thu, 04 Sep 2008)

java.lang.IndexOutOfBoundsException: Index: 4, Size: 3

at java.util.ArrayList.add(Unknown Source)
at org.openstreetmap.josm.actions.mapmode.SelectAction.mouseDragged(SelectAction.java:176)
at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
at java.awt.Component.processMouseMotionEvent(Unknown Source)
at javax.swing.JComponent.processMouseMotionEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

Attachments (0)

Change History (2)

comment:1 by Henry Loenwind, 16 years ago

Sorry I'm without any kind of development environment at the moment, so this is a manual workaround patch:

In .../actions/mapmode/SelectAction.java replace line 176 with:

if (virtualWay.lowerIndex+1 > wnew.nodes.size()) {
The 2 parameter from of add() cannot be used to add an element at the end.

wnew.nodes.add(virtualNode);

} else {

wnew.nodes.add(virtualWay.lowerIndex+1, virtualNode);

}

However, this does not fix the root cause. Somehow between the MouseDown and the MouseUp the Way that was under the mouse got shorter. Hopefully the patch above will give us bug reports about virtual nodes being added at the end of ways that will help us to find the root cause...

comment:2 by anonymous, 16 years ago

Resolution: worksforme
Status: newclosed

There was a situation, that a virtualWay was still stored after releasing the mouse and clicking a new way used the old virtualWay variable. This should be fixed in newer JOSM versions, so I don't think that bug still exists.

Closing as WORKSFORME. Reopen if still existing in newer versions.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
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.