logo separator

[mkgmap-dev] Exception in thread "main" java.lang.ArithmeticException: / by zero

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Dec 10 15:10:17 GMT 2021

Hi Felix,

There are various problems with large (> 2GB) MDR files.
I don't know if this is a special problem with the index or with one of the routines that copies the data.

I see e.g. a *_mdr.img file > 2G that looks not bad but the corresponding gmapi folder shows a file with 0 bytes.

Just starting to understand that part of the program ...

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver at gmail.com>
Gesendet: Freitag, 10. Dezember 2021 13:10
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Exception in thread "main" java.lang.ArithmeticException: / by zero

okay - I will remove the patch again. Yes I was still using it. Still I will need to wait for tomorrow to start analysing it again.

On Fri, 10 Dec 2021 at 12:57, Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>> wrote:
Hi Felix,

I think a lot of things can go wrong when sizes reach the 2G barrier. Don't use the overflow2.patch, it might be part of this problem.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>> im Auftrag von Felix Hartmann <extremecarver at gmail.com<mailto:extremecarver at gmail.com>>
Gesendet: Freitag, 10. Dezember 2021 12:35
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Exception in thread "main" java.lang.ArithmeticException: / by zero

Ah okay, it's about gmapsupp.img - right now my server is busy, but I will see if I can find an offending tile or if there are some size limits. And yeah the data again is pretty big. But RAM should not matter if there is no Index I thought.

I will check it tomorrow - at least i know a bit what to look for.

On Fri, 10 Dec 2021, 09:37 Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com><mailto:gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>> wrote:
Hi Felix,

I try to reproduce the problem with the block calculation by adding nonsense strings to Mdr 15.
Maybe this helps to find out what's wrong in a reasonable time without crashing my own disk ;)

I probably cannot reproduce real size problems because I have only 8G real memory in my PC.
Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>>> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com><mailto:gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>>
Gesendet: Freitag, 10. Dezember 2021 08:38
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Exception in thread   "main"  java.lang.ArithmeticException: / by zero

Hi Felix,

looks like another problem with the calculation of blocksizes, this time a value of 0 is returned instead of a negative one.
The error occurs while the gmapsupp.img is written, the routine that fails is called for each sub file.
Is it possible to share the input data and style?
If not I can try to add logging statements.

Gerd


________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>>> im Auftrag von Felix Hartmann <extremecarver at gmail.com<mailto:extremecarver at gmail.com><mailto:extremecarver at gmail.com<mailto:extremecarver at gmail.com>>>
Gesendet: Donnerstag, 9. Dezember 2021 16:31
An: Development list for mkgmap
Betreff: [mkgmap-dev] Exception in thread "main"        java.lang.ArithmeticException: / by zero

Any idea what is going wrong here?
I think the result is actually okay...

Command:
C:\openmtbmap\maps>start /belownormal /b /wait java -jar -XX:+AggressiveHeap -XX:StringTableSize=1000003 -Xmx43000M C:\openmtbmap\mkgmap.jar --max-jobs=12 --order-by-decreasing-area --code-page=65001 "--style-file=C:\openmtbmap\buildings_style"  --lower-case --levels="0:24, 1:23, 2:22, 3:21" --ignore-osm-bounds --ignore-turn-restrictions --merge-lines --allow-reverse-merge --transparent --draw-priority=28 --remove-ovm-work-files=true --add-pois-to-areas --simplify-polygons=23:4,22:7,21:8 --copyright-file="C:\openmtbmap\openmtbmap_svn\copyrightopm.txt" --license-file="C:\openmtbmap\openmtbmap_svn\licenseopm.txt" --add-boundary-nodes-at-admin-boundaries=2 --poi-excl-index=0x6405,0x4316,0x2f00 --ignore-fixme-values --polygon-size-limits="24:16, 23:14, 22:12, 21:11" --ignore-turn-restrictions --description=velobuildings_eu --remove-ovm-work-files= --country-abbr=eu --country-name=europe --mapname=86900310 --family-id=8690 --product-id=1 --series-name="buildings_europe_09.12.2021_UC_LOCAL
 " --keep-going --family-name="velobuildings_eu_09.12.2021_UC_LOCAL" --tdbfile --x-gmapi-minimal --gmapsupp --overview-mapname=mapsetb --area-name="europe_09.12.2021_UC_LOCAL_buildings" -c D:\openmtbmap\maps\template.europeb1 8690*.img buildeu.typ  1>NUL


Mkgmap version 4827M
Time started: Thu Dec 09 12:50:49 CET 2021
Number of MapFailedExceptions: 0
SEVERE (OverviewBuilder): Tile selection (0x4a) polygon for tile 86900000 cannot be written in level 0 resolution 21, using 19 instead

........
skipped here
.......

gmapi-minimal: Skipping file 86900308.img
gmapi-minimal: Skipping file 86900309.img
gmapi-minimal: Writing freshly compiled file C:\openmtbmap\maps\.\86900310.img
gmapi-minimal: Writing freshly compiled file C:\openmtbmap\maps\.\86900311.img
Exception in thread "main" java.lang.ArithmeticException: / by zero
        at uk.me.parabola.imgfmt.sys.FileNode.write(FileNode.java:239)
        at uk.me.parabola.imgfmt.app.BufferedImgFileWriter.sync(BufferedImgFileWriter.java:77)
        at uk.me.parabola.imgfmt.app.BufferedImgFileWriter.close(BufferedImgFileWriter.java:106)
        at uk.me.parabola.imgfmt.sys.FileNode.close(FileNode.java:107)
        at uk.me.parabola.imgfmt.sys.ImgFS.sync(ImgFS.java:253)
        at uk.me.parabola.imgfmt.sys.ImgFS.close(ImgFS.java:325)
        at uk.me.parabola.imgfmt.Utils.closeFile(Utils.java:191)
        at uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish(GmapsuppBuilder.java:187)
        at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:690)
        at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
        at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:147)
        at uk.me.parabola.mkgmap.main.Main.main(Main.java:118)

--
Felix Hartman - Openmtbmap.org & VeloMap.org

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk><mailto:mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>>
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk><mailto:mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>>
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


--
Felix Hartman - Openmtbmap.org & VeloMap.org



More information about the mkgmap-dev mailing list