Modify

Opened 12 years ago

Closed 12 years ago

#7344 closed defect (fixed)

Deleting multiple relations ends in failure

Reported by: ToeBee Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: relation, delete Cc: ToeBee

Description

Using 4877.

To reproduce:

Load attached file.

Select all the 0 member relations. (membership has nothing to do with it, this is just how I discovered it)

Click the delete button to delete selected relations

Click "Yes" repeatedly on the "You are about to delete 1 relation" warning.

The first two times, things behave correctly. Before clicking "Yes" the third time, notice that the warning message says you are about to delete a relation with a member - this is not what was selected. After this it will keep alternating between 0 member relations and 1 member relations until the 5th deletion at which point it throws an index out of bounds exception:

java.lang.IndexOutOfBoundsException: Index: 10, Size: 8
	at java.util.ArrayList.rangeCheck(ArrayList.java:571)
	at java.util.ArrayList.get(ArrayList.java:349)
	at org.openstreetmap.josm.gui.dialogs.RelationListDialog$RelationListModel.getRelation(RelationListDialog.java:590)
	at org.openstreetmap.josm.gui.dialogs.RelationListDialog$DeleteAction.actionPerformed(RelationListDialog.java:341)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)

[...]

It seems like it is not updating the list of selected relations as it deletes them so relations are pulled up into the selection list as relations above them are deleted. But it is trying to delete based on the currently selected relations, not the list of relations that was selected when the operation began.

Attachments (1)

del_relation_bug.osm (3.9 KB ) - added by ToeBee 12 years ago.
Simple data file to reproduce relation deletion bug

Download all attachments as: .zip

Change History (3)

by ToeBee, 12 years ago

Attachment: del_relation_bug.osm added

Simple data file to reproduce relation deletion bug

comment:1 by stoecker, 12 years ago

Priority: normalmajor

comment:2 by simon04, 12 years ago

Resolution: fixed
Status: newclosed

In [4885/josm]:

#fix #7344 - Deleting multiple relations ends in failure

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.