logo separator

[mkgmap-dev] How to solve/debug weird problem

From Johannes Formann johannes at formann.de on Thu Jan 20 11:01:39 GMT 2011

Hello Marko,

Marko Mäkelä <marko.makela at iki.fi> wrote:
> while I cannot help with the actual bug, I can give you some advice to 
> narrow it down. Once you have a minimal test case, your bug should be 
> fixable.

Thanks for your help.

> On Tue, Jan 18, 2011 at 09:52:13PM +0100, Johannes Formann wrote:
> >rerun with a reduced option set (an the debug-patch still active):
> >    [apply] Executing 'java' with arguments:
> >'-Xms256m'
> >'-Xms256m'
> >'-ea'
> >'-jar'
> >'mkgmap.jar'
> >'--max-jobs=1'
> >'--style-file=radkarte'
> 
> Does the problem disappear if you remove --style-file (i.e., use the 
> default style)?

A run with the same options, except the "--style-file" options results again in a exception:
   [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.63765&mlon=9.67061&zoom=17 (reduce the density of points,
length of lines, etc.)
   [apply] java.lang.AssertionError: deltaLong = 36103
   [apply]      at uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)
   [apply]      at uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:128)
   [apply]      at uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.java:176)
   [apply]      at uk.me.parabola.imgfmt.app.trergn.LinePreparer.<init>(LinePreparer.java:62)
   [apply]      at uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
   [apply]      at uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
   [apply]      at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
   [apply]      at
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder.java:1044)
   [apply]      at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]      at uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
   [apply]      at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]      at
uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFilter.java:60)
   [apply]      at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]      at
uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChain.java:75)
   [apply]      at uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
   [apply]      at uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:649)
   [apply]      at uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
   [apply]      at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
   [apply]      at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
   [apply]      at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
   [apply]      at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
   [apply]      at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
   [apply]      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   [apply]      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   [apply]      at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   [apply]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   [apply]      at java.lang.Thread.run(Thread.java:662)
   [apply] Exiting - if you want to carry on regardless, use the --keep-going option


> >'--overview-mapnumber=59420000'
> >'--overview-mapname=59420000'
> >'--series-name=OSM_Radkarte'
> >'--product-id=1'
> >'--family-id=5942'
> >'--family-name=OSM Radkarte 18.01.2011'
> >'--country-name=Deutschland'
> >'--country-abbr=DE'
> 
> My educated guess is that these should not matter at all (please confirm 
> by trying to removing these).

With the style enabled again, without those options again an exception:
    [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.63765&mlon=9.72279&zoom=17 (reduce the density of points,
length of lines, etc.)
    [apply] java.lang.AssertionError: deltaLong = 36103
    [apply]     at uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)
    [apply]     at uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:128)
    [apply]     at uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.java:176)
    [apply]     at uk.me.parabola.imgfmt.app.trergn.LinePreparer.<init>(LinePreparer.java:62)
    [apply]     at uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
    [apply]     at uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
    [apply]     at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
    [apply]     at
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder.java:1044)
    [apply]     at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
    [apply]     at uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
    [apply]     at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
    [apply]     at
uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFilter.java:60)
    [apply]     at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
    [apply]     at
uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChain.java:75)
    [apply]     at uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
    [apply]     at uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:649)
    [apply]     at uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
    [apply]     at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
    [apply]     at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
    [apply]     at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
    [apply]     at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
    [apply]     at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
    [apply]     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    [apply]     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    [apply]     at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    [apply]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    [apply]     at java.lang.Thread.run(Thread.java:662)
    [apply] Exiting - if you want to carry on regardless, use the --keep-going option



> >'--latin1'
> >'--code-page=1252'
> >'--add-pois-to-areas'
> >'--adjust-turn-headings'
> >'--drive-on-right'
> >'--check-roundabouts'
> >'--remove-short-arcs=3.3''--net''--route'
> >'--gmapsupp''--tdbfile''--index'
> >'M0001736.TYP''-c''/home/osm/build/template.args'
> 
> What is in template.args? Any options before the file name 
> 59420059.osm.gz?

Don't know what matters, but here is the beginnig till "59420059.osm.gz
#
# This file can be given to mkgmap using the -c option
# Please edit it first to add a description of each map.
#

