Error while generating the index

Hi, while generating index with 2023 I got with some maps this error. Has someone an idea what went wrong? It happens with my map of Germany and Denmark, all other maps were ok. Processing of the tiles was fine for all maps. Henning Exception in thread "main" java.lang.NegativeArraySizeException at uk.me.parabola.imgfmt.app.BufferedImgFileReader.get(BufferedImgFileReader.java:165) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:151) at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115) at uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:132)

Nobody any guesses or hints? My mkgmaps-call: mkgmap.jar --max-jobs=1 --style-file=data\style --draw-priority=24 --tdbfile --code-page=%codepage% --route --remove-short-arcs --location-autofill=bounds,is_in,nearest --index --bounds=data\bounds --ignore-maxspeeds --add-pois-to-areas --mapname=%id%000000 --overview-mapname=%id%000000 --family-name="RRK %name%" --series-name="RRK %name% %heute%" --description=RadReiseKarte --family-id=%id%00 --product-id=1 --levels=0:24,1:22,2:21,3:20,4:19,5:18,6:16 --reduce-point-density=2.6 --reduce-point-density-polygon=8 --merge-lines --generate-sea=extend-sea-sectors,close-gaps=6000 --output-dir=maps\%name% --gmapsupp TYP\%id%000000.typ %id%*.pbf In all style-files I put the mkgmap:...-rules WanMil told with r2020. It works fine now for all maps beside Germany. If I remove --location-autofil nothing changes. If I remove --index, there is no error anymore but also no index ;-) . Am 07.09.2011 09:36, schrieb Henning Scholland:
Hi, while generating index with 2023 I got with some maps this error. Has someone an idea what went wrong? It happens with my map of Germany and Denmark, all other maps were ok. Processing of the tiles was fine for all maps.
Henning
Exception in thread "main" java.lang.NegativeArraySizeException at uk.me.parabola.imgfmt.app.BufferedImgFileReader.get(BufferedImgFileReader.java:165) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:151) at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115) at uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:132) _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi again If I let mkgmap only create index, I got the following exception: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 44120, Size: 361 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145) at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115) at uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:132) parameters: mkgmap.jar --max-jobs=1 --tdbfile --code-page=%codepage% --index --mapname=%id%000000 --overview-mapname=%id%000000 --family-name="RRK %name%" --series-name="RRK %name% %heute%" --description=RadReiseKarte --family-id=%id%00 --product-id=1 --output-dir=maps\%name% --gmapsupp TYP\%id%000000.typ maps\Germany\%id%*.img Henning

Hi Henning, do you have got a completely fresh version of mkgmap? Once I had also similiar errors, they were gone with a really fresh version of the sources. I had removed my local sources completely and had downloaded the mkgmap sources again. -- Viele Gruesse Computerteddy

Am 08.09.2011 10:18, schrieb Carsten Schwede:
Hi Henning,
do you have got a completely fresh version of mkgmap? Once I had also similiar errors, they were gone with a really fresh version of the sources. I had removed my local sources completely and had downloaded the mkgmap sources again.
I use always the compiled version from mkgmap-download-page. Also other maps were fine. The Map of Germany is the biggest one with 106 tiles and about 1.37gb. Last week with 2018 (I think) everything was ok. Has someone an older versions of mkgmap before addr-Tags integration was added and could e-mail it to me? Then I could find the last working version. Henning

No guesses what could cause the following error? Would it help to upload the img-files? Am 08.09.2011 10:14, schrieb Henning Scholland:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 44120, Size: 361 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145) at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115) at uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:132)

On 12/09/11 13:01, Henning Scholland wrote:
No guesses what could cause the following error? Would it help to upload the img-files?
Am 08.09.2011 10:14, schrieb Henning Scholland:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 44120, Size: 361 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145)
That error means that mkgmap cannot understand the format of the input .img file. So probably it was written incorrectly, assuming it was created by mkgmap itself. So it would probably help to identify the particular file that causes the error and upload it and if possible, the .osm file it was created from. ..Steve

Am 12.09.2011 23:31, schrieb Steve Ratcliffe:
On 12/09/11 13:01, Henning Scholland wrote:
No guesses what could cause the following error? Would it help to upload the img-files?
Am 08.09.2011 10:14, schrieb Henning Scholland:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 44120, Size: 361 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145) That error means that mkgmap cannot understand the format of the input .img file. So probably it was written incorrectly, assuming it was created by mkgmap itself.
So it would probably help to identify the particular file that causes the error and upload it and if possible, the .osm file it was created from.
..Steve Hi Steve, Thanks for your hint. I figured out that tile number 26 causes the error (from Lübeck to north end of Sylt). If you would like to take a deeper look in the data you can find the splitted pbf and the resulting img here: http://www.aighes.de/data/tile_with_problem.7z
If I generate the index without tile 26 everything is as fine as normal. Source of the data is a planet-file updated 2011-09-12T20\:00\:00Z. If you need further information let me know. Henning Henning

Hi
look in the data you can find the splitted pbf and the resulting img here: http://www.aighes.de/data/tile_with_problem.7z
Thanks. However I get a different error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 4611728 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.net.NETFileReader.readLabels(NETFileReader.java:187) at uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:87) Also if I compile the pbf with the current version of mkgmap with minimal options, I don't get the error. Anyway I shall look into the error that I do see. ..Steve

Hi, I don't know why but I tried it again with 2028 an new data and there isn't any error any more. I tried it with default-style and my own style. Both where fine. Henning

Hi
I don't know why but I tried it again with 2028 an new data and there isn't any error any more. I tried it with default-style and my own style. Both where fine.
OK, so I can't go any further with the original problem unless it happens again in a more repeatable way. I do have a patch (attached) for the bug that I found with the file that you uploaded, which I will commit. ..Steve
participants (3)
-
Carsten Schwede
-
Henning Scholland
-
Steve Ratcliffe