NullPointerException in TDB code in mkgmap r1457

I just got this with mkgmap r1457 and Geofabrik's finland.osm.bz2 from today: Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.tdbfmt.OverviewMapBlock.setArea(OverviewMapBlock.java:100) at uk.me.parabola.mkgmap.combiners.TdbBuilder.addToTdb(TdbBuilder.java:114) at uk.me.parabola.mkgmap.combiners.TdbBuilder.onMapEnd(TdbBuilder.java:103) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:369) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124) at uk.me.parabola.mkgmap.main.Main.main(Main.java:122) Same thing with yesterday's finland.osm.bz2. r1455 worked fine, but r1457 is throwing the NullPointerException. I rebuilt both maps once more with r1455, with success. I invoked mkgmap with assertions enabled, except for the very last run (today's map with r1455). Marko

On 04/01/10 07:18, Marko Mäkelä wrote:
Same thing with yesterday's finland.osm.bz2. r1455 worked fine, but r1457 is throwing the NullPointerException.
I couldn't reproduce the error, but it seems from the error that you have a .img file that does not contain a TRE section. Anyway the only code change was a patch that I mistakenly applied to the wrong branch, so I will fix that. I shall then add some code so that you get a real error rather than the NullPointerException. Cheers, ..Steve

Hi Steve, On Mon, Jan 04, 2010 at 01:24:44PM +0000, Steve Ratcliffe wrote:
On 04/01/10 07:18, Marko Mäkelä wrote:
Same thing with yesterday's finland.osm.bz2. r1455 worked fine, but r1457 is throwing the NullPointerException.
I couldn't reproduce the error, but it seems from the error that you have a .img file that does not contain a TRE section.
The .img file comes from mkgmap. What is the TRE section good for, and how could I ask mkgmap to generate it? I am not using mkgmap --index, because I target the device, not MapSource.
Anyway the only code change was a patch that I mistakenly applied to the wrong branch, so I will fix that. I shall then add some code so that you get a real error rather than the NullPointerException.
Thanks, it works again. Marko

On 04/01/10 14:52, Marko Mäkelä wrote:
The .img file comes from mkgmap. What is the TRE section good for, and how could I ask mkgmap to generate it? I am not using mkgmap --index, because I target the device, not MapSource.
The TRE section is one of the essential ones, so creating the img must have pretty much failed altogether. Hard to say any more without seeing it. As I said I will put in a check so that if this happens again it will be easier to track down what is wrong (there have been other occurrences of similar problems in the past). ..Steve

On Mon, Jan 04, 2010 at 03:07:30PM +0000, Steve Ratcliffe wrote:
On 04/01/10 14:52, Marko Mäkelä wrote:
The .img file comes from mkgmap. What is the TRE section good for, and how could I ask mkgmap to generate it? I am not using mkgmap --index, because I target the device, not MapSource.
The TRE section is one of the essential ones, so creating the img must have pretty much failed altogether.
It took the usual time and failed at the very end. Assertions were enabled. Hmm, the error log is much longer than usual: -rw-r--r-- 1 marko marko 406930 Jan 4 08:49 mkgmap.log.0 -rw-r--r-- 1 marko marko 145678 Jan 3 11:59 mkgmap.log.1 -rw-r--r-- 1 marko marko 145389 Jan 2 11:21 mkgmap.log.2 The size seems to be attributable to the MultiPolygonRelation warnings: grep -v MultiPolygonRelation mkgmap.log.0|wc -c 145389 You can find my scripts at http://www.polkupyoraily.net/osm/. Marko
participants (2)
-
Marko Mäkelä
-
Steve Ratcliffe