logo separator

[mkgmap-dev] [Patch] Error in BoundaryUtil

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Mar 11 18:45:43 GMT 2012

Hi WanMil,

hmm, we have two errors here. I can confirm that my patch doesn't solve all problems,
it just allows again to read the old *.bnd format and the new quadtree format, but mkgmap
fails to read the intermediate format produced by the preparers 1st pass.

> Date: Sun, 11 Mar 2012 18:25:21 +0100
> From: wmgcnfg at web.de
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [Patch] Error in BoundaryUtil
> 
> Hi Gerd,
> 
> without your patch preparing boundaries works.

No, it doesn't. It stops (crashes) without any error message when trying to read the *.bnd 
files produced in the 1st pass. You can verify this by looking at the header of
the new *.bnd files, they have the suffix _raw, not _quadtree.

The new patch fixes this, but not the missing error detection.

I think we need a try/catch block somewhere, either in Preparer or BoundaryPreparer.
Will you take care of this?

Gerd


> Using your patch I get the following exception.
> 
> java.util.concurrent.ExecutionException: 
> java.lang.IllegalArgumentException: Ill
> egal Capacity: -572471432
>          at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
>          at java.util.concurrent.FutureTask.get(Unknown Source)
>          at 
> uk.me.parabola.mkgmap.main.Preparer.runPreparer(Preparer.java:92)
>          at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:349)
>          at 
> uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja
> va:126)
>          at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)
> Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -572471432
>          at java.util.ArrayList.<init>(Unknown Source)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.readStreamRawF
> ormat(BoundaryUtil.java:282)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadQuadTreeFr
> omStream(BoundaryUtil.java:459)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadQuadTree(B
> oundaryUtil.java:145)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryUtil.loadQuadTree(B
> oundaryUtil.java:120)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer$QuadTreeWo
> rker.call(BoundaryPreparer.java:236)
>          at 
> uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreparer$QuadTreeWo
> rker.call(BoundaryPreparer.java:221)
>          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>          at java.util.concurrent.FutureTask.run(Unknown Source)
>          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
> Source)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> Source)
>          at java.lang.Thread.run(Unknown Source)
> 
> My mkgmap call is:
> java -jar mkgmap.jar --max-jobs=4 
> --createboundsfile=africa-boundaries.osm.gz --bounds=bounds/africa *.osm
> 
> WanMil
> 
> > Hi WanMil,
> >
> > sorry, one of my last patches for the performance branch corrupted
> > BoundaryUtil.
> > It was no longer able to read the legacy *.bnd format (also created in the
> > preparer) :-(
> >
> > Attached is the patch.
> >
> > Gerd
> >
> > http://gis.19327.n5.nabble.com/file/n5554370/BoundaryUtil.java.patch
> > BoundaryUtil.java.patch
> >
> > --
> > View this message in context: http://gis.19327.n5.nabble.com/Patch-Error-in-BoundaryUtil-tp5554370p5554370.html
> > Sent from the Mkgmap Development mailing list archive at Nabble.com.
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120311/b48c241c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BoundaryUtil_v2.patch
Type: application/x-download
Size: 5209 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120311/b48c241c/attachment.bin 


More information about the mkgmap-dev mailing list