[mkgmap-dev] mkgmap crashes if nodes are missing
From NopMap ekkehart at gmx.de on Thu Jun 7 16:06:05 BST 2012
I have been debugging a crash of mkgamp where it fails with the exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation$JoinedWay.<init >(MultiPolygonRelation.java:2199) at uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation.joinWays(MultiP olygonRelation.java:245) at uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation.processElements (MultiPolygonRelation.java:763) at uk.me.parabola.mkgmap.reader.osm.ElementSaver.addRelation(ElementSave r.java:166) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5XmlHandler$SaxHandler.endEle ment(Osm5XmlHandler.java:182) The reason seems to be inconsistent data: a way without the nodes it references. As mkgmap siletntly drops missing ways, but crashes on missing nodes I assume this is a bug. This can be fixed by changing Osm5XmlHandler, line 263 to if ("way".equals(type)){ el = saver.getWay(id); // remove ways without points if( el != null && ((Way)el).getPoints().isEmpty() ) el = null; } Maybe someone would like to apply this fix to make mkgmap more robust. bye Nop -- View this message in context: http://gis.19327.n5.nabble.com/mkgmap-crashes-if-nodes-are-missing-tp5711811.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
- Previous message: [mkgmap-dev] weird behavior of routing
- Next message: [mkgmap-dev] --pois-to-areas-placement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list