logo separator

[mkgmap-dev] mkgmap crashing with non-OSM data

From Patrick Simmons linuxrocks123 at netscape.net on Thu Dec 27 20:21:36 GMT 2018

Hello all,

I'm working on a project to combine OSM data with TIGER census data for better street addressing.  Mostly everything is working, but mkgmap will consistently crash with a tile created by splitter for a region in California.  I've uploaded the tile that is crashing to http://moongate.ydns.eu/tiger_versus_python/42050139_evil.osm.pbf

When I convert the tile to OSM format, open it up in Emacs, and take out all of the nodes I added (all the negative-ID ones), the entire map including this tile can be created without error.

There are other tiles in the western US that have crashed in the past, too, but, strangely, they only crash when I try to create a map for the whole country, not just the western region, and so I think the 42050139 tile is the one to look at to figure out how to fix it.

Here's the stack trace I got with mkgmap-r4259:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 31, Size: 22
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:122)
        at uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:205)
        at uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:294)
        at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:167)
        at uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onMapEnd(GmapsuppBuilder.java:164)
        at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:668)
        at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128)
        at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:143)
        at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)

The command line to reproduce should be:

java -Xmx10000M -jar mkgmap-r4259/mkgmap.jar --latin1 --index --route --location-autofill=bounds,is_in,nearest --remove-ovm-work-files --bounds=../bounds-latest.zip --generate-sea=extend-sea-sectors,multipolygon,floodblocker,close-gaps=6000 --add-pois-to-areas --process-destination --order-by-decreasing-area --process-exits --pois-to-areas-placement="entrance=main;entrance=yes;building=entrance" --check-roundabout-flares --remove-short-arcs --make-opposite-cycleways --reduce-point-density=8 --reduce-point-density-polygon=8 --merge-lines --min-size-polygon=8 --drive-on=detect,right --max-jobs=3 --check-roundabouts --housenumbers --gmapsupp 42050139_evil.osm.pbf

An IMG file for the tile will be created before the crash, as the crash happens when trying to create the gmapsupp.img file after all tiles have been processed.  Please let me know if there is anything else I can provide to assist in finding the cause of the crash.

Best regards,

MailTask: The Email Manager
GPLv3 software, beta maturity

More information about the mkgmap-dev mailing list