logo separator

[mkgmap-dev] NullPointerException when compiling a TYP file

From paco.tyson at free.fr paco.tyson at free.fr on Thu Jan 9 22:06:29 GMT 2014

Hi all,

I created my TYP file with the latest TYPViewer. I can compile it using this
tool. However, mkgmap fails with a NullPointerException :
java.lang.NullPointerException
	at uk.me.parabola.imgfmt.app.typ.Xpm.writeImage(Xpm.java:43)
	at uk.me.parabola.imgfmt.app.typ.TypElement.writeImage(TypElement.java:206)
	at uk.me.parabola.imgfmt.app.typ.TypPoint.write(TypPoint.java:53)
	at uk.me.parabola.imgfmt.app.typ.TYPFile.writeSection(TYPFile.java:168)
	at uk.me.parabola.imgfmt.app.typ.TYPFile.write(TYPFile.java:70)
	at uk.me.parabola.mkgmap.main.TypCompiler.writeTyp(TypCompiler.java:145)
	at uk.me.parabola.mkgmap.main.TypCompiler.makeMap(TypCompiler.java:102)
	at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:243)
	at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:239)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:695)
Exiting - if you want to carry on regardless, use the --keep-going option



I found the culprit to be a blank POI :
[_point]
Type=0x02f03
String1=0x04,XXXXX
String2=0x03,
String3=0x02,
String4=0x01,YYYYY
ExtendedLabels=Y
FontStyle=SmallFont
CustomColor=Day
DaycustomColor:#00008B
DayXpm="0 0 0 0"
[end]

If I select the "Bitmap" checkbox, TYPViewer generates the POI like this :
[_point]
Type=0x02f03
String1=0x04,XXXXX
String2=0x03,
String3=0x02,
String4=0x01,YYYYY
ExtendedLabels=Y
FontStyle=SmallFont
CustomColor=Day
DaycustomColor:#00008B
DayXpm="16 16 2 1"   Colormode=16
"!	c #FFFFFF"
"  	c none"
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
"                "
;1234567890123456
[end]

This format compiles just fine.


http://www.mkgmap.org.uk/doc/typ-compiler says :
"In particular the files produced by TYPWiz and TYPViewer are supported."


So, is this a bug in mkgmap or TYPviewer ?

Thanks,
Paco


More information about the mkgmap-dev mailing list