<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>Is this the best way to make bug reports? I couldn't find a 'trac' for mkgmap...</p>
<p>Using r3230, if I have the following in a style file:</p>
<p>name=* & highway=* {set name='${name|subst:^(Doctor|Dokter) ~>Dr }'}</p>
<p>then mkgmap crashes while loading the style files. After doing various tests my conclusion is that it is triggered by the "|" in the pattern. I tried escaping it with a backslash but it didn't change anything.</p>
<p>I have found a kind-of workaround, by making the alternatives into separate calls to subst, but that will result in enormously long commands in the real use I have in mind. The example above is deliberately short to illustrate the bug.</p>
<p>The stack trace is:</p>
<p>java.lang.IllegalStateException: No match found<br /> at java.util.regex.Matcher.group(Unknown Source)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addFilter(ValueBuilder.java:168)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.addTagValue(ValueBuilder.java:156)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.compile(ValueBuilder.java:133)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.<init>(ValueBuilder.java:45)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.<init>(ValueBuilder.java:40)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuildedAction.add(ValueBuildedAction.java:30)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.AddTagAction.<init>(AddTagAction.java:44)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readTagValue(ActionReader.java:169)<br /> at uk.me.parabola.mkgmap.osmstyle.actions.ActionReader.readActions(ActionReader.java:60)<br /> at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:117)<br /> at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.checkCommand(RuleFileReader.java:192)<br /> at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader.java:109)<br /> at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.java:86)<br /> at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readRules(StyleImpl.java:302)<br /> at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:160)<br /> at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readStyle(StyleImpl.java:554)<br /> at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.init(RelationStyleHook.java:38)<br /> at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.pluginChain(OsmMapDataSource.java:185)<br /> at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMapDataSource.java:153)<br /> at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:49)<br /> at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127)<br /> at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)<br /> at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)<br /> at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)<br /> at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216)<br /> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)<br /> at java.util.concurrent.FutureTask.run(Unknown Source)<br /> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)<br /> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br /> at java.lang.Thread.run(Unknown Source)<br />Exiting - if you want to carry on regardless, use the --keep-going option<br />Time finished: Wed May 28 08:37:41 CEST 2014<br />Total time taken: 1124ms</p>
<p>Thanks for a great program!</p>
<p>Regards,</p>
<p>Colin</p>
</body></html>