
I'm getting an assertion error compiling two of my maps (Colombia and Venezuela) with mkgmap r3350 Number of MapFailedExceptions: 0 Exception in thread "main" java.lang.AssertionError: Invalid label offset found 16091027 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:87) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:394) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:540) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:134) at uk.me.parabola.mkgmap.main.Main.main(Main.java:105) My mkgmap command: mkgmap.jar --bounds=bounds.zip --precomp-sea=sea.zip --max-jobs --route --latin1 --code-page=1252 \ --country-name=$PAIS --country-abbr=$ABR --area-name=$MAPA --family-name="OpenStreetMap $MAPA" --family-id=1$FID --product-id=1 --series-name="OSM-$MAPA" \ --overview-mapname=$ABR-1$FID --overview-mapnumber=551${FID}000 --name-tag-list=$NAMETAG --index --process-destination --process-exits --housenumbers \ --remove-short-arcs=0 --reduce-point-density=4 --reduce-point-density-polygon=8 --polygon-size-limits="24:12, 18:10, 16:0" --add-pois-to-areas --adjust-turn-headings --report-similar-arcs --report-dead-ends=2 --link-pois-to-ways \ --location-autofill=is_in,nearest --drive-on-$DRIVEON --check-roundabouts --check-roundabout-flares --license-file=license_ODbL.txt \ --copyright-message="OpenStreetMap contributors, ODbL. See: http://www.openstreetmap.org/copyright" --style=mio --check-styles -c $pais.args Error also happens with default style

Me too - countries, South America continent from Geofabrik, and Columbia: 4:42:28 south-america sam 6661 starting to compile velomap with mkgmap xception in thread "main" java.lang.IndexOutOfBoundsException: Index: 62789, Size: 10006 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:414) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:540) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:134) at uk.me.parabola.mkgmap.main.Main.main(Main.java:105) 7:04:02 colombia co 6794 starting to compile velomap with mkgmap Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 50915, Size: 16191 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:414) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:75) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:540) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:134) at uk.me.parabola.mkgmap.main.Main.main(Main.java:105) I'm not rendering Venezuela so cannot comment on it. Last week the same happened on Asia continent map. On 19.11.2014 17:45, Carlos Dávila wrote:
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

oh - BTW - this error happens when compiling mapset.img and mapset.tdb. NOT when compiling the actual .img files. I can upload the columbia .img files if someone want to analyze what causes the crash.. (at least that's easier then on a continent map). On 19.11.2014 17:45, Carlos Dávila wrote:
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Hi Thanks for reporting this. There was more than one problem. Although, since the number that is read is not used, most of the fixes will not be noticeable. The visible problems that are fixed are: 1. Any house or phone number that began with ':' and had an even number of characters overall would crash. 2. Any house or phone number that contained a ':' would have it converted to '-'. Patch attached and a pre-compiled jar is at http://files.mkgmap.org.uk/download/230/mkgmap.jar ..Steve

Great - patch is working. Colombia compiled fine for me now (and if you don't hear from me again about this in the next 30min, South-America will have compiled fine too)... On 20.11.2014 15:48, Steve Ratcliffe wrote:
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Hi Steve, I wondered why the patched version produces slightly smaller img files. If I got that right, the reason is that street numbers and phone numbers containing a "-" are encoded as "simple number" now ? Gerd Date: Thu, 20 Nov 2014 14:48:44 +0000 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] Assertion error with r3350 Hi Thanks for reporting this. There was more than one problem. Although, since the number that is read is not used, most of the fixes will not be noticeable. The visible problems that are fixed are: 1. Any house or phone number that began with ':' and had an even number of characters overall would crash. 2. Any house or phone number that contained a ':' would have it converted to '-'. Patch attached and a pre-compiled jar is at http://files.mkgmap.org.uk/download/230/mkgmap.jar ..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd
Yes simple numbers are stored two to a byte in base 11 with '-' being the digit after 9 so takes about half the number of bytes. If it is stored as a label, you have the lbl pointer, 3 bytes, plus the null byte. For a ten digit number you save about 9 bytes by encoding it as a simple number. Not much but it might add up to enough to save a block. Or do you think that there is a problem? This bug has been there ever since the code was added in 2009! ..Steve

Hi Steve, no problem, just wanted to make sure that I understand the code. The comments for SimpleStreetPhoneNumber are a bit confusing. I don't understand the (or A) in "If the string is not all numeric (or A) " Gerd Steve Ratcliffe wrote
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Assertion-error-with-r3350-tp5824877p5825012.... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd
for SimpleStreetPhoneNumber are a bit confusing. I don't understand the (or A) in "If the string is not all numeric (or A) "
The code converts from base 11 to a string using a general routine so that it uses 0123456789A in the same way that hexadecimal uses 0123456789ABCDEF. Since that routine is not used elsewhere, we could make it specific to base 11 and replace String digit = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; with "0123456789-" ..Steve

Hi Steve, I looked at this again. I think the comment disturbed me because there is also an example "4a" and I first wondered if there is really a special treatment for this, and the old (wrong) code did not show so clearly what was really meant. I've attached a small patch to improve the comments. Gerd
participants (5)
-
Carlos Dávila
-
Felix Hartmann
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe