Java Exception on Greece map merging

Hello, I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo( LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>( LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo( FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo( FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo( FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo. getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs( CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October. I am splitting/compiling merging using these commands: java -jar -Xmx4096M splitter/splitter.jar --mapid=63230001 --mixed=yes src/greece-latest.osm.pbf java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --style-file=resources/styles --style=gps --make-opposite-cycleways --remove-short-arcs --location-autofill=is_in,nearest --housenumbers --bounds=../../bounds.zip --reduce-point-density=4 --reduce-point-density-polygon=8 --min-size-polygon=8 --x-split-name-index --transparent --draw-priority=25 --max-jobs=4 --index -c template.args java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --mapname=63230000 --output-dir=img/out/ --index --gmapsupp 63230001.img 63230002.img 63230003.img 63230004.img 63230005.img 63230006.img 63230007.img 63230008.img 63230009.img 63230010.img 63230011.img src/8300.TYP ... this latest command gives me the exception. I am using latest bounds.zip and sea.zip files from December 16-th and latest available splitter-r476 and mkgmap-r3726 as of today. I tried also older mkgmap-r3694 and splitter-r439 with the same result. Am I doing something wrong or is something wrong with mkgmap? Thanks Marek

Hi Marek, we think it is a problem in the Java Run Time, see also this thread: http://gis.19327.n8.nabble.com/Random-compiling-failures-tt5885477.html Please try if you can reproduce the problem after a reboot. I was once able to reproduce the problem but on the next day (after turning off my machine) it was gone. Gerd ________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Marek Greško <mgresko8@gmail.com> Gesendet: Samstag, 17. Dezember 2016 10:53:39 An: mkgmap-dev Betreff: [mkgmap-dev] Java Exception on Greece map merging Hello, I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October. I am splitting/compiling merging using these commands: java -jar -Xmx4096M splitter/splitter.jar --mapid=63230001 --mixed=yes src/greece-latest.osm.pbf java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --style-file=resources/styles --style=gps --make-opposite-cycleways --remove-short-arcs --location-autofill=is_in,nearest --housenumbers --bounds=../../bounds.zip --reduce-point-density=4 --reduce-point-density-polygon=8 --min-size-polygon=8 --x-split-name-index --transparent --draw-priority=25 --max-jobs=4 --index -c template.args java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --mapname=63230000 --output-dir=img/out/ --index --gmapsupp 63230001.img 63230002.img 63230003.img 63230004.img 63230005.img 63230006.img 63230007.img 63230008.img 63230009.img 63230010.img 63230011.img src/8300.TYP ... this latest command gives me the exception. I am using latest bounds.zip and sea.zip files from December 16-th and latest available splitter-r476 and mkgmap-r3726 as of today. I tried also older mkgmap-r3694 and splitter-r439 with the same result. Am I doing something wrong or is something wrong with mkgmap? Thanks Marek

Hello, I am able to reproduce after reboot. I agree it could be because of Java Runtime. Thanks Marek 2016-12-17 11:39 GMT+01:00 Gerd Petermann <GPetermann_muenchen@hotmail.com>:
Hi Marek,
we think it is a problem in the Java Run Time, see also this thread:
http://gis.19327.n8.nabble.com/Random-compiling-failures-tt5885477.html
Please try if you can reproduce the problem after a reboot.
I was once able to reproduce the problem but on the next day (after turning off my machine) it was gone.
Gerd
------------------------------ *Von:* mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Marek Greško <mgresko8@gmail.com> *Gesendet:* Samstag, 17. Dezember 2016 10:53:39 *An:* mkgmap-dev *Betreff:* [mkgmap-dev] Java Exception on Greece map merging
Hello,
I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLF ileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileRe ader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo. java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo. java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo. java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo( FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgs Reader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October.
I am splitting/compiling merging using these commands:
java -jar -Xmx4096M splitter/splitter.jar --mapid=63230001 --mixed=yes src/greece-latest.osm.pbf
java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --style-file=resources/styles --style=gps --make-opposite-cycleways --remove-short-arcs --location-autofill=is_in,nearest --housenumbers --bounds=../../bounds.zip --reduce-point-density=4 --reduce-point-density-polygon=8 --min-size-polygon=8 --x-split-name-index --transparent --draw-priority=25 --max-jobs=4 --index -c template.args
java -jar -Xmx4096M mkgmap/mkgmap.jar --route --code-page=65001 --lower-case --family-id=8300 '--family-name=Greece OSM' --country-name=Greece --country-abbr=GR '--description=Greece OSM' --mapname=63230000 --output-dir=img/out/ --index --gmapsupp 63230001.img 63230002.img 63230003.img 63230004.img 63230005.img 63230006.img 63230007.img 63230008.img 63230009.img 63230010.img 63230011.img src/8300.TYP
... this latest command gives me the exception.
I am using latest bounds.zip and sea.zip files from December 16-th and latest available splitter-r476 and mkgmap-r3726 as of today. I tried also older mkgmap-r3694 and splitter-r439 with the same result.
Am I doing something wrong or is something wrong with mkgmap?
Thanks
Marek
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi In addition to the previous bugs I found there is also http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6616627 which is an old bug which appears similar but was for Long.valueOf() instead of Integer.valueOf(). On the assumption that it is a JVM bug and as it is affecting a few people, we should consider a workaround. Probably poi.setZip(zips.get(new Integer(zipIndex-1))) would work. As the zipIndex values are typically small, the integer cache may be valuable in our case. So we could implement our own, but it would have to be different enough to avoid running into the same bug. We don't need negative numbers so that might be enough. The netbeans project implemented their own integer cache as their workaround. http://hg.netbeans.org/releases/rev/ff893c3cec4d ..Steve
I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October.

Hi Steve, another work around would be to use a Int2ObjectOpenHashMap from fastutil here. Gerd ________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve@parabola.me.uk> Gesendet: Samstag, 17. Dezember 2016 22:14:23 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Java Exception on Greece map merging Hi In addition to the previous bugs I found there is also http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6616627 which is an old bug which appears similar but was for Long.valueOf() instead of Integer.valueOf(). On the assumption that it is a JVM bug and as it is affecting a few people, we should consider a workaround. Probably poi.setZip(zips.get(new Integer(zipIndex-1))) would work. As the zipIndex values are typically small, the integer cache may be valuable in our case. So we could implement our own, but it would have to be different enough to avoid running into the same bug. We don't need negative numbers so that might be enough. The netbeans project implemented their own integer cache as their workaround. http://hg.netbeans.org/releases/rev/ff893c3cec4d ..Steve
I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hello, your workaround in r3733 works. Thank you very much. Marek 2016-12-18 17:01 GMT+01:00 Gerd Petermann <GPetermann_muenchen@hotmail.com>:
Hi Steve,
another work around would be to use a Int2ObjectOpenHashMap from fastutil here.
Gerd
------------------------------ *Von:* mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve@parabola.me.uk> *Gesendet:* Samstag, 17. Dezember 2016 22:14:23 *An:* Development list for mkgmap *Betreff:* Re: [mkgmap-dev] Java Exception on Greece map merging
Hi
In addition to the previous bugs I found there is also http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6616627 which is an old bug which appears similar but was for Long.valueOf() instead of Integer.valueOf().
On the assumption that it is a JVM bug and as it is affecting a few people, we should consider a workaround.
Probably poi.setZip(zips.get(new Integer(zipIndex-1)))
would work.
As the zipIndex values are typically small, the integer cache may be valuable in our case. So we could implement our own, but it would have to be different enough to avoid running into the same bug. We don't need negative numbers so that might be enough.
The netbeans project implemented their own integer cache as their workaround.
http://hg.netbeans.org/releases/rev/ff893c3cec4d
..Steve
I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo( LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>( LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs( CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Marek, thanks for the quick feedback. Gerd ________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Marek Greško <mgresko8@gmail.com> Gesendet: Montag, 19. Dezember 2016 19:54:29 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Java Exception on Greece map merging Hello, your workaround in r3733 works. Thank you very much. Marek 2016-12-18 17:01 GMT+01:00 Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>>: Hi Steve, another work around would be to use a Int2ObjectOpenHashMap from fastutil here. Gerd ________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk>> im Auftrag von Steve Ratcliffe <steve@parabola.me.uk<mailto:steve@parabola.me.uk>> Gesendet: Samstag, 17. Dezember 2016 22:14:23 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Java Exception on Greece map merging Hi In addition to the previous bugs I found there is also http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6616627 which is an old bug which appears similar but was for Long.valueOf() instead of Integer.valueOf(). On the assumption that it is a JVM bug and as it is affecting a few people, we should consider a workaround. Probably poi.setZip(zips.get(new Integer(zipIndex-1))) would work. As the zipIndex values are typically small, the integer cache may be valuable in our case. So we could implement our own, but it would have to be different enough to avoid running into the same bug. We don't need negative numbers so that might be enough. The netbeans project implemented their own integer cache as their workaround. http://hg.netbeans.org/releases/rev/ff893c3cec4d ..Steve
I am getting Java exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 265 at java.lang.Integer.valueOf(Integer.java:831) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:422) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:595) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:135) at uk.me.parabola.mkgmap.main.Main.main(Main.java:106) on map merge. I am compiling latest Greece map from Geofabrik. There was not a problem with data from October.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
Gerd Petermann
-
Marek Greško
-
Steve Ratcliffe