# You can set the family id for the map
# family-id: 980
# product-id: 1

# Following is a list of map tiles.  Add a suitable description
# for each one.

mapname: 59420001
description: DE-Essen
input-file: 59420001.osm.gz

mapname: 59420002
description: DE-Goslar
input-file: 59420002.osm.gz

mapname: 59420003
description: DE-Giessen
input-file: 59420003.osm.gz

mapname: 59420004
description: DE-Gorlitz
input-file: 59420004.osm.gz

mapname: 59420005
description: DE-Bochum
input-file: 59420005.osm.gz

mapname: 59420006
description: DE-Schwerin
input-file: 59420006.osm.gz

mapname: 59420007
description: DE-Marburg an der Lahn
input-file: 59420007.osm.gz

mapname: 59420008
description: DE-Wittlich
input-file: 59420008.osm.gz

mapname: 59420009
description: DE-Halle Neustadt
input-file: 59420009.osm.gz

mapname: 59420010
description: DE-Wurzburg
input-file: 59420010.osm.gz

mapname: 59420011
description: DE-Duren
input-file: 59420011.osm.gz

mapname: 59420012
description: FR-Strasbourg
input-file: 59420012.osm.gz

mapname: 59420013
description: DE-Berlin Wilmersdorf
input-file: 59420013.osm.gz

mapname: 59420014
description: DE-Ulm
input-file: 59420014.osm.gz

mapname: 59420015
description: DE-Hamm
input-file: 59420015.osm.gz

mapname: 59420016
description: DE-Bad Homburg vor der Hohe
input-file: 59420016.osm.gz

mapname: 59420017
description: DE-Chemnitz
input-file: 59420017.osm.gz

mapname: 59420018
description: DE-Bayreuth
input-file: 59420018.osm.gz

mapname: 59420019
description: DE-Minden
input-file: 59420019.osm.gz

mapname: 59420020
description: DE-Bietigheim-Bissingen
input-file: 59420020.osm.gz

mapname: 59420021
description: DE-Kiel
input-file: 59420021.osm.gz

mapname: 59420022
description: DE-Muenchen
input-file: 59420022.osm.gz

mapname: 59420023
description: DE-Monchengladbach
input-file: 59420023.osm.gz

mapname: 59420024
description: DE-Koblenz
input-file: 59420024.osm.gz

mapname: 59420025
description: DE-Gotha
input-file: 59420025.osm.gz

mapname: 59420026
description: DE-Crailsheim
input-file: 59420026.osm.gz

mapname: 59420027
description: DE-Bremerhaven
input-file: 59420027.osm.gz

mapname: 59420028
description: CH-Basel
input-file: 59420028.osm.gz

mapname: 59420029
description: DE-Berlin
input-file: 59420029.osm.gz

mapname: 59420030
description: DE-Augsburg
input-file: 59420030.osm.gz

mapname: 59420031
description: DE-Kassel
input-file: 59420031.osm.gz

mapname: 59420032
description: DE-Hanau am Main
input-file: 59420032.osm.gz

mapname: 59420033
description: DE-Cottbus
input-file: 59420033.osm.gz

mapname: 59420034
description: DE-Amberg
input-file: 59420034.osm.gz

mapname: 59420035
description: DE-Hannover
input-file: 59420035.osm.gz

mapname: 59420036
description: DE-Heilbronn
input-file: 59420036.osm.gz

mapname: 59420037
description: DE-Braunschweig
input-file: 59420037.osm.gz

mapname: 59420038
description: AT-Salzburg
input-file: 59420038.osm.gz

mapname: 59420039
description: DE-Koeln
input-file: 59420039.osm.gz

mapname: 59420040
description: DE-Saarbrucken
input-file: 59420040.osm.gz

mapname: 59420041
description: DE-Gottingen
input-file: 59420041.osm.gz

mapname: 59420042
description: DE-Coburg
input-file: 59420042.osm.gz

mapname: 59420043
description: DE-Oldenburg
input-file: 59420043.osm.gz

mapname: 59420044
description: DE-Karlsruhe
input-file: 59420044.osm.gz

mapname: 59420045
description: DE-Neubrandenburg
input-file: 59420045.osm.gz

