logo separator

[mkgmap-dev] RE Commit r3801: merge split-shape branch

From Mike Baggaley mike at tvage.co.uk on Tue Feb 14 17:40:14 GMT 2017

Hi Gerd, since this change I am getting a java.lang.StackOverflowError crash
caused by the code recursively attempting to split something which is
unsplittable (assuming the split is based on location), as I have a large
number of points at exactly the same location (from external data I add to
the OSM data).

The offending line is at
uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:187)
. It is failing on my system with a depth of 2342. I suggest there needs to
be a maximum depth after which it should give up trying to split.

				} else if (mustSplit) { // can't reduce
size, so force more subdivisions
					log.debug("splitting area by
contents", area);
					MapArea[] sublist = area.split(1, 1,
bounds, true);
					addAreasToList(sublist, alist, depth
+ 1);
					continue;
				}

I am unsure whether you would want a fixed depth limit, would want it to be
set by parameter, would prefer to catch the error or think it would be
possible to see whether the proposed area split has made any improvement,
and give up if it hasn't.

Regards,
Mike




More information about the mkgmap-dev mailing list