logo separator

[mkgmap-dev] Possible BUG: Array index out of bounds in RestrictionRelation.java

From Thorsten the.real.hik at gmx.net on Mon May 4 12:34:02 BST 2009

Hi,

Mark Burton wrote:
> Many thanks for the report + patch. I don't know how the way's can have
> no points but we should handle that situation gracefully.

I am trying to parse the splitted osm files if there are ways which have no node 
references.

> Please try the attached patch with your data.

This could take some time - I will start mkgmap again tonight.

Maybe one thing. You have not altered the following lines which previously failed:
  				
if(toWay != null) {
	log.warn(messagePrefix + "has multiple 'to' members - first 'to' member starts 
at " + toWay.getPoints().get(0).toDegreeString());
}

What happens if toWay.getPoints() is empty? toWay.getPoints().get(0) will fail 
anyway, doesn't it?

Same with:

if(fromWay != null) {
	log.warn(messagePrefix + "has multiple 'from' members - first 'from' member 
starts at " + fromWay.getPoints().get(0).toDegreeString());
}

--
Thorsten



More information about the mkgmap-dev mailing list