﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13827	Exporting geojson crashes josm	james2432	team	"==== What steps will reproduce the problem?
1. Open 300mb osm file
2. Save as geojson


==== What is the expected result?
It saves.

==== What happens instead?
Error message and 0byte file is written

==== 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: 2016-10-18 20:32:20 +0200 (Tue, 18 Oct 2016)
Build-Date:2016-10-19 01:34:39
Revision:11146
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11146 en) Windows 10 64-Bit
Memory Usage: 4126 MB / 8889 MB (1749 MB allocated, but free)
Java version: 1.8.0_102-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050, \Display1 1680x1050
Maximum Screen Size: 1680x1050
Dataset consistency test: No problems found

Plugins:
+ ejml (32680)
+ geojson (43)
+ geotools (32813)
+ jts (32699)


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (20) of main
org.openstreetmap.josm.data.osm.MultipolygonBuilder$JoinedPolygonCreationException: Each node must connect exactly 2 ways
	at org.openstreetmap.josm.data.osm.MultipolygonBuilder.joinWays(MultipolygonBuilder.java:300)
	at org.openstreetmap.josm.data.osm.MultipolygonBuilder.joinWays(MultipolygonBuilder.java:236)
	at org.openstreetmap.josm.io.GeoJSONWriter$GeometryPrimitiveVisitor.visit(GeoJSONWriter.java:122)
	at org.openstreetmap.josm.data.osm.Relation.accept(Relation.java:179)
	at org.openstreetmap.josm.io.GeoJSONWriter.appendPrimitive(GeoJSONWriter.java:172)
	at org.openstreetmap.josm.io.GeoJSONWriter.lambda$appendLayerFeatures$0(GeoJSONWriter.java:206)
	at java.lang.Iterable.forEach(Unknown Source)
	at org.openstreetmap.josm.io.GeoJSONWriter.appendLayerFeatures(GeoJSONWriter.java:206)
	at org.openstreetmap.josm.io.GeoJSONWriter.write(GeoJSONWriter.java:81)
	at org.openstreetmap.josm.io.GeoJSONWriter.write(GeoJSONWriter.java:63)
	at org.openstreetmap.josm.io.GeoJSONExporter.exportData(GeoJSONExporter.java:37)
	at org.openstreetmap.josm.actions.SaveActionBase.doInternalSave(SaveActionBase.java:97)
	at org.openstreetmap.josm.actions.SaveActionBase.doSave(SaveActionBase.java:69)
	at org.openstreetmap.josm.gui.layer.Layer$LayerSaveAsAction.actionPerformed(Layer.java:530)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(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.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)
	Suppressed: javax.json.stream.JsonGenerationException: Generating incomplete JSON
		at org.glassfish.json.JsonGeneratorImpl.close(JsonGeneratorImpl.java:509)
		at org.glassfish.json.JsonPrettyGeneratorImpl.close(JsonPrettyGeneratorImpl.java:53)
		at org.glassfish.json.JsonWriterImpl.close(JsonWriterImpl.java:150)
		at org.openstreetmap.josm.io.GeoJSONWriter.write(GeoJSONWriter.java:84)
		... 44 more
}}}
"	defect	closed	normal	16.10	Core		fixed	template_report	
