logo separator

[mkgmap-dev] java.lang.AssertionError while building index from unicode tiles

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Oct 15 09:53:48 BST 2021

Hi Carlos,

I think there are at least two problems:
1) something is wrong with the unicode String comparison, but I have no clue how it should work.
The tile contains > 10000 city POI, but mkgmap detects only 145 different names with unicode. Method Mdr5Record.isSameByName(Collator collator, Mdr5Record other) returns true for names which look very different to me.
2) We don't use the method Mdr5Record.isSameByName() when section Mdr25 is written (Cities are sorted by country and then by the mdr5 city record number). Instead normal java String.equals() is used and thus the list contains the expected > 10000 entries. This list requires a two-byte value in the index.

The crash happens because we try to write the position in the mdr25 list with only one byte cause of this code in Mdr29.java:
                int size25 = sizes.getSize(5);  // NB appears to be size of 5 (cities), not 25 (cities with country).
The comment already shows that this is probably only correct when boths lists have the same number of entries.

I hope Steve or Ticker have an idea what's wrong.
Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Freitag, 15. Oktober 2021 10:09
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] java.lang.AssertionError while building index from    unicode tiles

Hi Carlos,

I can reproduce the crash. Not sure where to fix this yet...

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <carlos at alternativaslibres.org>
Gesendet: Donnerstag, 14. Oktober 2021 18:33
An: Development list for mkgmap
Betreff: [mkgmap-dev] java.lang.AssertionError while building index from        unicode tiles

Hi all

I'm getting error below while building index from this tile:
https://files.mkgmap.org.uk/download/523/31177029.o5m. Minimum mkgmap
options triggering the error are: java -jar mkgmap-trunk.jar
--bounds=bounds.zip --index --unicode 31177029.o5m

Another tile from the same splitter run also fails but all other 65 of
67 build fine. With --code-page=936 they all build fine.

Command output:

Exception in thread "main" java.lang.AssertionError: 10586
         at
uk.me.parabola.imgfmt.app.FileBackedImgFileWriter.putNu(FileBackedImgFileWriter.java:215)
         at uk.me.parabola.imgfmt.app.mdr.Mdr29.writeSectData(Mdr29.java:94)
         at
uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection(MDRFile.java:424)
         at
uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections(MDRFile.java:388)
         at uk.me.parabola.imgfmt.app.mdr.MDRFile.write(MDRFile.java:270)
         at
uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinish(MdrBuilder.java:331)
         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)


_______________________________________________
mkgmap-dev mailing list
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
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list