logo separator

[mkgmap-dev] IndexOutOfBoundsException

From tomtom9309 tomtom9309 at gmx.de on Tue Aug 8 12:39:38 BST 2023

Hi all,

i am trying to import an osm europe map into Garmins Basecamp.

I downloaded the europe-latest.osm.pbf from Geofabrik. Then i used the
splitter with the following command.

``` java -Xmx20g -jar splitter-r653/splitter.jar --output=o5m
--max-areas=4096 europe-latest.osm.pbf ```

It finished after writing a series of 2105 .o5m files. By creating the
gmapi directory with the following command, i got an Index Out of Bounds
Exception.

``` java -Xmx20g -jar mkgmap-r4910/mkgmap.jar --index --improve-overview
--gmapi -c template.args ```

Here the Stack trace:

````

Mkgmap version 4910
Time started: Tue Aug 08 12:39:45 CEST 2023
WARNING (global): Setting max-jobs to 20
SEVERE (global): Unexpected error
java.lang.IndexOutOfBoundsException
         at
java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:375)
         at
java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:361)
         at
uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinHandler.readFile(O5mBinHandler.java:148)
         at
uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinHandler.parse(O5mBinHandler.java:116)
         at
uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.parse(OsmMapDataSource.java:167)
         at
uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:142)
         at
uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:165)
         at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:58)
         at
uk.me.parabola.mkgmap.main.Main.lambda$processFilename$1(Main.java:291)
         at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
         at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:513)
         at
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
         at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:147)
         at uk.me.parabola.mkgmap.main.Main.main(Main.java:118)
SEVERE (global): Exiting due to unexpected error
Number of ExitExceptions: 1
Time finished: Tue Aug 08 12:39:47 CEST 2023
Total time taken: 1 second

```

I assume the problem occures because of the huge template.args file
(~6000 lines), but i'm not that much into java to deterrmine the exact
cause. Any ideas?

Cheers,

Thomas




More information about the mkgmap-dev mailing list