logo separator

[mkgmap-dev] java.lang.IndexOutOfBoundsException/java.lang.NullPointerException

From WanMil wmgcnfg at web.de on Sat Jan 21 16:16:54 GMT 2012

Hi Thorsten,

the BoundaryUtil seems to be the same problem Gerd reported yesterday. 
I'll have a look on it. Thanks for the report.

WanMil

>
> Hi,
>
> I tried to build a Map from the USA. When I try to build a complete
> map, I get an java.lang.NullPointerException:
>
> java.lang.NullPointerException
>          at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaryFi
> le(BoundaryUtil.java:169)
>          at uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadBoundaries
> (BoundaryUtil.java:215)
>          at uk.me.parabola.mkgmap.reader.osm.LocationHook.loadBoundaries(Location
> Hook.java:180)
>          at uk.me.parabola.mkgmap.reader.osm.LocationHook.assignPreprocBounds(Loc
> ationHook.java:242)
>          at uk.me.parabola.mkgmap.reader.osm.LocationHook.end(LocationHook.java:4
> 44)
>          at uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingH
> ooksChain.java:79)
>          at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinM
> apDataSource.java:68)
>          at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:144)
>          at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56)
>          at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:206)
>          at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:203)
>          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>          at java.util.concurrent.FutureTask.run(Unknown Source)
>          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>          at java.lang.Thread.run(Unknown Source)
>
> The bad thing is, that mkgmap exits with return code 0, so my
> scripts don't notify this error.
>
> I could nail it down to one tile. If I try to compile it,
> I get the following error:
>
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: -1, Size: 0                                                                                      at java.util.ArrayList.get(ArrayList.java:352)
>          at uk.me.parabola.imgfmt.app.mdr.Mdr29.preWriteImpl(Mdr29.java:62)
>          at uk.me.parabola.imgfmt.app.mdr.MdrSection.preWrite(MdrSection.java:138)
>          at uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection(MDRFile.java:379)
>          at uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections(MDRFile.java:353)
>          at uk.me.parabola.imgfmt.app.mdr.MDRFile.write(MDRFile.java:247)
>          at uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinishForDevice(MdrBuilder.java:382)
>          at uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish(GmapsuppBuilder.java:116)
>          at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:417)
>          at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
>          at uk.me.parabola.mkgmap.main.Main.main(Main.java:112)
>
> You can find the tile and my used style at:
> http://osm.thkukuk.de/tmp/test.tar.gz
>
> The bounds are the world ones from 20120113. But it doesn't matter,
> same problem even without bounds option.
>
> The command line I use is:
> mkgmap --style-file=style --country-name=usa --country-abbr=US --family-name=TK-OSM-US --area-name=US --latin1 --series-name=TK-USA-Basemap --bounds=bounds --location-autofill=bounds,nearest,is_in --add-pois-to-areas --reduce-point-density-polygon=8 --min-size-polygon=8 --make-opposite-cycleways --remove-short-arcs --adjust-turn-headings --route --net --generate-sea=extend-sea-sectors '--pois-to-areas-placement=entrance=main;entrance=yes;building=entrance;barrier=entrance' --index -c mkgmap.cfg --gmapsupp --input-file=71500850.osm.gz  --description=TK-USA-Basemap
>
> Any ideas?
>
>    Thanks,
>      Thorsten




More information about the mkgmap-dev mailing list