#1 Hash table problem

closed
nobody
None
5
2008-01-01
2007-12-29
Albert L Faber
No

Hi,
I'm trying to get Navit running on a Windows, however, I had some issues on Osm2Navit, it turns out that the hash table key string value on line 387 is not duplicated:
g_hash_table_insert(value_hash, v, (gpointer)item.type);
which should be:
g_hash_table_insert(value_hash, g_strdup(v), (gpointer)item.type);

If the string is not duplicated, basically all keys will point to the same (latest)string value.
Regards Albert

Discussion

  • Albert L Faber
    Albert L Faber
    2007-12-29

    Logged In: YES
    user_id=1069
    Originator: YES

    Just saw that this happens at more places in the osm2navit.c file, please check all the g_hash_table_insert that g_strdup is called when a string is passed a key (or value)

     
  • Albert L Faber
    Albert L Faber
    2007-12-30

    Logged In: YES
    user_id=1069
    Originator: YES

    Just saw that this happens at more places in the osm2navit.c file, please check all the g_hash_table_insert that g_strdup is called when a string is passed a key (or value)

     
  • Albert L Faber
    Albert L Faber
    2007-12-30

    Logged In: YES
    user_id=1069
    Originator: YES

    Just saw that this happens at more places in the osm2navit.c file, please check all the g_hash_table_insert that g_strdup is called when a string is passed a key (or value)

     
    • status: open --> closed