Cannot generate map with --index

Hi, For a while I've been out of the habit of adding --index to my command line because I don't use Mapsource to put maps on my devices. However, I wanted to do some experiments and find that I can't make it work with the following command line: java -Xms2g -Xmx2g -Dlog.config=svn/mkgmap/logging.properties -jar svn/mkgmap/dist/mkgmap.jar --family-id=333 --mapname=55555555 --family-name='OSM Ireland' --series-name='OSM Ireland' --description='OSM Ireland' --country-name='IRELAND' --country-abbr='IRL' --latin1 --gmapsupp --net --route --tdbfile --add-pois-to-areas --remove-short-arcs --check-roundabouts --generate-sea=multipolygon --check-roundabout-flares --index --adjust-turn-heading ireland.osm dermot.TYP Dropping --index from he command line fixes things. The error I get is: Exception in thread "main" java.lang.IllegalAccessError: tried to access method uk.me.parabola.imgfmt.app.ImgReader.position()J from class uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets at uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets.<init>(RGNFileReader.java:227) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets.<init>(RGNFileReader.java:201) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader.getOffsets(RGNFileReader.java:186) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader.pointsForSubdiv(RGNFileReader.java:71) at uk.me.parabola.imgfmt.app.map.MapReader.pointsForLevel(MapReader.java:107) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addPoints(MdrBuilder.java:170) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:113) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:374) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124) at uk.me.parabola.mkgmap.main.Main.main(Main.java:122) And my data source is the Geofabrik ireland.osm country extract. Any ideas? Dermot -- -------------------------------------- Iren sind menschlich

On 12.08.2010 20:55, Dermot McNally wrote:
Hi,
For a while I've been out of the habit of adding --index to my command line because I don't use Mapsource to put maps on my devices. However, I wanted to do some experiments and find that I can't make it work with the following command line:
java -Xms2g -Xmx2g -Dlog.config=svn/mkgmap/logging.properties -jar svn/mkgmap/dist/mkgmap.jar --family-id=333 --mapname=55555555 --family-name='OSM Ireland' --series-name='OSM Ireland' --description='OSM Ireland' --country-name='IRELAND' --country-abbr='IRL' --latin1 --gmapsupp --net --route --tdbfile --add-pois-to-areas --remove-short-arcs --check-roundabouts --generate-sea=multipolygon --check-roundabout-flares --index --adjust-turn-heading ireland.osm dermot.TYP
Dropping --index from he command line fixes things. The error I get is:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method uk.me.parabola.imgfmt.app.ImgReader.position()J from class uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets at uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets.<init>(RGNFileReader.java:227) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets.<init>(RGNFileReader.java:201) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader.getOffsets(RGNFileReader.java:186) at uk.me.parabola.imgfmt.app.trergn.RGNFileReader.pointsForSubdiv(RGNFileReader.java:71) at uk.me.parabola.imgfmt.app.map.MapReader.pointsForLevel(MapReader.java:107) at uk.me.parabola.mkgmap.combiners.MdrBuilder.addPoints(MdrBuilder.java:170) at uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:113) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:374) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124) at uk.me.parabola.mkgmap.main.Main.main(Main.java:122)
And my data source is the Geofabrik ireland.osm country extract.
Any ideas?
Dermot
I think there is some very strange (for mkgmap) data in Ireland. On my server (8GB Ram) it does compile with --index but it takes 10min (should take no more than 2 minutes compared to other countries with similar size). Might be good if that data were found...

On 12 August 2010 20:37, Felix Hartmann <extremecarver@googlemail.com> wrote:
Might be good if that data were found...
Maybe it's time to start splitting the file until I find the culprit. That's how I found a piece of broken coastline that was causing trouble before. Dermot -- -------------------------------------- Iren sind menschlich

On Sat, Aug 14, 2010 at 12:04:08AM +0100, Dermot McNally wrote:
Maybe it's time to start splitting the file until I find the culprit. That's how I found a piece of broken coastline that was causing trouble before.
Did you enable logging? My logging.properties http://www.polkupyoraily.net/osm/files/logging.properties is based on something that was mentioned here a long time ago. Get also the logging.ignore (to get rid of noise) and do java -Xmx1024m -ea -Dlog.config=logging.properties -jar mkgmap.jar ... grep -vf logging.ignore mkgmap.log.0 The warnings have always helped me. Sometimes, I have been left slightly puzzled when someone else has corrected the error after the map extract was taken. Best regards, Marko

Hi
Exception in thread "main" java.lang.IllegalAccessError: tried to access method uk.me.parabola.imgfmt.app.ImgReader.position()J from class uk.me.parabola.imgfmt.app.trergn.RGNFileReader$RgnOffsets
Any ideas?
I believe that you need to recompile mkgmap from scratch, do 'ant rebuild'. ..Steve

On 12 August 2010 22:21, Steve Ratcliffe <steve@parabola.me.uk> wrote:
I believe that you need to recompile mkgmap from scratch, do 'ant rebuild'.
I did that, to no effect. Though in the spirit of your suggestion, I could blow away my code and check out from scratch, if you think that might help. Dermot -- -------------------------------------- Iren sind menschlich

I believe that you need to recompile mkgmap from scratch, do 'ant rebuild'.
I did that, to no effect. Though in the spirit of your suggestion, I could blow away my code and check out from scratch, if you think that might help.
Dermot
Yes, that might help. The error java.lang.IllegalAccessError points to a problem with the compiled code, not with the input osm data. Possibly there are some problems with your java runtime? Regards, Johann

On 14 August 2010 09:48, Johann Gail <johann.gail@gmx.de> wrote:
Yes, that might help. The error java.lang.IllegalAccessError points to a problem with the compiled code, not with the input osm data. Possibly there are some problems with your java runtime?
I'll try it. Java is the normal MacOS system Java 6 on Snow Leopard, so you'd like to hope is wasn't to blame. Dermot -- -------------------------------------- Iren sind menschlich

OK - blowing away my checked out code and starting again fixed the problem. Thanks to everyone for the suggestions. Dermot -- -------------------------------------- Iren sind menschlich
participants (5)
-
Dermot McNally
-
Felix Hartmann
-
Johann Gail
-
Marko Mäkelä
-
Steve Ratcliffe