Hi all,

I've now reproduced what happened. Arndt created a map for Bavaria. The index 
contains these countries:
"Cesko"
"COUNTRY" (the default)
"Deutschland"
"Österreich"
"Schweiz, Suisse, Svizzera, Svizra"
Each one has an index into a list of roads group by country and city. The old 
code expected that the last entry contains the highest index, but in this
case the map contains no roads in Switzerland (Schweiz), the index is 0. The 
old code used this value to find the number of needed bytest to store the index,
in this case 1. Since the index for "Österreich" is > 255 the assertion failed.

I don't know why the list contains Schweiz, the geofabrik poly file contains 
only a small part of lake "Bodensee". Maybe there is an exclave
or a POI is generated in this small area.

I think older versions of mkgmap simply created a wrong index in this case.
The strange thing is:
I did not find any problem on my Oregon 600, so maybe this wrong index is not 
used at all, at least not on my device.

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Gerd 
Petermann <[email protected]>
Gesendet: Mittwoch, 25. April 2018 21:26:39
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] mkgmap4176 java-error

Hi Arndt,

if you still have the gmapsupp created with version r4165, please check if you 
see a difference in the adress search.
I am not sure what the effect of the error was, I assume the list of countries 
looks wrong or incomplete.

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Arndt 
<[email protected]>
Gesendet: Mittwoch, 25. April 2018 20:56:29
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] mkgmap4176 java-error

Hi Gerd,

4179 and Bayern are OK. Thank you!

Arndt


---- Gerd Petermann schrieb ----

Hi Arndt,

I did not try to reproduce the error, please check if it is fixed with r4179.

Gerd

________________________________________
Von: mkgmap-dev 
<[email protected]<mailto:[email protected]>>
 im Auftrag von Ticker Berkin 
<[email protected]<mailto:[email protected]>>
Gesendet: Mittwoch, 25. April 2018 19:44:14
An: [email protected]<mailto:[email protected]>
Betreff: Re: [mkgmap-dev] mkgmap4176 java-error

Hi Gerd

Yes, but in "buildFromCountries()" above, near 
index.add<http://index.add>(mdr29), or as
a pre-scan in writeSectData before setting size17 = numberToPointerSize

Ticker

