Hi Torsten,

I can confirm that this is a problem of the MultiPolygon code that has been changed with r1694. Attached patch fixes that.

But I am not sure in what situations the bug happens. Could you do me a favour and run mkgmap with the following log.properties file?

===
.level=SEVERE

handlers: java.util.logging.FileHandler

java.util.logging.FileHandler.level=FINE
java.util.logging.FileHandler.formatter=uk.me.parabola.log.UsefulFormatter
java.util.logging.FileHandler.limit=1000000
java.util.logging.FileHandler.count=4
java.util.logging.FileHandler.pattern=mkgmap.log
java.util.logging.FileHandler.append=false

uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation.level=FINE
===

Please run it without the --keep-going option and send me the logfile with the exception which should be mkgmap.log.0. Thanks!

WanMil


Moin,

I have a problem with mkgmap version r1699: it crashes while generating my maps.

With r1673 everything was ok.

It does not seem to be related to the style, I tried different layers of my maps
and all are crashing.

I use the following mkgmap command line and get this error message:

java -jar  -Xmx6144M ../../mkgmap-r1699/mkgmap.jar
--style-file=../../styles/09_maxspeed --remove-short-arcs=5 --transparent
--family-id=49 --country-name="Deutschland" --country-abbr="D"
--overview-name="Tempolimits" --family-name="Tempolimits"
--series-name="Tempolimits" --description="Tempolimits" --tdbfile
--draw-priority=23 --max-jobs=3 -c maplist.txt


java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.get(ArrayList.java:322)
         at uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation.processEle
(MultiPolygonRelation.java:818)
         at uk.me.parabola.mkgmap.reader.osm.xml.Osm5XmlHandler.endRelation(
mlHandler.java:620)
         at uk.me.parabola.mkgmap.reader.osm.xml.Osm5XmlHandler.endElement(O
lHandler.java:590)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.end
nt(AbstractSAXParser.java:601)
         at com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.endE
t(XIncludeHandler.java:1014)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScann
l.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScann
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.n
MLDocumentScannerImpl.java:648)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl
(XMLNSDocumentScannerImpl.java:140)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScann
l.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa
ML11Configuration.java:807)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa
ML11Configuration.java:737)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLPa
java:107)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.par
stractSAXParser.java:1205)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXPar
arse(SAXParserImpl.java:522)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
         at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5
taSource.java:84)
         at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:1
         at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56)
         at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:189)
         at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:186)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:30
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoo
utor.java:885)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
.java:907)
         at java.lang.Thread.run(Thread.java:619)
Exiting - if you want to carry on regardless, use the --keep-going option

Gruss
Torsten
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Index: src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java	(revision 1699)
+++ src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java	(working copy)
@@ -813,11 +813,14 @@
 				if (currentPolygon.outer && outmostPolygonProcessing) {
 					// this is the outmost polygon - copy its tags. They will be used
 					// later for tagging of the lines
-					assert singularOuterPolygons.size() > 0 : "The list of outmost outer polygons after cutting is empty";
-					// all cutted polygons have the same tags - get the first way to copy them 
-					Way outerWay = singularOuterPolygons.get(0);
-					for (Entry<String, String> tag : outerWay.getEntryIteratable()) {
-						outerTags.put(tag.getKey(), tag.getValue());
+
+					// all cutted polygons have the same tags - get the first way to copy them
+					if (singularOuterPolygons.isEmpty()==false) {
+						Way outerWay = singularOuterPolygons.get(0);
+						for (Entry<String, String> tag : outerWay.getEntryIteratable()) {
+							outerTags.put(tag.getKey(), tag.getValue());
+						}
+						outmostPolygonProcessing = false;
 					}
 				}
 
@@ -833,9 +836,6 @@
 					tileWayMap.put(mpWay.getId(), mpWay);
 				}
 			}
-			
-			// First polygon is the outmost polygon. This has been processed so set the flag to false
-			outmostPolygonProcessing=false;
 		}
 		
 		if (log.isLoggable(Level.WARNING) && 
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to