[mkgmap-dev] Possible BUG: Array index out of bounds in RestrictionRelation.java
From Mark Burton markb at ordern.com on Mon May 4 12:41:31 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. OK. > 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()); > } My version of the fix doesn't assign the empty ways to either toWay or fromWay so those variables will be null and the warnings not printed. Cheers, Mark
- Previous message: [mkgmap-dev] Possible BUG: Array index out of bounds in RestrictionRelation.java
- Next message: [mkgmap-dev] Possible BUG: Array index out of bounds in RestrictionRelation.java
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list