[mkgmap-dev] TYP compiler problems
From Ticker Berkin rwb-mkgmap at jagit.co.uk on Fri Nov 9 13:06:45 GMT 2018
Hi I'm having problems with the TYP file appearing corrupt. A simple file was working as expected, but adding a bit more caused very strange display properties in unrelated items on the Garmin device - eg, an area showed as a pattern never seen before, and, when selected, claimed to be waypoint. Running test.display on the file, sometimes I get: Exception in thread "main" java.lang.AssertionError at test.display.TypSectionDisplayer.printLabels(TypSectionDisplayer.java:1 19) at test.display.PolygonDisplayer.printStyles(PolygonDisplayer.java:83) at test.display.PolygonDisplayer.printPolygonDefs(PolygonDisplayer.java:60 ) at test.display.PolygonDisplayer.print(PolygonDisplayer.java:42) at test.display.TypDisplay.print(TypDisplay.java:56) at test.display.CommonDisplay.display(CommonDisplay.java:171) at test.display.CommonDisplay.display(CommonDisplay.java:196) at test.display.TypDisplay.main(TypDisplay.java:302) and, making slight adjustments to the length of some strings, it doesn't crash but the test output has lots of non-printing characters in the label display and sometimes messages about overshoot {-ve val} Gradually deleting almost all the contents of the typ file, it now always crashes display. Changing the xpm from a bit-map to a block colour makes it OK. This is file badTypMin.txt Going back to a version with more contents, changing the string in polygon type 0x58 changes the crash/corruption behaviour as per the comment. This is file badTypMore.txt Also attached is tst.sh that I've been using to compile and display the badTyp.txt file Ticker -------------- next part -------------- [_id] CodePage=1252 [end] ; [_polygon] Type=0x02 String=Suburb FontStyle=NormalFont Xpm="0 0 1 0" "a c #FFFF66" [end] ; [_polygon] Type=0x03 String=Village FontStyle=NormalFont Xpm="0 0 1 0" "a c #FFFF66" [end] ; [_polygon] Type=0x08 ; String=Shopping Center FontStyle=SmallFont Xpm="0 0 1 0" "a c #FF9966" [end] ; [_polygon] Type=0x0f String=Commercial FontStyle=NormalFont Xpm="0 0 1 0" "a c #FFFF66" [end] ; [_polygon] Type=0x10 String=Residential FontStyle=NormalFont Xpm="0 0 1 0" "a c #FFFF66" [end] ; [_polygon] Type=0x11 String=Danger Area FontStyle=NormalFont Xpm="32 32 2 1" ". c none" "/ c #FF0000" "////////........////////........" "///////........////////......../" "//////........////////........//" "/////........////////........///" "////........////////........////" "///........////////......../////" "//........////////........//////" "/........////////........///////" "........////////........////////" ".......////////........////////." "......////////........////////.." ".....////////........////////..." "....////////........////////...." "...////////........////////....." "..////////........////////......" ".////////........////////......." "////////........////////........" "///////........////////......../" "//////........////////........//" "/////........////////........///" "////........////////........////" "///........////////......../////" "//........////////........//////" "/........////////........///////" "........////////........////////" ".......////////........////////." "......////////........////////.." ".....////////........////////..." "....////////........////////...." "...////////........////////....." "..////////........////////......" ".////////........////////......." ; "12345678901234567890123456789012" [end] ; [_polygon] Type=0x12 String=Retail FontStyle=NormalFont Xpm="0 0 1 0" "a c #FFFF66" [end] ; [_polygon] Type=0x13 String=Building FontStyle=SmallFont Xpm="0 0 1 0" "a c #FF9966" [end] ; [_polygon] Type=0x16 String=Nature Reserve FontStyle=NormalFont Xpm="32 32 2 1" ". c none" "/ c #00FF00" "/////........////////........///" "////........////////........////" "///........////////......../////" "//........////////........//////" "/........////////........///////" "........////////........////////" ".......////////........////////." "......////////........////////.." ".....////////........////////..." "....////////........////////...." "...////////........////////....." "..////////........////////......" ".////////........////////......." "////////........////////........" "///////........////////......../" "//////........////////........//" "/////........////////........///" "////........////////........////" "///........////////......../////" "//........////////........//////" "/........////////........///////" "........////////........////////" ".......////////........////////." "......////////........////////.." ".....////////........////////..." "....////////........////////...." "...////////........////////....." "..////////........////////......" ".////////........////////......." "////////........////////........" "///////........////////......../" "//////........////////........//" ; "12345678901234567890123456789012" [end] ; [_polygon] Type=0x22 String=Historic FontStyle=SmallFont Xpm="0 0 1 0" "a c #FF9966" [end] ; [_polygon] Type=0x23 String=Amenity FontStyle=SmallFont Xpm="0 0 1 0" "a c #FF9966" [end] ; [_polygon] Type=0x24 String=Man Made Xpm="0 0 1 0" "a c #FF99CC" [end] ; [_polygon] Type=0x25 String=Square String1=0x01,Place ;String1=0x02,German Title String1=0x05,Piazza String1=0x08,Plaza FontStyle=SmallFont Xpm="0 0 1 0" "a c #FFCCFF" [end] ; [_polygon] Type=0x4b Xpm="0 0 1 0" "a c #FFFFFF" [end] ; [_polygon] Type=0x58 ; crashes with: String=County ; corruption with: String=Countyxxxxx Xpm="16 16 2 1" ". c none" "1 c #FFFFFF" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" ; "1234567890123456" [end] ; ;----- LINE SECTION ---- ; [_line] Type=0x11 String=Cycleway UseOrientation=N Xpm="32 2 2 1" ". c none" "_ c #FF0000" "______..______..______..______.." "______..______..______..______.." ; "12345678901234567890123456789012" [end] ; [_line] Type=0x13 String=Race track LineWidth=1 BorderWidth=0 Xpm="0 0 1 0" "a c #000000" [end] ; [_line] Type=0x17 String=Barrier LineWidth=1 BorderWidth=0 Xpm="0 0 1 0" "a c #000000" [end] ; ; that's it -------------- next part -------------- [_polygon] Type=0x58 String=County Xpm="16 16 2 1" ". c #000000" "1 c #FFFFFF" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" "................" ; "1234567890123456" ; without bit-map doesn't crash display or show corruption ;Xpm="0 0 1 0" ; "1 c #FFFFFF" [end] -------------- next part -------------- A non-text attachment was scrubbed... Name: tst.sh Type: application/x-shellscript Size: 411 bytes Desc: not available URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20181109/67205de4/attachment.bin>
- Previous message: [mkgmap-dev] Pipeline route style
- Next message: [mkgmap-dev] TYP compiler problems
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list