NPE with r3183 & r3185

Hi everybody, since updating to r3183 I get the following NPE. Also Updating to r3185 doesn't solve the issue to me. The NPE doesn't occur in all my maps, but in several ones, mainly in maps with higher density of mapping. Henning java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.osm.RestrictionRelation.eval(RestrictionRelation.java:106) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.end(RelationStyleHook.java:56) at uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingHooksChain.java:79) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:49) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

Hi Henning, looks like your relations style file is removing the tag restriction=* or one that starts with "restriction:" Is that intended? Gerd
Date: Sun, 13 Apr 2014 17:09:43 +0200 From: osm@aighes.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] NPE with r3183 & r3185
Hi everybody,
since updating to r3183 I get the following NPE. Also Updating to r3185 doesn't solve the issue to me. The NPE doesn't occur in all my maps, but in several ones, mainly in maps with higher density of mapping.
Henning
java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.osm.RestrictionRelation.eval(RestrictionRelation.java:106) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.end(RelationStyleHook.java:56) at uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingHooksChain.java:79) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:49) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Henning, yes, these two lines are problematic: type=restriction & except ~ '.*bicycle*.' { delete type ; delete restriction }type=restriction:bicycle { set restriction = '${restriction:bicycle}' } mkgmap ignored them up to release r3169, now they have an effect. I'll add checks to detect that. Gerd
Date: Sun, 13 Apr 2014 17:09:43 +0200 From: osm@aighes.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] NPE with r3183 & r3185
Hi everybody,
since updating to r3183 I get the following NPE. Also Updating to r3185 doesn't solve the issue to me. The NPE doesn't occur in all my maps, but in several ones, mainly in maps with higher density of mapping.
Henning
java.lang.NullPointerException at uk.me.parabola.mkgmap.reader.osm.RestrictionRelation.eval(RestrictionRelation.java:106) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.end(RelationStyleHook.java:56) at uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingHooksChain.java:79) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinMapDataSource.java:49) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:216) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, so how I have to change my style to get the same effect as I got before? Henning Am 13.04.2014 17:39, schrieb Gerd Petermann:
Hi Henning,
yes, these two lines are problematic: type=restriction & except ~ '.*bicycle*.' { delete type ; delete restriction } type=restriction:bicycle { set restriction = '${restriction:bicycle}' } mkgmap ignored them up to release r3169, now they have an effect. I'll add checks to detect that.
Gerd

Hi Henning, I think you should remove or comment them. They were ignored in older versions of mkgmap, and they are obsolete in the current version, as mkgmap evaluates the tags itself. I am still working on a bigger patch to fix some other issues regarding restriction relations, maybe I'll post a first version today. Gerd Date: Sun, 13 Apr 2014 18:20:02 +0200 From: osm@aighes.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] NPE with r3183 & r3185 Hi Gerd, so how I have to change my style to get the same effect as I got before? Henning Am 13.04.2014 17:39, schrieb Gerd Petermann: Hi Henning, yes, these two lines are problematic: type=restriction & except ~ '.*bicycle*.' { delete type ; delete restriction }type=restriction:bicycle { set restriction = '${restriction:bicycle}' } mkgmap ignored them up to release r3169, now they have an effect. I'll add checks to detect that. Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, so the exeptions are handled with the normal access-rules? Henning Am 13.04.2014 18:28, schrieb Gerd Petermann:
Hi Henning,
I think you should remove or comment them. They were ignored in older versions of mkgmap, and they are obsolete in the current version, as mkgmap evaluates the tags itself.
I am still working on a bigger patch to fix some other issues regarding restriction relations, maybe I'll post a first version today.
Gerd

Hi Henning, when all errors are fixed, mkgmap will evaluate the tags described in the wiki: http://wiki.openstreetmap.org/wiki/Relation:restriction If your style abuses e.g. car routing for racing bikes, you may have to add rules in the relations file. See 1st http://gis.19327.n5.nabble.com/r3165-in-via-ways-branch-tp5802056.html and then http://gis.19327.n5.nabble.com/vehicles-in-restriction-relations-tp5801618p5... Gerd Henning Scholland wrote
Hi Gerd, so the exeptions are handled with the normal access-rules?
Henning
Am 13.04.2014 18:28, schrieb Gerd Petermann:
Hi Henning,
I think you should remove or comment them. They were ignored in older versions of mkgmap, and they are obsolete in the current version, as mkgmap evaluates the tags itself.
I am still working on a bigger patch to fix some other issues regarding restriction relations, maybe I'll post a first version today.
Gerd
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/NPE-with-r3183-r3185-tp5803133p5803144.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (3)
-
Gerd Petermann
-
GerdP
-
Henning Scholland