IndexOutOfBoundsException while creating MDR

I attempted to create a map of the Geofabrik extract of Europe using the --index option. (I know this may be somewhat premature, since the MDR code is still in progress.) - This map consists of 274 tiles. When I tried this, mkgmap halted with an IndexOutOfBoundsException. - The exception occurred at line 356 of LBLFileReader.java in method readPoiInfo(). This is the code that caused the exception: if (placeHeader.getNumCities() > 0xFF) cityIndex = reader.getChar(); else cityIndex = reader.get() & 0xff; poi.setCity(cities.get(cityIndex-1)); To see if I could compile the map anyway, I added try and catch statements around "poi.setCity(cities.get(cityIndex-1));", and printed the exception. I received a lot of error messages like the following: java.lang.IndexOutOfBoundsException: Index: 17906, Size: 258 java.lang.IndexOutOfBoundsException: Index: 3413, Size: 258 java.lang.IndexOutOfBoundsException: Index: 13957, Size: 258 Although the map then compiled, it still crashed Mapsource. Oh well. Any idea what is going on here? Is it too ambitious to try to create such a large map with > 256 tiles at this point? Cheers.

On 01/11/09 22:30, Clinton Gladstone wrote:
I attempted to create a map of the Geofabrik extract of Europe using the --index option. (I know this may be somewhat premature, since the MDR code is still in progress.)
- This map consists of 274 tiles.
When I tried this, mkgmap halted with an IndexOutOfBoundsException.
- The exception occurred at line 356 of LBLFileReader.java in method readPoiInfo(). This is the code that caused the exception:
Were you using --road-name-pois ? This option can produce invalid files that cause this error on being read. There maybe other ways of ending up with an invalid file too.
Although the map then compiled, it still crashed Mapsource. Oh well. Any idea what is going on here? Is it too ambitious to try to create such a large map with> 256 tiles at this point?
It should work with more than 256 tiles, but I've not yet tried. There could be some other item going over a critical limit. ..Steve

On Nov 2, 2009, at 1:06, Steve Ratcliffe wrote:
Were you using --road-name-pois ? This option can produce invalid files that cause this error on being read. There maybe other ways of ending up with an invalid file too.
Yes I was. Although the map compiles correctly with --road-name-pois set but without the --index option. I'll try it again without --road-name-pois but with --index. Thanks for your help.

On Nov 2, 2009, at 1:06, Steve Ratcliffe wrote:
On 01/11/09 22:30, Clinton Gladstone wrote:
I attempted to create a map of the Geofabrik extract of Europe using the --index option. (I know this may be somewhat premature, since the MDR code is still in progress.)
- This map consists of 274 tiles.
When I tried this, mkgmap halted with an IndexOutOfBoundsException.
- The exception occurred at line 356 of LBLFileReader.java in method readPoiInfo(). This is the code that caused the exception:
Were you using --road-name-pois ? This option can produce invalid files that cause this error on being read. There maybe other ways of ending up with an invalid file too.
I seem to have traced this down to the --add-pois-to-areas option. Any suggestions on how to figure out exactly what is going wrong here? Cheers.
participants (2)
-
Clinton Gladstone
-
Steve Ratcliffe