logo separator

[mkgmap-dev] Improve error reporting for a corrupted sea.zip file

From paco.tyson at free.fr paco.tyson at free.fr on Wed Feb 10 16:06:59 GMT 2016

Hi all,

I found that mkgmap can display an exception with a confusing description :

Time started: Wed Feb 10 14:27:05 CET 2016
GRAVE (SeaGenerator): D:\tmp\idf-generic\14070303.osm.pbf: Cannot read index file index.txt.gz
java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:215)
	at java.util.zip.ZipFile.<init>(ZipFile.java:145)
	at java.util.zip.ZipFile.<init>(ZipFile.java:159)
	at uk.me.parabola.mkgmap.reader.osm.SeaGenerator.init(SeaGenerator.java:161)
	at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.pluginChain(OsmMapDataSource.java:209)
	at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:180)
	at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:49)
	at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:130)
	at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:154)
	at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:52)
	at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:255)
	at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:251)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

At first, I understood that the pbf file is corrupted (this exception is thrown for each .pbf file). Actually, the pbf files are OK : the error is the sea.zip file that is corrupted. I improved the error reporting in the attached patch.
I'd like to have mkgmap fail when this happens but I don't know how to do that.


Lambertus, I think you're the person providing the sea and bounds files at http://osm2.pleiades.uni-wuppertal.de/ , can you provide a checksum file for these files in order to detect bad downloads ?


Thanks,
Paco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SeaGenerator.java.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160210/94c8fabc/attachment.bin>


More information about the mkgmap-dev mailing list