On Wed, 2018-04-25<tel:2018-04-25> at 17:26 +0000<tel:+0000>, Gerd Petermann 
wrote:
> Hi Ticker,
>
> thanks for the hint. I agree that the code to set max17 looks
> suspicious.
> Can't test right now, I think we just have to change
> this.max17 = r.getMdr17();
> to
> this.max17 = Math.max<http://Math.max>(this.max17, r.getMdr17());
>
> Do you agree?
> Gerd
>
>
>
> ________________________________________
> Von: mkgmap-dev 
> <[email protected]<mailto:[email protected]>>
>  im Auftrag
> von Ticker Berkin <[email protected]<mailto:[email protected]>>
> Gesendet: Mittwoch, 25. April 2018 19:06:18
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] mkgmap4176 java-error
>
> Hi Gerd
>
> I've been have a look at this as well.
>
> The pre-io-change version of putNu didn't check that the value could
> be
> expressed in the given nBytes, so this error could have existed for a
> while
>
> The logic in MDR29 just picks the last record in
>         private final List<Mdr29Record> index = new ArrayList<>();
> assumes that getMdr17() from this has the highest value and can be
> used
> to determine nBytes for all the records in the call to
>    writer.putNu<http://writer.putNu>(size17, record.getMdr17());
> Ticker
>
> On Wed, 2018-04-25<tel:2018-04-25> at 18:26 +0200<tel:+0200>, Arndt Röhrig 
> wrote:
> > Hi Gerd,
> > here are the complete error-message:
> > Exception in thread "main" 
> > java.lang.AssertionError<http://java.lang.AssertionError>: 16735<tel:16735>
> > at
> > uk.me.parabola.imgfmt.app.FileBackedImgFileWriter.putNu<http://uk.me.parabola.imgfmt.app.FileBackedImgFileWriter.putNu>(FileBackedI
> > mg
> > FileWriter.java:213<http://FileWriter.java:213>)
> > at 
> > uk.me.parabola.imgfmt.app.mdr.Mdr29.writeSectData<http://uk.me.parabola.imgfmt.app.mdr.Mdr29.writeSectData>(Mdr29.java:96<http://Mdr29.java:96>)
> > at
> > uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection>(MDRFile.java:421<http://MDRFile.java:421>
> > )
> > at
> > uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections>(MDRFile.java:38<http://MDRFile.java:38>
> > 5)
> > at 
> > uk.me.parabola.imgfmt.app.mdr.MDRFile.write<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.write>(MDRFile.java:269<http://MDRFile.java:269>)
> > at
> > uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinishForDevice<http://uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinishForDevice>(MdrBui
> > ld
> > er.java:355<http://er.java:355>)
> > at
> > uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish<http://uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish>(GmapsuppBu
> > il
> > der.java:178<http://der.java:178>)
> > at 
> > uk.me.parabola.mkgmap.main.Main.endOptions<http://uk.me.parabola.mkgmap.main.Main.endOptions>(Main.java:678<http://Main.java:678>)
> > at
> > uk.me.parabola.mkgmap.CommandArgsReader.readArgs<http://uk.me.parabola.mkgmap.CommandArgsReader.readArgs>(CommandArgsReader.
> > ja
> > va:128)
> > at 
> > uk.me.parabola.mkgmap.main.Main.mainStart<http://uk.me.parabola.mkgmap.main.Main.mainStart>(Main.java:143<http://Main.java:143>)
> > at 
> > uk.me.parabola.mkgmap.main.Main.main<http://uk.me.parabola.mkgmap.main.Main.main>(Main.java:114<http://Main.java:114>)
> >
> > Greets
> > Arndt
> > > Gerd Petermann hat am 25. April 2018 um 17:13 geschrieben:
> > >
> > >
> > > Hi Arndt,
> > >
> > > this one is not so obvious to me. Please can you post the
> > > complete
> > > error message, esp. the line with
> > > AssertionError ?
> > >
> > > Gerd
> > >
> > > ________________________________________
> > > Von: mkgmap-dev im Auftrag von Arndt Röhrig
> > > Gesendet: Mittwoch, 25. April 2018 15:27:30
> > > An: Development list for mkgmap
> > > Betreff: [mkgmap-dev] mkgmap4176 java-error
> > >
> > > Hi @all
> > >
> > > mkgmap4176 failed to build a map from Bayern. (aftes building all
> > > tiles) 4165 works well.
> > >
> > > Maybe a similar problem like yesterday?
> > >
> > > Or some exotic types in my style?
> > >
> > > FileWriter.java:213<http://FileWriter.java:213>)
> > > at
> > > uk.me.parabola.imgfmt.app.mdr.Mdr29.writeSectData<http://uk.me.parabola.imgfmt.app.mdr.Mdr29.writeSectData>(Mdr29.java:96<http://Mdr29.java:96>)
> > > at
> > > uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSection>(MDRFile.java:4<http://MDRFile.java:4>
> > > 21
> > > )
> > > at
> > > uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.writeSections>(MDRFile.java<http://MDRFile.java>:
> > > 38
> > > 5)
> > >
> > > at 
> > > uk.me.parabola.imgfmt.app.mdr.MDRFile.write<http://uk.me.parabola.imgfmt.app.mdr.MDRFile.write>(MDRFile.java:269<http://MDRFile.java:269>)
> > > at
> > > uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinishForDevice<http://uk.me.parabola.mkgmap.combiners.MdrBuilder.onFinishForDevice>(MdrB
> > > ui
> > > ld
> > > er.java:355<http://er.java:355>)
> > > at
> > > uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish<http://uk.me.parabola.mkgmap.combiners.GmapsuppBuilder.onFinish>(Gmapsupp
> > > Bu
> > > il
> > > der.java:178<http://der.java:178>)
> > > at 
> > > uk.me.parabola.mkgmap.main.Main.endOptions<http://uk.me.parabola.mkgmap.main.Main.endOptions>(Main.java:678<http://Main.java:678>)
> > > at
> > > uk.me.parabola.mkgmap.CommandArgsReader.readArgs<http://uk.me.parabola.mkgmap.CommandArgsReader.readArgs>(CommandArgsReade
> > > r.
> > > ja
> > > va:128)
> > > at 
> > > uk.me.parabola.mkgmap.main.Main.mainStart<http://uk.me.parabola.mkgmap.main.Main.mainStart>(Main.java:143<http://Main.java:143>)
> > > at 
> > > uk.me.parabola.mkgmap.main.Main.main<http://uk.me.parabola.mkgmap.main.Main.main>(Main.java:114<http://Main.java:114>)
> > >
> > >
> > > Greetz
> > >
> > > Arndt
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > [email protected]<mailto:[email protected]>
> > _______________________________________________
> > mkgmap-dev mailing list
> > [email protected]<mailto:[email protected]>
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]<mailto:[email protected]>
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]<mailto:[email protected]>
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]<mailto:[email protected]>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]<mailto:[email protected]>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to