Error in generation gmapsupp map (overflow?)

Hi! I generate every week map from osm data in single file and elevation contour from 133 .osm files. Osm data increase in each time, elevation data in osm files is permanent. Yesterday i have error in generation gmapsupp map: --cut-- Exception in thread "main" java.lang.IllegalArgumentException at java.nio.ByteBuffer.allocate(Unknown Source) at uk.me.parabola.imgfmt.sys.Directory.sync(Directory.java:176) at uk.me.parabola.imgfmt.sys.ImgFS.sync(ImgFS.java:230) at uk.me.parabola.imgfmt.sys.ImgFS.close(ImgFS.java:240) at uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish(GmapsuppBuilder.java:119) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:413) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:127) --cut-- mkgmap commandline: http://code.google.com/p/velo100mapper/source/browse/trunk/makemap.elev where: chepetsk.org.ru.osm - osm data (124M), elev/*.osm - elevation contour in 133 osm files (1,6G) I try to delete one of any elev file - mkgmap work without error. Or I use old osm data file (2-3 month age) with less data - mkgmap work. p.s. mkgmap: 1749, 1733, 1727.

Maks Vasilev (max@stranger-team.ru) wrote:
Hi!
I generate every week map from osm data in single file and elevation contour from 133 .osm files. Osm data increase in each time, elevation data in osm files is permanent. Yesterday i have error in generation gmapsupp map:
--cut-- Exception in thread "main" java.lang.IllegalArgumentException at java.nio.ByteBuffer.allocate(Unknown Source) at uk.me.parabola.imgfmt.sys.Directory.sync(Directory.java:176) at uk.me.parabola.imgfmt.sys.ImgFS.sync(ImgFS.java:230) at uk.me.parabola.imgfmt.sys.ImgFS.close(ImgFS.java:240) at uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish(GmapsuppBuilder.java:119) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:413) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:127) --cut--
mkgmap commandline: http://code.google.com/p/velo100mapper/source/browse/trunk/makemap.elev
where: chepetsk.org.ru.osm - osm data (124M), elev/*.osm - elevation contour in 133 osm files (1,6G)
I try to delete one of any elev file - mkgmap work without error. Or I use old osm data file (2-3 month age) with less data - mkgmap work.
p.s. mkgmap: 1749, 1733, 1727.
Wild guess, but perhaps you need to split your chepetsk.org.ru.osm file into smaller tiles. -- Charlie

Hello!
I generate every week map from osm data in single file and elevation contour from 133 .osm files. Osm data increase in each time, elevation data in osm files is permanent. Yesterday i have error in generation gmapsupp map:
--cut-- Exception in thread "main" java.lang.IllegalArgumentException at java.nio.ByteBuffer.allocate(Unknown Source) at uk.me.parabola.imgfmt.sys.Directory.sync(Directory.java:176)
Thanks for the report, it is a problem I've never seen before. The failure is happening while creating a gmapsupp file. Could you tell me the size of the gmapsupp.img the last time it worked? Is it anywhere near 2G in size? The mkgmap code will not, I think, produce a gmapsupp larger than 2G, and, although this could be fixed I'm not sure that GPS devices would be able to deal with it anyway - or not all of them, I don't believe mine can even take an SD card larger than 2G. If you are not actually using the gmapsupp.img then removing the option will fix the crash. ..Steve

В сообщении от 20 декабря 2010 14:45:17 автор Steve Ratcliffe написал:
Hello!
I generate every week map from osm data in single file and elevation contour from 133 .osm files. Osm data increase in each time, elevation data in osm files is permanent. Yesterday i have error in generation gmapsupp map:
--cut-- Exception in thread "main" java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(Unknown Source) at uk.me.parabola.imgfmt.sys.Directory.sync(Directory.java:176)
Thanks for the report, it is a problem I've never seen before.
The failure is happening while creating a gmapsupp file. Could you tell me the size of the gmapsupp.img the last time it worked? Is it anywhere near 2G in size?
No, it just 60 MB in gmapsupp.img
The mkgmap code will not, I think, produce a gmapsupp larger than 2G, and, although this could be fixed I'm not sure that GPS devices would be able to deal with it anyway - or not all of them, I don't believe mine can even take an SD card larger than 2G.
If you are not actually using the gmapsupp.img then removing the option will fix the crash.
..Steve
I split osm data file 124M to 2 files 80M and 45M and have no error. If i use one datafile of 124M (+1.7G files elev) i have error, but generate gmapsupp.img only from 1 this datafile file works fine. Total size of all *.osm files (data and elev) 1,7G (1749576 byte). This produce gmapsupp.img file 60 MB. I see, that mkgmap (java process) obtains 1,9G resident memory in process.

Hi, Am 20.12.2010 12:45, schrieb Steve Ratcliffe:
The mkgmap code will not, I think, produce a gmapsupp larger than 2G, and, although this could be fixed I'm not sure that GPS devices would be able to deal with it anyway - or not all of them, I don't believe mine can even take an SD card larger than 2G.
E.g. my Garmin etrax Legend HCx supports 4 GB, after a firmware update about 1,5 years or more ago. Greetings Josef -- PGP Schlüssel: 311D1055 http://keyserver.pgp.com
participants (4)
-
charlie@cferrero.net
-
Josef Latt
-
Maks Vasilev
-
Steve Ratcliffe