[OSM-dev] Stack Overflow in mkgmap

Rainer Rothkegel rainer.rothkegel at googlemail.com
Wed Mar 26 15:23:13 GMT 2008


I get a StackOverflow Exception when trying to create a Garmin map for 
India.
I downloaded the India map data via
wget 
http://www.informationfreeway.org/api/0.5/*[bbox=67.28027,5.35352,89.07715,33.39476] 
-O india-osmxapi.osm

This resulted in a 130M osm file.

Then I tried to convert it to a Garmin map file via
java -Xmx512M -jar /home/rainer/gps/osm/mkgmap/dist/mkgmap.jar 
--gmapsupp --description="OSM India Map $(date)" india-osmxapi.osm

After a few minutes of processing, I got the following stack trace:

Exception in thread "main" java.lang.StackOverflowError
        at java.util.ArrayList.toArray(ArrayList.java:306)
        at java.util.logging.Logger.getHandlers(Logger.java:1214)
        at 
java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:995)
        at java.util.logging.Logger.log(Logger.java:468)
        at java.util.logging.Logger.doLog(Logger.java:494)
        at java.util.logging.Logger.log(Logger.java:517)
        at uk.me.parabola.log.Logger.arrayFormat(Logger.java:213)
        at uk.me.parabola.log.Logger.warn(Logger.java:183)
        at uk.me.parabola.mkgmap.build.MapArea.pickArea(MapArea.java:503)
        at uk.me.parabola.mkgmap.build.MapArea.split(MapArea.java:218)
        at 
uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:111)
        at 
uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:112)
        at 
uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:112)
[last line repeated for zillions of times]


I checked out the source code and found that line 112 of 
MapSplitter.java is the following recursion:
addAreasToList(sublist, alist);

I am currently running the mkgmap in debug mode using the default 
logging properties (java 
-Dlog.config=mkgmap/dist/resources/logging.properties ...) but 
(probably  due to the high volume of data being logged) the application 
has run for more than 1 hour without terminating yet.

My question: Is this likely a data problem or a problem with mkgmap? 
(Btw. creating a Garmin map file works fine if I process only the data 
for south India.)

Thanks in advance,
Rainer





More information about the dev mailing list