Hi,
 
thanks for the info.
I suspected something like that.
 
As I understand there is a rule within the style and there is at least an OSM object in the map which must come together that mkgmap will fail.
So from my point it is not clear where it must be fixed. You can fix it in the code of mkgmap, of course that is the best solution, but is it the only one?
Would it be possible, perhaps as a  workaround, to fix this in the style (or OSM data).
 
I would like to try a fix in the style but I need a little bit help how I can do that.
Or if it is just one (or a few OSM objects) perhaps there is an easy way to delete this object from the map (of course not from OSM data)
Perhaps you could point out how I can start to create a workaround. Then I could try my best.
 
Thanks,
TheSurveyor / Gerd
(I'm another Gerd :-)  )
 
 
 
Gesendet: Dienstag, 18. Juni 2013 um 21:41 Uhr
Von: GerdP <gpetermann_muenchen@hotmail.com>
An: mkgmap-dev@lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] java.lang.ArrayIndexOutOfBoundsException: 0
Hi,

the problem is similar. I guess we have more places were a string is
converted to an
array with split() and there is no check if the result has a length of 0.
I have to analyze all places were split() is used. This might take a
while...

Gerd


thesurveyor wrote
> Many Thanks - that fixed the problem with the tile in Black Sea area, but
> I found another tile which cannot be rendered.
>
> I have uploaded the PBF to
> http://files.mkgmap.org.uk/download/140/70010283.osm.pbf
>
> &nbsp;
>
> mkgmap - the one you proposed to use
> http://files.mkgmap.org.uk/download/136/mkgmap.jar
>
> &nbsp;
>
>
> The commit point of the style files at
> https://github.com/berndw1960/aiostyles &nbsp; is
>
> commit 8e5b68ceb56b5758e8f45a59e18fbdb4b6e11bf1 (it is the version from
> June, 9th, the current version)
>
> &nbsp;
>
> &nbsp;
>
> I have stripped down my command to
>
> java -Xmx1000M -jar&nbsp; mkgmap.jar
> --style-file=..&#92;basemap_style&nbsp; ..&#92;tiles&#92;*.osm.pbf
> ..&#92;basemap_typ.txt
>
> &nbsp;
>
> I get the following error message
>
> Time started: Tue Jun 18 17:32:50 CEST 2013
> java.lang.ArrayIndexOutOfBoundsException: 0
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.osmstyle.StyledConverter.elementSetup(StyledConverter.java:626)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.osmstyle.StyledConverter.addLine(StyledConverter.java:497)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.osmstyle.StyledConverter.addLine(StyledConverter.java:492)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.osmstyle.StyledConverter.end(StyledConverter.java:362)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:244)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:67)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.Main&#36;1.call(Main.java:243)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.Main&#36;1.call(Main.java:239)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.FutureTask&#36;Sync.innerRun(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.FutureTask.run(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.ThreadPoolExecutor&#36;Worker.run(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Unknown
> Source)
> Time finished: Tue Jun 18 17:33:45 CEST 2013
> Total time taken: 55231ms
>
> &nbsp;
>
> The error message looks very similar to the first one, but it&#39;s
> different.
>
> &nbsp;
>
> Many thanks for helping
>
> TheSurveyor / Gerd
>
> &nbsp;
>
> &nbsp;
>
>
> Gesendet:&nbsp;Montag, 17. Juni 2013 um 20:37 Uhr
> Von:&nbsp;&quot;Gerd Petermann&quot; &lt;

> gpetermann_muenchen@

> &gt;
> An:&nbsp;&quot;

> mkgmap-dev@.org

> &quot; &lt;

> mkgmap-dev@.org

> &gt;
> Betreff:&nbsp;Re: [mkgmap-dev] java.lang.ArrayIndexOutOfBoundsException: 0
>
>
>
>
>
> Hi ,
>
> looking at the code it seems that the style assigns a string containing
> a single semicolon : &quot;;&quot;
> as a ref. The code doesn&#39;t handle this special case.
> I&#39;ve commited a small change with r2649 to fix this,
> binary is here:
> http://files.mkgmap.org.uk/download/136/mkgmap.jar
>
> If that doesn&#39;t help, please provide the input file that causes
> the problem and the commit point of the
> files in https://github.com/berndw1960/aiostyles
>
> You can upload it here:
> http://files.mkgmap.org.uk/
>
> Ciao,
> Gerd
> &nbsp;
>
> From:

> thesurveyor@

>
> To:

> mkgmap-dev@.org

