#39 Crash gtk when destination reached with Demo vehicle

open
nobody
gtk (3)
5
2011-01-19
2011-01-19
Anonymous
No

Activate Demo vehicle in navit.xml:
<vehicle name="Demo" profilename="car" enabled="yes" active="yes" source="demo://"/>

Select a position point and a destination point by clicking on map. Once the destination reached by demo car, move the mouse over navit, the application crash generally the first times and there's the following stack:

*** glibc detected *** navit: malloc(): smallbin double linked list corrupted: 0x08acfd98 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6c501)[0x3a3501]
/lib/libc.so.6(+0x6f679)[0x3a6679]
/lib/libc.so.6(__libc_malloc+0x63)[0x3a7f33]
/lib/libglib-2.0.so.0(g_realloc+0x3a)[0x17a4ca]
/lib/libglib-2.0.so.0(+0x6189f)[0x19589f]
/lib/libglib-2.0.so.0(g_string_sized_new+0x4f)[0x1969df]
/lib/libglib-2.0.so.0(+0x4323a)[0x17723a]
/lib/libglib-2.0.so.0(g_markup_parse_context_parse+0x72f)[0x17904f]
/usr/lib/libgtk-x11-2.0.so.0(+0x11ddeb)[0xfc3deb]
/usr/lib/libgtk-x11-2.0.so.0(gtk_label_set_markup+0xb8)[0xfc6618]
/usr/lib/libgtk-x11-2.0.so.0(gtk_tooltip_set_markup+0x87)[0x10c2737]
/usr/lib/libgtk-x11-2.0.so.0(+0x21c7ab)[0x10c27ab]
/usr/lib/libgtk-x11-2.0.so.0(+0x21d26c)[0x10c326c]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x348)[0xfd4c58]
/usr/lib/libgdk-x11-2.0.so.0(+0x5636a)[0x25936a]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1d5)[0x171855]
/lib/libglib-2.0.so.0(+0x41668)[0x175668]
/lib/libglib-2.0.so.0(g_main_loop_run+0x187)[0x175ba7]
navit[0x8059846]
navit(event_main_loop_run+0x1e)[0x805ef2e]
navit(main_real+0x25c)[0x80525ec]
navit(main+0x1b)[0x805233b]
/lib/libc.so.6(__libc_start_main+0xe7)[0x34dce7]
navit[0x8052281]

Discussion

  • Nico12321
    Nico12321
    2011-01-19

    This crash occurs under Ubuntu 10.10

     
  • Ljubo Mercep
    Ljubo Mercep
    2011-03-17

    Implement a variable which keeps track of the "destination valid" by tapping into navit_set_destination(...).

    If this variable indicates that the destination is not valid, you shouldn't destroy the map rectangle in vehicle_demo.c. So, condition the call to "map_rect_destroy(mr)" with the "destination valid" variable. I added it to "struct navit" which gets passed into vehicle_demo_timer.