navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
559 stars 175 forks source link

Adding an attribute to attr_def.h breaks lookup when entering destination #1260

Closed adevoss closed 4 months ago

adevoss commented 7 months ago

To reproduce:

jkoan commented 7 months ago

Could you please provide a patch how/where you tried to insert a attribute?

adevoss commented 7 months ago

Sure. Take #1259 and search for my // TODO comments.

OLFDB commented 4 months ago

You should add a new attribute in attr_def.h only at the end of a type. Never somewhere where it causes other attributes of that type to get a new value. As maptool is also using attributes, all maps not created with maptool made from your code might not work anylonger.

You could try building your map using maptool build from your code, or move the new attribute after ATTR(outputdir) and try again (line 415 in your attr_def.h):

ATTR(outputdir)
ATTR(data_tts)
ATTR2(0x0003ffff,type_string_end)
adevoss commented 4 months ago

You should add a new attribute in attr_def.h only at the end of a type.

Ah. My first thought was: I can't go wrong when I insert the new attribute data_tts directly under data. I will move the new attribute to the end of the type.

To be clear: I didn't modify the map and/or maptool. Using the same map only changed a .c file and attr_def.h. After I changed attr_def.h I will update #1259.

adevoss commented 4 months ago

Done. Thanks.