mapname: 59420046
description: DE-Kempten (Allgaeu)
input-file: 59420046.osm.gz

mapname: 59420047
description: DE-Siegen
input-file: 59420047.osm.gz

mapname: 59420048
description: DE-Mannheim
input-file: 59420048.osm.gz

mapname: 59420049
description: DE-Leipzig
input-file: 59420049.osm.gz

mapname: 59420050
description: DE-Plauen
input-file: 59420050.osm.gz

mapname: 59420051
description: DE-Bielefeld
input-file: 59420051.osm.gz

mapname: 59420052
description: DE-Stuttgart
input-file: 59420052.osm.gz

mapname: 59420053
description: DE-Hamburg
input-file: 59420053.osm.gz

mapname: 59420054
description: DE-Ingolstadt
input-file: 59420054.osm.gz

mapname: 59420055
description: DE-Dortmund
input-file: 59420055.osm.gz

mapname: 59420056
description: DE-Bad Kreuznach
input-file: 59420056.osm.gz

mapname: 59420057
description: DE-Jena
input-file: 59420057.osm.gz

mapname: 59420058
description: DE-Nuremberg
input-file: 59420058.osm.gz

mapname: 59420059
description: DE-Flensburg
input-file: 59420059.osm.gz


> >But got an Exception again.
> >
> >    [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: ...
> 
> What if you replace these last bits
> 
> >'--gmapsupp''--tdbfile''--index'
> >'M0001736.TYP''-c''/home/osm/build/template.args'
> 
> with just /home/osm/build/59420059.osm.gz
> 
> That should speed up the crash, shouldn't it? Please save that 
> problematic tile file somewhere, so that you can test patches with the 
> exact same input.

This won't crash:
osm at kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 --latin1
--code-page=1252 --add-pois-to-areas --adjust-turn-headings --drive-on-right --check-roundabouts
--remove-short-arcs=3.3 --net --route /home/osm/build/59420059.osm.gz
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.54720&mlon=9.61862&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.63765&mlon=9.67061&zoom=17 (reduce the density of points,
length of lines, etc.)
osm at kalium:~/build$


> The faster the command runs, the easier you can test different options 
> until you find the minimal options that are needed to trigger the bug.

run it with the style-file option enabled, not an exception either.
osm at kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 --latin1
--code-page=1252 --add-pois-to-areas --adjust-turn-headings --drive-on-right --check-roundabouts
--remove-short-arcs=3.3 --net --route --style-file=radkarte /home/osm/build/59420059.osm.gz
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.54720&mlon=9.61862&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.63765&mlon=9.72279&zoom=17 (reduce the density of points,
length of lines, etc.)
osm at kalium:~/build$ 


If I run a "full" build again:
osm at kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 --latin1
--code-page=1252 --add-pois-to-areas --adjust-turn-headings --drive-on-right --check-roundabouts
--remove-short-arcs=3.3 --net --route --gmapsupp --tdbfile --index M0001736.TYP -c
/home/osm/build/template.args
SEVERE (MapSplitter): /home/osm/build/59420002.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=51.83339&mlon=10.50572&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=51.00671&mlon=14.58289&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420050.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=50.33380&mlon=12.17277&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.54720&mlon=9.61862&zoom=17 (reduce the density of points,
length of lines, etc.)
SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too small to split at
http://www.openstreetmap.org/?mlat=54.63765&mlon=9.67061&zoom=17 (reduce the density of points,
length of lines, etc.)
java.lang.AssertionError: deltaLong = 36103
        at uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)
        at uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:128)
        at uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.java:176)
        at uk.me.parabola.imgfmt.app.trergn.LinePreparer.<init>(LinePreparer.java:62)
        at uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
        at uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
        at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
        at uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder.java:1044)
        at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
        at uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
        at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
        at uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFilter.java:60)
        at uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
        at uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChain.java:75)
        at uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
        at uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:649)
        at uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
        at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
        at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
        at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Exiting - if you want to carry on regardless, use the --keep-going option

So the problem could be one of those "--gmapsupp --tdbfile --index M0001736.TYP -c
/home/osm/build/template.args" options?

greetings

Johannes




More information about the mkgmap-dev mailing list