﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
15209	PurgeCommand.topoSort fails when purging many relations	wouterv.dplas@…	team	"==== What steps will reproduce the problem?
1. download the netherlands extract from geofabriek
2. convert it to o5m
3. run this: .\osmfilter.exe --keep=""type=multipolygon"" -o=""typemultipolygonall.osm"" .\ned.o5m
4. search for type:relation
5. purge the result

==== What is the expected result?
all the relations gone

==== What happens instead?
this error

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-07-31 01:02:55 +0200 (Mon, 31 Jul 2017)
Build-Date:2017-07-31 01:53:17
Revision:12545
Relative:URL: ^/trunk

Identification: JOSM/1.5 (12545 en_GB) Windows 8.1 64-Bit
OS Build number: Windows 8.1 Pro (9600)
Memory Usage: 6041 MB / 6041 MB (3748 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
Dataset consistency test: No problems found

Plugins:
+ ImportImagePlugin (33372)
+ OpeningHoursEditor (33185)
+ PicLayer (33385)
+ apache-commons (33517)
+ buildings_tools (33004)
+ continuosDownload (53)
+ download_along (32946)
+ ejml (32680)
+ geotools (33380)
+ jts (32699)
+ log4j (32699)
+ opendata (33438)
+ reverter (33088)
+ touchscreenhelper (32699)
+ turnlanes (33294)
+ turnrestrictions (33088)
+ utilsplugin2 (33328)
+ wikipedia (33288)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1

Last errors/warnings:
- W: Update plug-ins - org.openstreetmap.josm.plugins.PluginHandler$UpdatePluginsMessagePanel[,0,0,0x0,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
- E: org.openstreetmap.josm.plugins.PluginListParseException: Failed to create plug-in information from manifest for plug-in 'mbtiles.jar'. Cause: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in mbtiles. Cause: java.io.IOException: invalid manifest format
- E: org.openstreetmap.josm.plugins.PluginListParseException: Failed to create plug-in information from manifest for plug-in 'mbtiles.jar'. Cause: org.openstreetmap.josm.plugins.PluginException: An error occurred in plug-in mbtiles. Cause: java.io.IOException: invalid manifest format
- W: Invalid jar file ''<josm.pref>\plugins\apache-commons.jar.new'' (exists: false, canRead: false)
- W: Warning: Failed to scan file 'site-svn.openstreetmap.org-_applications_editors_josm_plugins_opendata_modules.txt' for module information. Skipping.
- E: Handled by bug report queue: java.lang.AssertionError: topo sort algorithm failed


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (20) of main
java.lang.AssertionError: topo sort algorithm failed
	at org.openstreetmap.josm.command.PurgeCommand.topoSort(PurgeCommand.java:270)
	at org.openstreetmap.josm.command.PurgeCommand.init(PurgeCommand.java:85)
	at org.openstreetmap.josm.command.PurgeCommand.<init>(PurgeCommand.java:57)
	at org.openstreetmap.josm.actions.PurgeAction.getPurgeCommand(PurgeAction.java:246)
	at org.openstreetmap.josm.actions.PurgeAction.actionPerformed(PurgeAction.java:113)
	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.SwingUtilities.processKeyBindings(Unknown Source)
	at javax.swing.UIManager$2.postProcessKeyEvent(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)
}}}
"	defect	new	normal		Core			template_report purge relation sort	