>
> Date: Mon, 17 Jun 2013 19:46:38 +0200
> Subject: [mkgmap-dev] java.lang.ArrayIndexOutOfBoundsException: 0
> &nbsp;
>
>
>
>
>
> Hello,
>
> &nbsp;
>
> I&#39;m just starting with creating Garmin maps from OSM Data.
> Many thanks to all who have implemented all such tools. That&#39;s really
> great work.
>
> &nbsp;
>
> Last days I was working on a problem which I couldn&#39;t solve till now.
> Now I hope
> that somebody can help me.
>
> &nbsp;
>
> I&#39;m creating a &quot;small&quot; map in the area of the Black Sea.
> When I use splitter with my
> parameters I get 7 tiles. And one of these I cannot render with mkgmap.
>
> &nbsp;
>
> I&#39;m using the Geofabrik Europe extract and as styles I&#39;m using the
> style available
> at https://github.com/berndw1960/aiostyles
>
> &nbsp;
>
> My polygon-file for splitter looks like:
> Europe / Western Europe / Test
> 1
> &nbsp;&nbsp;&nbsp; 36.2&nbsp; 45.5
> &nbsp;&nbsp; &nbsp;44.4&nbsp; 45.5
> &nbsp;&nbsp;&nbsp; 44.4&nbsp; 43.0
> &nbsp;&nbsp;&nbsp; 36.2&nbsp; 43.0
> &nbsp;&nbsp;&nbsp; 36.2&nbsp; 45.5
> &nbsp;END
> END
>
>
> My commands are the following:
> java -Xmx1400M -ea -jar ..&#92;splitter-r304&#92;splitter.jar
> --polygon-file=..&#92;Test.poly --precomp-sea=..&#92;sea_20130531.zip
> --max-nodes=&quot;1300000&quot; --keep-complete=true --max-areas=200
> --description=OSM_Test --mapid=70010001 --no-trim&nbsp;
> ..&#92;europe-latest.osm.pbf
>
> &nbsp;
>
> java -Xmx1400M -jar ..&#92;mkgmap-r2638&#92;mkgmap.jar
> --bounds=..&#92;bounds_20130531.zip
> --precomp-sea=..&#92;sea_20130531.zip&nbsp; --generate-sea&nbsp;
> --read-config=..&#92;basemap_style&#92;options
> --style-file=..&#92;basemap_style --description=OSM_Test&nbsp;
> --family-id=7001 --product-id=1 --series-name=&#39;OSM&#39;
> --family-name=OSM&nbsp; --mapname=70010001 --draw-priority=10 *.osm.pbf
> ..&#92;basemap_typ.txt
>
> &nbsp;
>
> I have tried to change the splitter options, so that I get much more
> tiles. But it didn&#39;t help. I always get the same error when running
> mkgmap:
>
> &nbsp;
>
> Time started: Sat Jun 15 00:22:51 CEST 2013
> java.lang.ArrayIndexOutOfBoundsException: 0
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.imgfmt.app.trergn.Subdivision.createLine(Subdivision.java:310)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.MapBuilder&#36;LineAddFilter.doFilter(MapBuilder.java:1217)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.LinePreparerFilter.doFilter(LinePreparerFilter.java:85)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFilter.java:69)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.DouglasPeuckerFilter.doFilter(DouglasPeuckerFilter.java:100)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.SizeFilter.doFilter(SizeFilter.java:55)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.RoundCoordsFilter.doFilter(RoundCoordsFilter.java:80)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.filters.PreserveHorizontalAndVerticalLinesFilter.doFilter(PreserveHorizontalAndVerticalLinesFilter.java:60)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChain.java:68)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:1046)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:737)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:672)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:214)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:120)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:82)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.Main&#36;1.call(Main.java:243)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> uk.me.parabola.mkgmap.main.Main&#36;1.call(Main.java:239)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.FutureTask&#36;Sync.innerRun(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.FutureTask.run(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> java.util.concurrent.ThreadPoolExecutor&#36;Worker.run(Unknown Source)
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Unknown
> Source)
> Time finished: Sat Jun 15 00:23:23 CEST 2013
> Total time taken: 31871ms
>
> &nbsp;
>
> But if I use the mkgmap default style then I can create the img&#39;s.
> I hope that you can help me or direct me somewhere else.
>
> &nbsp;
>
> Many thanks
> TheSurveyor / Gerd
>
> &nbsp;
>
> PS: I&#39;ve asked my question here:
> http://forum.openstreetmap.org/viewtopic.php?id=21543
>
> and they directed me to the mailing list
>
>
> &nbsp;
>
> &nbsp;
>
>
>
>
>
> _______________________________________________ mkgmap-dev mailing list

> mkgmap-dev@.org

> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>
>
>
>
>
>
> &nbsp;
>
> &nbsp;
>
> _______________________________________________
> mkgmap-dev mailing list

> mkgmap-dev@.org

> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: http://gis.19327.n5.nabble.com/java-lang-ArrayIndexOutOfBoundsException-0-tp5765797p5765995.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev